0% found this document useful (0 votes)
28 views28 pages

Gate Pyq Test 07 - 2020 - With Solution

Uploaded by

bhargab3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views28 pages

Gate Pyq Test 07 - 2020 - With Solution

Uploaded by

bhargab3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

GATE PYQ TEST 7


Computer Science & Information Technology
Full Syllabus

Q1 Raman is confident of speaking English Billions of people are responsible for man-
six months as he has been practicing made emissions.
regularly the last three weeks. (D) Billions of people are affected by melting
(A) during, for (B) for, since glaciers.
(C) for, in (D) within, for
Q5 There are multiple routes to reach from node 1
Q2 His knowledge of the subject was excellent but to node 2, as shown in the network.
his classroom performance was .
(A) extremely poor (B) good
(C) desirable (D) praiseworthy

Q3 Select the word that fits the analogy:


Cook : Cook :: Fly :
(A) Flyer (B) Flying
(C) Flew (D) Flighter
The cost of travel on an edge between two
Q4 The dawn of the 21st century witnessed the
nodes is given in rupees. Nodes ‘a’, ‘b’, ‘c’, ‘d’, ‘e’,
melting glaciers oscillating between giving too
and T are toll booths. The toll price at toll
much and too little to billions of people who
booths marked ‘a’ and ‘e’ is Rs. 200, and is Rs.
depend on them for fresh water. The UN climate
100 for the other toll booths. Which is the
report estimates that without deep cuts to
cheapest route from node 1 to node 2?
man-made emissions, at least 30% of the
(A) 1-a-c-2 (B) 1-f-b-2
northern hemisphere’s surface permafrost could
(C) 1 -b-2 (D) 1-f-e-2
melt by the end of the century. Given this
situation of imminent global exodus of billions Q6 Goods and Services Tax (GST) is an indirect tax
of people displaced by rising seas, nationstates introduced in India in 2017 that is imposed on
need to rethink their carbon footprint for the supply of goods and services, and it
political concerns, if not for environmental ones. subsumes all indirect taxes except few. It is a
Which one of the following statements can be destination-based tax imposed on goods and
inferred from the given passage? services used, and it is not imposed at the point
(A) Nation-states do not have environmental of origin from where goods come. GST also has
concerns. a few components specific to state
(B) Nation-states are responsible for providing governments, central government and Union
fresh water to billions of people. Territories (UTs).
(C)

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 1/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Which one of the following statements can be (C) 120° (D) 180°
inferred from the given passage?
Q10 The total revenue of a company during 2014-
(A) GST is imposed on the production of goods
2018 is shown in the bar graph. If the total
and services.
expenditure of the company in each year is 500
(B) GST includes all indirect taxes.
million rupees, then the aggregate profit or loss
(C) GST does not have a component specific to
(in percentage) on the total expenditure of the
UT.
company during 2014-2018 is_.
(D) GST is imposed at the point of usage of
goods and services.

Q7 If P = 3, R = 27, T = 243, then Q + S


(A) 40 (B) 80
(C) 90 (D) 110

Q8 The figure below shows an annular ring with


outer and inner radii as b and a, respectively.
The annular space has been painted in the
form of blue colour circles touching the outer
and inner periphery of annular space. If
maximum n number of circles can be painted, (A) 16.67 % profit (B) 16.67% loss
then the unpainted area available in annular (C) 20 % profit (D) 20 % loss
space is. Q11 Consider the functions

1. e–x
2. x2 – sin x
−−−−−
3. √x3+ 1

Which of the above functions is/are increasing


everywhere in [0,1]?
(A) III only
(B) II only
(A) π [(b2 2
− a ) −
n 2
(b − a) ] (C) II and III only
4

(B) π [(b2 2 2
(D) I and III only
− a ) − n(b − a) ]

(C) π [(b2 2
− a ) +
n
(b − a) ]
2 Q12 For parameters a and b, both of which are ω(1),
T(n) = T(n1/a) +1, and T(b) = 1.
4

(D) π [(b2 2
− a ) + n(b − a) ]
2

The T(n) is-


(A) Θ (loga logb n)
Q9 Two straight lines are drawn perpendicular to
(B) Θ (loga b n)
each other in X-Y plane. If α and β are the
(C) Θ (logb loga n)
acute angles the straight lines make with the X-
(D) Θ (log2 log2 n)
axis, then α + β is.
(A) 60° (B) 90° Q13 Consider the following statements.

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 2/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

I. Daisy chaining is used to assign priorities in (A) 10,11,12,15,16,18,19,20


attending interrupts. (B) 11,12,10,16,19,18,20,15
II. When a device raises a vectored interrupt, (C) 20,19,18,16,15,12,11,10
the CPU does polling to identify the source of (D) 19,16,18,20,11,12,10,15
interrupt.
Q16 What is the worst case time complexity of
III. In polling, the CPU periodically checks the
inserting n2 elements into an AVL-tree with n
status bits to know if any device needs its
elements initially?
attention.
(A) Θ (n4 ) (B) Θ (n2 )
IV. During DMA, both the CPU and DMA
(C) Θ (n2 logn) (D) Θ (n3 )
controller can be bus masters at the same time.
Which of the above statements is/are TRUE? Q17 Which one of the following regular expressions
(A) I and II only (B) I and IV only represents the set of all binary strings with an
(C) I and III only (D) III only odd number of 1 ’s?
(A) ((0+1)*1(0+1)*1)*10*
Q14 Consider the following data path diagram.
(B) (0*10*10*)0*10*
(C) 10*(0*10*10*)*
(D) (0*10*10*)*10*

Q18 Consider the following statements.

1. If L1 ∪ L2 is regular, then both L1 and L2 must


be regular.
Consider an instruction: R0 ← R1 + R2. The
2. The class of regular languages is closed
following steps are used to execute it over the
under infinite union.
given data path. Assume that PC is
incremented appropriately. The subscripts r and Which of the above statements is/are TRUE?
w indicate read and write operations, (A) I only
respectively. (B) II only
(C) Both I and II
1. R2r, TEMP1r, ALUadd, TEMP2W
(D) Neither I nor II
2. R1r, TEMP1w
3. PCr, MARw, MEMr Q19 Consider the following statements.
4. TEMPr,IRw I. Symbol table is accessed only during lexical
5. MDRr , IRw analysis and syntax analysis.
Which one of the following is the correct order II. Compilers for programming languages that
of execution of the above steps? support recursion necessarily need heap
(A) 2,1,4,5,3 (B) 1,2,4,3,5 storage for memory allocation in the run-
(C) 3,5,2,1,4 (D) 3,5,1,2,4 time environment.
III. Errors violating the condition 'any variable
Q15 The preorder traversal of a binary search tree is must be declared before its use’ are detected
15, 10, 12, 11, 20, 18, 16, 19. Which one of the during syntax analysis.
following is the postorder traversal of the tree? Which of the above statements is/are TRUE?

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 3/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

(A) I only (B) II and III only


(B) I and III only (C) I, II, and IV only
(C) II only (D) I, II, III and IV
(D) None of I, II and III
Q23 Consider a relational database containing the
Q20 Consider the language L = {an | n > 0} ∪ {anbn | following schemas.
n > 0} and the following statements.
I. L is deterministic context-free.
II. L is context-free but not deterministic
context-free.
III. L is not LL(k) for any k.
Which of the above statements is/are TRUE?
(A) I only (B) II only
(C) I and III only (D) III only

Q21 Consider allocation of memory to a new


process. Assume that none of the existing holes The primary key of each table is indicated by
in the memory will exactly fit the process's underlining the constituent fields.
memory requirement. Hence, a new hole of SELECT s.sno, s.sname
smaller size will be created if allocation is made FROM Suppliers s, Catalogue c
in any of the existing holes. Which one of the WHERE s.sno = c.sno AND
following statements is TRUE? cost > (SELECT AVG (cost)
(A) The hole created by first fit is always larger FROM Catalogue
than the hole created by next fit. WHERE pno = 'P4'
(B) The hole created by worst fit is always larger GROUP BY pno);
than the hole created by first fit. The number of rows returned by the above SQL
(C) The hole created by best fit is never larger query is
than the hole created by first fit. (A) 4 (B) 5
(D) The hole created by next fit is never larger (C) 2 (D) 0
than the hole created by best fit.
Q24 Which one of the following is used to represent
Q22 Consider the following statements about the supporting many-one relationships of a
process state transitions for a system using weak entity set in an entity-relationship
preemptive scheduling. diagram?
I. A running process can move to ready state. (A) Diamonds with double/bold border
II. A ready process can move to running state. (B) Rectangles with double/bold border
III. A blocked process can move to running (C) Ovals with double/bold border
state. (D) Ovals that contain underlined identifiers
IV. A blocked process can move to ready state.
Which of the above statements arc TRUE? Q25 Consider the following statements about the
(A) I, II. and III only functionality of an IP based router.

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 4/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

I. A router does not modify the IP packets A direct mapped cache memory of 1 MB has a
during forwarding. block size of 256 bytes. The cache has an
II. It is not necessary for a router to implement access time of 3 ns and a hit rate of 94%. During
any routing protocol. a cache miss, it takes 20 ns to bring the first
III. A router should reassemble IP fragments if word of a block from the main memory, while
the MTU of the outgoing link is larger than the each subsequent word takes 5 ns. The word size
size of the incoming IP packet. is 64 bits. The average memory access time in
Which of the above statements is/are TRUE? ns (round off to 1 decimal place) is?
(A) I and II only
Q32 Consider the following C program.
(B) I only
# {include <stdio.h>
(C) II and III only
int main() {
(D) II only
int a [4][5]= {{1, 2, 3, 4, 5},
Q26 What is the worst case time complexity of (6, 7, 8, 9, 10},
inserting n elements into an empty linked list, if {11, 12, 13, 14, 15},
the linked list needs to be maintained in sorted {16, 17, 18 , 19, 20} };
order? printf("%d\n", *(*(a+**a+2)+3));
(A) Θ (nlogn) (B) Θ (n) return(0);
(C) Θ (1) (D) Θ (n 2
) }
The output of the program is .
Q27 Let R be the set of all binary relations on the set
{1,2,3}. Suppose a relation is chosen from R at Q33 Consider a double hashing scheme in which the
random. The probability that the chosen primary hash function is h1(k) = k mod 23, and
relation is reflexive (round off to 3 decimal the secondary hash function is h2(k) = 1+ (k mod
places) is? 19). Assume that the table size is 23. Then the
address returned by probe 1 in the probe
Q28 Let G be a group of 35 elements. Then the
sequence (assume that the probe sequence
largest possible size of a subgroup of G other
begins at probe 0) for key value k = 90 is
than G itself is?
Q34 Consider the following grammar.
Q29 A multiplexer is placed between a group of 32
S → aSB | d
registers and an accumulator to-regulate data
B→b
movement such that at any given point in time
The number of reduction steps taken by a
the content of only one register will move to the
bottom-up parser while accepting the string
accumulator. The minimum number of select
aaadbbb is .
lines-needed for the multiplexer is?
Q35 Assume that you have made a request for a
Q30 If there are m input lines and n output lines for a
web page through your web browser to a web
decoder that is used to uniquely address a byte
server. Initially the browser cache is empty.
addressable 1 KB RAM, then the minimum value
Further, the browser is configured to send HTTP
of m + n is
requests in non-persistent mode. I'he web page
Q31 contains text and five very small images. The

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 5/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

minimum number of TCP connections required (C) z = ∑ (2, 4, 5, 6, 7)

to display the web page completely in your (D) z = ∑ (2, 3, 5)

browser is .
Q39 Consider three registers RI, R2. and R3 that
Q36 Which of the following languages are store numbers in IEEE-754 single precision
undecidable? floating point format. Assume that RI and R2
Note that ⟨M⟩ indicates encoding of the Turing contain the values (in hexadecimal notation)
machine M. 0x42200000 and 0xC 1200000. respectively.
L1 = {⟨M⟩| L(M) = ϕ} If R3 = R1

R2
, what is the value of stored in R3?
L2 = {⟨M, w, q⟩| M on input w reaches state q in (A) 0x40800000 (B) 0xC0800000
exactly 100 steps} (C) 0x83400000 (D) 0xC8500000
L3 = {⟨M⟩ | L(M) is not recursive}
L4 = {⟨M⟩| L(M) contains at least 21 members} Q40 A computer system with a word length of 32 bits

(A) L1, L3, and L4 only has a 16 MB byte-addressable main memory

(B) L1 and L3 only and a 64 KB. 4-way set associative cache

(C) L2 and L3 only memory with a block size of 256 bytes. Consider

(D) L2, L3, and L4 only the following four physical addresses
represented in hexadecimal notation.
Q37 Let A and B be two n x n matrices over real A1 = 0x42C8A4
numbers. Let rank(M) and det(M) denote the A2 = 0x546888
rank and determinant of a matrix M. A3 = 0x6A289C
respectively. Consider the following statements. A4 = 0x5E4880
I. rank(AB) = rank(A) rank(B) Which one of the following is TRUE?
II. det(AB) = det(A) det(B) (A) Al and A4 are mapped to different cache
III. rank(A + B) < rank(A) + rank (B) sets.
IV. det(A + B) < det(A) + det (B) (B) A2 and A3 are mapped to the same cache
Which of the above statements are TRUE? set.
(A) I and II only (C) A3 and A4 are mapped to the same cache
(B) I and IV only set.
(C) II and III only (D) Al and A3 are mapped to the same cache
(D) III and IV only set.

Q38 Consider the Boolean function z(a, b, c). Q41 Let G = (V,E) be a weighted undirected graph
and let T be a Minimum Spanning Tree (MST) of
G maintained using adjacency lists. Suppose a
new weighted edge (u, v) ∈ V x V is added to G.
The worst case time complexity of determining
if T is still an MST of the resultant graph is
Which one of the following minterm lists (A) Θ (|E| + |V|)
represents the circuit given above? (B) Θ (|E||V|)
(A) z = ∑ (0, 1, 3, 7)
(C) Θ (|E| log |V|)
(B) z = ∑ (1, 4, 5, 6, 7)

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 6/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

(D) Θ (|V|) It ensures that at most two processes are in


CODE SECTION Q at any time.
Q42 Consider the following languages.
(C) It ensures that all processes execute CODE
L1 = (wxyx | w,x,y ∈ (0 + 1)+}
SECTION P mutually exclusively.
L2 = {xy | x,y ∈ (a + b)*, |x| = |y|, x # y}
(D) It ensures that at most n –1 processes are in
Which one of the following is TRUE?
CODE SECTION P at any time
(A) L1 is regular and L2 is context-free.
(B) L1 is context-free but not regular and L2 is Q45 Consider the following five disk access requests
context-free. of the form (request id, cylinder number) that
(C) Neither L1 nor L2 is context-free. are present in the disk scheduler queue at a
(D) L1 is context-free but L2 is not context-free. given time.
(P, 155), (Q, 85), (R. 110), (S, 30), (T, 115)
Q43 Consider the productions A → PQ and A → XY.
Assume the head is positioned at cylinder 100.
Each of the five non-terminals A, P, Q, X. and Y
The scheduler follows Shortest Seek Time First
has two attributes: s is a synthesized attribute,
scheduling to service the requests.
and i is an inherited attribute. Consider the
Which one of the following statements is FALSE?
following rules.
(A) T is serviced before P.
Rule 1: P.i = A.i’ + 2, Q.i = P.i + A.i, and A.s = P.v +
(B) Q is serviced after S, but before T.
Q.v
(C) The head reverses its direction of movement
Rule 2: X.i = A.i + Y.s and Y.i = X.s + A.i
between servicing of Q and P.
Which one of the following is TRUE?
(D) R is serviced before P.
(A) Both Rule 1 and Rule 2 are L- attributed.
(B) Only Rule 1 is L-attributed Q46 Consider a relational table R that is in 3NF, but
(C) Only Rule 2 is L-attributed. not in BCNF. Which one of the following
(D) Neither Rule 1 nor Rule 2 is L-attributed. statements is TRUE?
(A) R has a nontrivial functional dependency X
Q44 Each of a set of n processes executes the
→ A, where X is not a superkey and A is a
following code using two semaphores a and b
prime attribute.
initialized to 1 and 0, respectively. Assume that
(B) R has a nontrivial functional dependency X
count is a shared variable initialized to 0 and
→ A. where X is not a superkey and A is a
not used in CODE SECTION P.
non-prime attribute and X is not a proper
CODE SECTION P
subset of any key.
wait (a); count=count + l;
(C) R has a nontrivial functional dependency X
if (count==n) signal(b);
→ A, where X is not a superkey and A is a
signal (a); wait(b); signal(b);
non-prime attribute and X" is a proper
CODE SECTION Q
subset of some key.
What does the code achieve? (D) A cell in R holds a set instead of an atomic
ensures
(A)that no process executes CODE SECTION Q value
before every process has finished CODE
SECTION P. Q47 Consider a schedule of transactions T1 and T2:
(B) T1 RA RC WD WB Commit

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 7/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

T2 RB WB RD WC Commit (B) ∃x (p (x) → W) ≡ ∀ xp (x) → W

Here. RX stands for “Read(X)” and WX stands for (C) ∀x (p (x) → W) ≡ ∀ xp (x) → W

“Write(X)”. (D) ∀x (p (x) → W) ≡ ∀ xp (x) ∨ W

Which one of the following schedules is conflict


equivalent to the above schedule?
Q50 Let G = (V, E) be a directed, weighted graph
(A) T1 RA RC WD WB Commit
with weight function w: .E → W For some
T2 RB WB RD Commit function f: V → R, for each edge (u,v) ∈ E, define
(B) T1 RA RC WD WB Commit w'(u,v) as w(u,v) + f(u) –f(v).
T2 RB WB RD WC Commit Which one of the options completes the
(C) T1 RA RC WD WB Commit following sentence so that it is TRUE?

T2 RB WB RD WC Commit "The shortest paths in G under w are shortest


paths under w to .”
(D) T1 RA RC WD WB Commit
(A) for every f: V → R
T2 RB WB RD WC Commit
(B) if and only if u ∀ V, f (u) is positive
Q48 An organization requires a range of IP (C) if and only if u ∀ V, f (u) is negative
addresses to assign one to each of its 1500 (D) if and only if f(u) is the distance from s to u in
computers. The organization has approached the graph obtained by adding a new vertex.
an Internet Service Provider (ISP) for this task. s to G and edges of zero weight from s to
the ISP uses CIDR and serves the requests from every vertex of G.
the available IP address space 202.61.0.0/17. Q51 In a balanced binary search tree with n
The ISP wants to assign an address space to elements, what is the worst case time
the organization which will minimize the number complexity of reporting all elements in range [a,
of routing entries in the ISP’s router using route b]? Assume that the number of reported
aggregation. Which of the following address elements is k.
spaces are potential candidates from which the (A) Θ (logn) (B) Θ (nlog + n)
ISP can allot any one to the organization? (C) Θ (logn + k) (D) Θ (klogn)
I. 202.61.84.0/21 II.
202.61.104.0/21 Q52 The number of permutations of the characters
III. 202.61.64.0/21 IV. in LILAC so that no character appears in its
202.61.144.0/21 original position, if the two L‘s are
(A) I and II only indistinguishable, is .
(B) II and III only
Q53 Consider a non-pipelined processor operating
(C) III and IV only
at 2.5 GHz. It takes 5 clock cycles to complete
(D) I and IV only
an instruction. You are going to make a 5-stage
Q49 Which one of the following predicate formulae pipeline out of this processor. Overheads
is NOT logically valid? associated with pipelining force you to operate
Note that W is a predicate formula without any the pipelined processor at 2 GHz. In a given
free occurrence of x. program, assume that 30% are memory
(A) ∃x (p (x) ∧ W) ≡ ∃ xp (x) ∧ W instructions. 60% are ALU instructions and the

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 8/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

rest are branch instructions. 5% of the memory return(i);


instructions cause stalls of 50 clock cycles each }
due to cache misses and 50% of the branch The return value of fun2 (5) is .
instructions cause stalls of 2 cycles each.
Q57 Consider the array representation of a binary
Assume that there are no stalls associated with
min-heap containing 1023 elements. The
the execution of ALU instructions. For this
minimum number of comparisons required to
program, the speedup achieved by the
find the maximum in the heap is .
pipelined processor over the non-pipelined
processor (round off to 2 decimal places) Q58 Consider the following C functions.
is . int tob(int b, int* arr){
int i;
Q54 A processor has 64 registers and uses 16-bit
for(i=0; b>0; i++){
instruction format. It has two types of
if(b%2) arr[i]=l;
instructions: I-type and R-type. Each I-type
else arr[i]=0;
instruction contains an opcode, a register
b = b/2;
name, and a 4-bit immediate value. Each R-
}
type instruction contains an opcode and two
return(i);
register names. If there are 8 distinct I-type
}
opcodes, then the maximum number of distinct
int pp(int a,int b) {
R-type opcodes is .
int arr[20];
Q55 For n > 2, let a ∈ {0,l}n be a non-zero vector. int i, tot = 1, ex, len;
Suppose that x is chosen uniformly at random ex = a;
from {0,l}n. Then, the probability that len = tob(b,arr);
n

i=1
ai xi is an odd number is . for(i=0; i<len; i++) {
if (arr(i]==l)
Q56 Consider the following C functions.
tot = tot * ex;
int fun1 (int n) {
ex = ex * ex;
static int i = 0;
}
if (n > 0) {
return(tot);
++i;
}
fun1(n –1);
The value returned by pp (3, 4)
}
is .
return(i);
} Q59 Consider a graph G = (V,E), where V = {v1, v2,...,
int fun 2(int n) { v100}. E = {(vi ,vj)|1 < i < j < 100}, and weight of the
static int i = 0; edge (vi,vj) is |i – j|. The weight of minimum
if (n > 0) { spanning tree of G is .
i = i + fun1(n);
Q60 Consider the following set of processes,
fun2(n-1);
assumed to have arrived at time 0. Consider
}
the CPU scheduling algorithms Shortest Job

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 9/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

First (SJF) and Round Robin (RR). For RR. assume into one disk block. The minimum number of
that the processes are scheduled in the order disk accesses required to retrieve any record in
P1,P2,P3,P4. the database is .
Process P1 P2 P3 P4
Q65 Consider a TCP connection between a client
Burst time (in ms) 8 7 2 4
and a server with the following specifications:
If the time quantum for RR is 4 ms. then the the round trip time is 6 ms. the size of the
absolute value of the difference between the receiver advertised window is 50 KB. slow-start
average turnaround times (in ms) of SJF and RR threshold at the client is 32 KB. and the
(round off to 2 decimal places) is? maximum segment size is 2 KB. The connection
Q61 Consider the following language. is established at time t = 0. Assume that there
L = {x ∈ {a, b}*| number of a's in x is divisible by 2 are no timeouts and errors during transmission.
but not divisible by 3} Then the size of the congestion window (in KB)
The minimum number of states in a DFA that at time t + 60 ms after all acknowledgements
accepts L is . are processed is .

Q62 Graph G is obtained by adding vertex s to K3,4


and making s adjacent to every vertex of K3,4.
The minimum number of colours required to
edge-colour G is .

Q63 Consider a paging system that uses 1-level


page table residing in main memory and a TLB
for address translation. Each main memory
access takes 100 ns and TLB lookup takes 20 ns.
Each page transfer to/from the disk takes 5000
ns. Assume that the TLB hit ratio is 95%, page
fault rate is 10%. Assume that for 20% of the
total page faults, a dirty page has to be written
back to disk before the required page is read in
from disk. TLB update time is negligible. The
average memory access time in ns (round off to
1 decimal places) is .

Q64 Consider a database implemented using B+


tree for file indexing and installed on a disk
drive with block size of 4 KB. The size of search
key is 12 bytes and the size of tree/disk pointer
is 8 bytes. Assume that the database has one
million records. Also assume that no node of the
B+ tree and no records are present initially in
main memory. Consider that each record fits

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 10/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Answer Key
Q1 (D) Q29 (5 to 5)

Q2 (A) Q30 (1034 to 1034)

Q3 (A) Q31 (13.3 to 13.3 or 13.5 to 13.5)

Q4 (D) Q32 (19 to 19)

Q5 (B) Q33 (13 to 13)

Q6 (D) Q34 (7 to 7)

Q7 (C) Q35 (6 to 6)

Q8 (A) Q36 (A)

Q9 (B) Q37 (C)

Q10 (C) Q38 (B)

Q11 (A) Q39 (B)

Q12 (A) Q40 (B)

Q13 (C) Q41 (D)

Q14 (C) Q42 (A)

Q15 (B) Q43 (B)

Q16 (C) Q44 (A)

Q17 (B) Q45 (B)

Q18 (D) Q46 (A)

Q19 (D) Q47 (A)

Q20 (C) Q48 (B)

Q21 (C) Q49 (C)

Q22 (C) Q50 (A)

Q23 (A) Q51 (C)

Q24 (A) Q52 (12 to 12)

Q25 (D) Q53 (2.15 to 2.18)

Q26 (D) Q54 (14 to 14)

Q27 (0.125 to 0.125) Q55 (0.5 to 0.5)

Q28 (7 to 7) Q56 (55 to 55)

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 11/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Q57 (511 to 511) Q62 (7 to 7)

Q58 (81 to 81) Q63 (154.5 to 155.5)

Q59 (99 to 99) Q64 (4 to 4)

Q60 (5.25 to 5.25) Q65 (44 to 44)

Q61 (6 to 6)

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 12/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Hints & Solutions


Q1 Text Solution: S = 3R = 3 × 27 = 81
‘Within’ is used where something will occur in a T = 3S = 3 × 81 = 243
specified period of time. ‘For’ is used for So, Q + S = 9 + 81 = 90.
duration of time (Hour, Days, Week, Month)
whereas ‘Since’ is used for specific point in time. Q8 Text Solution:
The area annular space = p (b2 – a2)
Q2 Text Solution: The radius of blue circles =
(b−a)

2
‘But’ in the sentence shows that last part of 2
The area of n blue circles =

(b − a)
sentence contradicts to the first part of 4

The unpainted area in annular space


sentence. So correct option is ‘extremely poor’.
2 2 nπ 2
= π(b − a ) − (b − a)
4

Q3 Text Solution: = π [(b


2 2
− a ) −
n
(b − a) ]
2

4
Here ‘cook’ is verb then ‘cook’ is noun.
Cook (subject) cooks (verb) the food similarly,
the flyer flies the aircraft.

Q9 Text Solution:
Q4 Text Solution:
From the passage, melting glaciers are
affecting billions of people and nation-states of
UN need to rethink their carbon footprint, infers
that some nation-states are not very serious for
environment change.

Q5 Text Solution:
Cost of route 1 – a – c – 2 = 700 From the graph of ΔABC
Cost of route 1 – f – b – 2 = 500 α + β + 90° = 180°
Cost of route 1 – b – 2 = 600 α + β =90°
Cost of route 1 – f – e – 2 = 700
So, the cheapest route is 1-f-b-2
Q10 Text Solution:
Q6 Text Solution: Total expenditure during 2014 – 2018
It is clearly mentioned in passage that GST is 5 × 500 = 2500 million rupees
not imposed on the point of origin rather it is Total revenue during 2014 – 2018
imposed on point of destination/usage. = 500 + 700 + 800 + 600 + 400
= 3000 million rupees.
Q7 Text Solution: Total profit =
revenue−expenditure

expenditure

Q = 3P = 3 × 3 = 9 3000−2500
= = 20%
R = 3Q = 3 × 9 = 27
2500

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 13/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Q11 Text Solution: 1


K
. log 2 n = log 2 b
a
−−−−−
Given function are √x3 + 1 log 2 n
= a
K
⇒ a
K
= log b n
log 2 b
(i) e–x
∴ K = loga logbn
(ii) x2 – sinx
−−−−− T(n) = θ(loga . logbn)
(iii) √x3 + 1

For a function f(x) to be increasing in [0, 1], f’(x) >


Q13 Text Solution:
0 in [0, 1]
I. Daisy chaining is used to assign priorities in
(i) let, f(x) e–x :
attending interrupts. (true)
Then, f’(x) = – e–x
II. When a device raises a vectored interrupt,
Since f’(x) = – e–x is always less than xero
the CPU does polling to identify the source of
therefore f(x) e–x is decreasing function ∀xϵR
interrupt. (false)
(ii) f(x) = x2 – sin x ⇒ f’(x) = 2x – cosx
III. In polling, the CPU periodically checks the
status bits to know if any device needs its
attention. (true)
IV. During DMA, both the CPU and DMA
controller can be bus masters at the same time.
(false)
At a time either CPU or DMA can be master on
bus.
Since cos x > 2x for some xϵ[0, 1]
⇒ 2x – cosx < 0 for some xϵ[0, 1] Q14 Text Solution:

∴ x2 – sin x is not completely increasing in R0 ← R 1 + R2

[0, 1] Fetch cyle (Mem to CPU (IR))


−−−−− PC → M [MAR] → MBR → IR
(iii) f(x) = √x3 + 1
2
3. PCR MARw MBRr
⇒ f’(x) = ∀xϵ [0, 1]
3x
> 0
2√x3 +1
−−−−−
5. MBRr, IRw ; MBR → IR
∴ f(x) = √x3 + 1 is the only function that is 2. R1R Tempw ⇒ R1 → Temp1
increasing ∀xϵ[0, 1] 1. R2R temp1R ALU tempw ; temp2 ← R2 + temp1
4. Temp2R R0w; R0 → Temp2
Q12 Text Solution:
R0 ⇐ R1 + R2 .
T(n) = T(n1/a) + 1; T(b) = 1
T(n) = T(n1/a) + 1 …(1) Q15 Text Solution:
2

T (n
1/a
) = T (n
1/a
) + 1 …(2) The in-order traversal of a BST is increasing
T(n) = T (n
1/a
2

) + 2 …(3) order of keys.


3

= T (n
1/a
) + 3 …(4)
K

= T (n
1/a
) + K …(5)
= T(b) + loga (logbn)
We know, first element of preorder traversal is
= 1 + loga . logbn
1/a
K the root node of entire tree.
n = b

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 14/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Mark this node in Inorder traversal I. If L1 ∪ L2 is Regular then, L1 and L2 may/may


Now we will insert 10 (next node in preorder) in not be regular.
the BST. an bn (DCFL) ∪ a* b*(Regular) = Regular
⇒ to find the position of 10 an bn (DCFL) ∪ (a + b)* (Regular) = Regular
⇒ just check position of 10 in Inorder traversal II. {ε } ∪ {ab} ∪ {a2 b2} ∪… = {anbn} is not regular
w.r.t. the marked node. Infinite union is not closed under regular
{10 is the left of 15} language.
Similarly, finding position for each other element Hence, option (d) is correct.
Now we can find the post-order traversal
Q19 Text Solution:
I. Symbol table is used by all the phases of
compiler, but here it is saying that only
accessed during lexical and syntax
analysis. So, this staatement is incorrect.
II. Compilers do not need heap storage they
need stack storage to support the recursion.
During recursion lots of activation records
are form for the same function, and we need
stack to maintain this. So, this statement is
Post-order traversal: 11,12, 10, 16, 19, 18, 20, 15. incorrect.
Therefore, option B is the correct answer. III. Errors violating the condition ‘any variable
must be declared before its use’ are detected
Q16 Text Solution: during semantic analysis not during
To, insert one element into an AVL – tree(n) = syntax analysis. So, this statement is also false.
log n Therefore, option (d) is True
Total time = θ(n2.logn) to insert n2 elements.
Q20 Text Solution:
Q17 Text Solution: I. L is deterministic context-free (True)
(a) (0* 10* 10*) * 0* 1 II. L is context-free but deterministic context-
This regular expression always ending with free
1.It can’t generate 10 (False)
(b) (0*10*10*)0*10* Regular ∪ DCFL = DCFL
This regular expression is the correct DPDA:
choice.
(c) ((0 + 1)* 1(0 + 1)* 1)* 10*
It will generate even number of 1 also.
(d) (0* 10* 10*)* 10*
This regular expression can not generate 01
string.

Q18 Text Solution:

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 15/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

III. L is not LL(k) for any k. (True) S3 Premium furniture


S3 Premium furniture
Q21 Text Solution:
S3 Premium furniture
Best fit always search for the smallest hole that
can accommodate a request. So, hole created
Q24 Text Solution:
by best fit will always be less than or equal to
the hole created by any other policy.
Worst fit always search for the largest hole to
accommodate a request. If the first hole is the
largest one, then worst fit and first fit both will
accommodate request in the same hole.
So, we can clearly say option c is the correct
option. The relationship between strong entity set and weak
entity set is represented by double/bold
Q22 Text Solution: diamond.
A process state diagram with pre-emptive
Q25 Text Solution:
scheduling is as follows:
Due to the TTL value changing during
forwarding, a router alters the IP packets. Since
it can simply forward packets in all directions
without performing any routing, a router is not
required to implement any routing protocols.
The packets are not assembled by the router. At
So, from the given diagram we can say the destination system, assembly is completed.
I. A running process can move to ready state.
II. A ready process can move to running state. Q26 Text Solution:
IV. A blocked process can move to ready state. Total comparision’s: (1 + 2 + 3 + … + n – 1)
n(n − 1)
Therefore, option C is correct. : 2

: O(n2)
Q23 Text Solution: : Ω(n2)
Running the inner query, the average cost from : Θ (n2 )
catalogue where part number is P4
Average cost =
200+250
Q27 Text Solution:
2

Average cost = 225


Now the outer query executes and we select
sno., sname from the join of Suppliers and
Catalogue relation where s.no = c.sno AND cost
> 225, the output relation is as below:
sno. sname A = {1,2,3} = n
S2 Balaji furniture A × B = n2

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 16/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Total number of relation = 2n = 29


2

Nondiagonal = n2 – n Q31 Text Solution:


Reflexive = 2n
2
–n Block size =256 bytes
n=3 Word size = 64 bit = 8 bytes
n
2
3
2
−3
6 Cache bit ratio = 94%
Probity = = =
2 −1 2 2 1 1
= = = 0.125
2
n
2
2
3
2
2
9
2
3 8
Cache access time [tc] = 3 nesec.
First word takes 20 and each subsequent word
Q28 Text Solution:
take
H ⊆ G G

H 5 nsec.
35
Number of word = 256 B

8 B
= 32

1, 5, 7, 35

Tavg = 0.94 × 3 + (1 – 0.94) (3 + 20 + 31×5)
⇒ 2.82 + 0.06 [178]
Q29 Text Solution: ⇒ 2.82 + 10.68
Multiplexer ⇒ 13.5 sec
3 select line then 23 Input line (8 input line)
[log 2 2 ]
3
or log28 Q32 Text Solution:
[23] input line then 3 select line required
M select line ⇒ 2m line
If 2m line then [log 2m] select line
For 32 input line
# select line = log2(32) = 5

: array name (a is collection of 4 elements


a[0],a[1], a[2],a[3])
Array name represent address of its first
elemetns.
a = &a[0]
*a = *&a[0]
*a = a[0]\
What is a [0]?
a[0] is an array of 5 elements i.e a[0][0], a[0][1],
a[0][ 2] & a[0][3],a[0][4]
a[0] ⇒ address of its first element
Q30 Text Solution:
a[0] = &a[0][0]
*a = a[0]
*a = a[0] = &a[0][0]
*a = &a[0][0]
1 kB RAM=1024 = 210 **a = a[0][0]
m = 10 a[0][0] = 1

n = 210 = 1024 *(a + **a + 2) = *(a + 1 + 2) = * (a + 3) = a[3]


m + n = 10 + 1024= 1034 *(a + **a + 2) = a[3]

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 17/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

*(a+ **a+2) + 3 = a[3]+3 In Non-persistent mode one TCP connection is


*(*a+ **a + 2) + 3) = a[3][3] = 19 required for each request/response web page
contain text and 5 same images so TCP
Q33 Text Solution: connection are required.
m = 23
h1(k) = k mod 23 = Primary hashing
h2(k) = 1 + (k mod 19) = Secondary hashing
H(k, i) = (h1 (k) + i.h2 (k)) mod m
i = Collision number
k = 90 Q36 Text Solution:
h1 (k) = 90 mod 23 = 21 L1 = {⟨M⟩|L(M) = ϕ}
h2 (k) = 1 + (90 mod 19) Emptiness problem for Turing machine is
= 1 + 14 = 15 Undecidable.
H(k, i) = (h1 (k) + i.h2 (k)) mod m L2 = {⟨M, w, q⟩|M on input w reaches state q in
H(90 ,i) = (h1 (90) + i.h2 (90) mod 23 exactly 100 steps}
= (21 + 15) mode 23 For given M, given w, run exactly 100 steps to
= 13 check whether q is reachable or not Decidable.
13 is the right answer L3 = {⟨M⟩|L(M) is not recursive)} ⇒ Undecidable.
L4 = {⟨M⟩|L(M)contains at least 21 members)}
Q34 Text Solution: |L(M)| ≥ 21 non trivial property is Undecidable.
Bottom-up parser follows reverse of RMD (Right
most derivation). Q37 Text Solution:
And, Number of reduction steps in reverse of Rank(AB) = min(Rank(A), Rank(B))
RMD = Number of substitutions in RMD Det(AB) = Det(A) × Det(B)
RMD for given grammar. Rank (A + B) ≤ Rank (A) + Rank (B). Because
addition of two matrices can never result in
increase in the number of independent columns
and rows in the matrix.

Q38 Text Solution:

z = a + b̅ c
So, total 7 number of reduction steps taken by standard canonical form
bottom-up parser while verifying the string z = a(b̅ + b) (c̅ + c) + (a̅ + a) b̅ c
aaadbbb. z= ab̅ c̅ + ab̅ c + abc̅ + abc + a̅ b̅ c+ ab̅ c
z=Σm (1,4, 5, 6, 7 )
Q35 Text Solution: Hence correct answer is option (c).

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 18/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Q39 Text Solution: Q40 Text Solution:


Content of R1 in Hex (0x) is 42200000. After Main memory = 16 MB = 224 byte
converting into binary, it can be represented in Cache size = 64 MB = 216 Byte
IEEE-754 format as: Block size = 256 B = 28 Byte
010 0000 4 way set associative
0 100 0010 0 0000 0000 A1 : Ox 42C 8A4
0000 0000 A2 : Ox 546 888
sign bit is 0 i.e the number is positive A3: Ox 6A2 89C
Biased Exponent (E') = 100 0010 0 = 132 A4: Ox 5E4 880
Normalized mantissa (M) = 010 0000 0000 Physical address = 24 bit
0000 0000 0000 = 0.25 Word offset = log2 (block size)
Therefore, the number in register R1 = +1.25 × 2 = [log2 256] ⇒ 8 bit
(132–127) = 1.25 × 32 = 40 Word Offset = 8 bit
16

Number of line =
CM size B
Content of R1 in Hex (0x) is C1200000. After Block size
=
2
8
= 2
8

2 B

converting into binary, it can be represented in Number of Set =


Number of LINES
=
256
= 64
No−way 4

IEEE-754 format as: Set offset (S.O) = 6 bit


010 0000
1 100 0010 0 0000 0000
0000 0000
Sign bit is 1 i.e. the number is negative
Biased Exponent (E') = 100 0001 0 = 130
Normalized mantissa (M) = 010 0000 0000
0000 0000 0000 = 0.25
Therefore, the number is register R1 = 1.25 × 2(130
– 127) × 8 = –10
R3 = R1/R2 = 40/–10 = –4
since the number is negative, sign bit (MSB) = 1 A1 and A4 mapped to the same cache set
Converting 4 into binary of a floating point A2 and A3 are mapped to the same cache set
gives: (100.0)2
Representing it into normalized form gives: Q41 Text Solution:
(1.000000...) × 22 A Tree having ‘n’ vertices will always have (n – 1)
Therefore, Mantissa is 23 bit of all 0s edges.
Biased Exponent (E') = E+ 127 = 2 + 127 = 129 = |V| = |E'| + 1
(10000001)2
It can be represented in IEEE-754 format as:
000 0000
1 100 0000 1 0000 0000
0000 0000
Hex format gives: 0x C0800000 G T

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 19/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

E' : O (E') : O(v) It will perform signal (a); //line 5


A tree having n vertices will always have n – 1 wait (b) [b was initialized to 0, so it will be
edges. blocked]. //line 6
Now, processes will continuously block till count
Q42 Text Solution: ==n. Once count becomes equals to n,
L1 = wxwy it will execute signal(b) // line 4
Put minimum string in x = 0 or 1 and this unblocks one process, that unblocked
L1 = w0y0 + w1y1
+ +
(0 + 1) 0(0 + 1) 0 is process will execute signal (b) // line 7
+ (0 + 1)
+
1(0 + 1)
+
1 Now, subsequent processes will be unblocked
Regular and can enter CODE SECTION Q //line 8.
L2 = CFL language Means,
No processes can enter into CODE SECTION Q
Q43 Text Solution: until N processes finishes CODE SECTION P and
Given, N processes has incremented the count
A → PQ variable.
A → XY OR
Rule 1 is ⇒ L. attributed To execute CODE SECTION Q, N processes must
Rule 2 is ⇒ Not L-attributed. completed their CODE SECTION P and has
So, option b is correct. incremented the count variable.
So, It ensures that no process executes CODE
Q44 Text Solution: SECTION Q before every process has finished
Given, CODE SECTION P. Therefore, option A is correct.
There are two semaphores a and b initialized to
1 and 0 respectively. Count is a shared variable Q45 Text Solution:
it is initialized to 0. Request: ⟨(P, 155), (Q, 85), (R, 110), (S, 30),
1. CODE SECTION P (T, 115)⟩
2. wait (a); Initially head at cylinder 100, scheduling using
3. count = count + 1; SSTF:
4. if (count == n) signal (b);
5. signal (a);
6. wait (b);
7. signal (b);
8. CODE SECTION Q
Process will arrive, From the above diagram we can see that: Q is

Complete the CODE SECTION P //line 1. serviced after S but before T is wrong. Q is

and then only it can perform wait (a); //line 2 serviced before S and after T. So, option B is the

now, it will increase the value of count to 1; answer.

//line 3
Q46 Text Solution:
check if (count==n), if yes then perform signal
3NF: R is in 3NF
(b); else we will not execute signal(b); //line 4
If every X → Y (Non-Trivial FD)

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 20/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

satisfies the following conditions W(B) – R(B) : T1 → T2 ✗


X: Super key or W(B) – W(B) : T1 T2 ✗ →

Y: Prime key Attribute R(C) – W(C) : T1 → T2 ✔


BCNF W(D) – R(D) : T1 T2 ✗ →

R is in BCNF if every non-trivial In option (c), the conflicts are as follows:


X → Y FD must satisfy the following condition: R2(B) – W1(B)
X: Superkey W2(B) – W1(B)
X → A is in 3NF But Not in BCNF R1(C)– W2(C)
X : is Not Superkey (Not in BCNF) W1 (D) – R2 (D) ✗
Then OR
For 3NF design, A must be a prime Attribute. R(B) – W(B) : T2 → T1
W(B) – W(B) : T2 → T1
Q47 Text Solution: R(C) – W(C) : T1 → T2
In the given question, W(D) – R(D) : T1 → T2 ✗
Conflict operations In option (d), the conflicts are as follows:
R2(B) – W1(B) R2(B) – W1(B)
W2(B) – W1(B) W2(B) – W1(B)
R1(C) – W2(C) W2(C)– R1(C) ✗
R2 (D) – W1(D) R2 (D) – W1(D)
OR OR
R(B) – W(B) : T2 T1 → R(B) – W(B) : T2 → T1
W(B) – W(B) : T2 T1 → W(B) – W(B) : T2 → T1
R(C) – W(C) : T1 T2 → W(C) – R(C) : T2 → T1 ✗
R(D) – W(D) : T2 T1 → R(D) – W(D) : T2 → T1
In option (a), the conflicts are as follows:
R2(B) – W1(B) Q48 Text Solution:
W2(B) – W1(B) For 1500 computers HID must be minimum 11
R1(C) – W2(C) bits
R2 (D) – W1(D) 202.61.0.0/17
OR NID = 17bit, HID = 32 – 17 = 15bit
R(B) – W(B) : T2 → T1 202.61.0 - - - - - - - - . - - - - - - - -
W(B) – W(B) : T2 → T1 8+8+1 HID
R(C) – W(C) : T1 → T2 NID
R(D) – W(D) : T2 → T1 202.61.00000000 00000000 → 202.61.0.0
In option (b), the conflicts are as follows: ⁞ ⁞ ⁞
W1(B) – R2(B) ✗ 202.61.01111111.11111111 → 202.61.127.255
W1(B) – W2(B) ✗ I 202.61.84.0/21
R1(C)– W2(C) ✔ NID = 21, HID = 11 bit
W1 (D) – R2(D) ✗ First IP address of the block must be
OR divisible by size of the block means all host id

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 21/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

bits should be zero. (¬P(1) ∨ w) ∧ (¬P(2) ∨ w)


202.61.01010100.00000000/211 (¬P(1) ∧ ¬P(2)) ∨ w
HID
It is incorrect Q50 Text Solution:
II 202.61.01101000.00000000/211
HID
It is correct

III 202.61.01000000.00000000/211
HID
It is correct W(1, 3) + W(3, 2) + f(1) – f(3) + f(3) – f(2)
So, option b is the correct answer. W(1, 2) = 1 + 3 = 4
W' (1, 2) = Transformation of W(u, v) = W(1, 2) + f(1)
Q49 Text Solution: – f(2).
(a) ∃ x[P(x) ∧ w]
P(1) ∧ w Q51 Text Solution:
∨ Time of find ‘a’ and ‘b’ in binary search tree
(P(1) ∧ w) ∨ (P(2) ∧ w) = O(logn)
(P(1) ∨ P(2)) ∧ w Time of sum up elements between a, b in
x[P(x) ∧ w] binary search tree, using O(k) inorder sorting.
P(1)

∨ ∧ w 0
P(2)

(b) ∃x (p (x) → W) ≡ ∀ xp (x) → W

P1
⎛ ⎞

∃ x[¬P(x) ∨w] ⎜ ∧ ⎟ → w

⎝ ⎠
P2

(¬P(1) ∨ w) ≡ (¬P(1) ∧ P(2) ∨


Total time = O (logn + k)
w)

Q52 Text Solution:
(¬P(2) ∨ w) ≡ (¬P1 ∨ ¬P2 ∨
12345 13
w)
LILAC L L
(¬P(1) ∨ w) ∨ (¬P(2) ∨ w)
1 2 3 4 5 4
(¬P(1) ∨ ¬P(2)) ∨ w
_ L _ L _
(c) ∀x[P(x) → w] ≡ ∀xP(x) → w ≡ ¬[∀xP(x)
_ _ _ L L
]→w
_ L _ _ L
∀x[¬P(x) ∨ w] ≡ 3C
2 4 5 → 2 ways = 3 ways.
(¬P(1) ∨ w) ¬[P(1) ∧ P(2)] ∨ w)
↓ ↓ ↓ → 2 ways

= 3× 2 ×2 → 2!
(¬P(2) ∨ w) (¬P1 ∨ ¬P2 ∨ w)

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 22/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

= 12 ways .

Q53 Text Solution:


Non pipeline processor:
Frequency = 2.5 GHZ Total number of operation in R type = 24 = 16
Cycle time =
1 1

frequency
⇒ 2.5 G
sec.
operatin
⇒ 0.4 n sec
1 –9
⇒ 2.5
10 Assume R type instruciton = x
Cycle time = 0.4 nsec Number of free opcode after allocating R type
ETNON PIPE = CPI × Cycle time = 5 × 0.4 n sec. = (16 – x)
ETPIPE = 2 nsec.

Total number of operations in I type = free


opcode × 2 increment bit in opcode
= (16 – x) × 26–4 ⇒ (16 – x) × 22
Number of Stalls / Inst.= .30 × 0.05 × 50 +.60 × 0
I type (Given) = 8
+ .10× .50 × 2 = .75 + .1
n
8 = (16 – x) × 4
Number of stalls/Inst = 0.85
2 = 16 – x
ETPIPE = (1 + Number of stalls/Inst.) × cycle time x = 16 – 2
pipe.
x = 14
Cycle time pipeline = 1
sec. ⇒ 1

2
× 10
–9

2 G

0.5 nsec Q55 Text Solution:


ETPIPE = (1 + 0.85) × 0.5 n sec. = 1.85 ×0.5 Given:
ETPIPE ⇒ 0.925 ns For n > 2, a ∈ {0, 1}n
ET
S =
NONPIPE

ETPIPE
=
2

0.925
= 2.16 ⇒ ‘a’ is a n × 1 vector with every element
‘0’ or ‘1’
Q54 Text Solution: ⇒ a = [aij] ∀ 1 ≤ i ≤ n, j = 1 where aij = 0 (or) 1
Also, ‘x’ is a n × 1 vector with element ‘0’ or
‘1’.
⇒ x = [xij] ∀ 1 ≤ I ≤ n; j = 1 where xij = 0 (or) 1.
∵ aij. xij lies between 0 to ‘1’
n n
∴ ∑ ∑ aij xij lies between 0 to ‘n’
64 register ⇒ Register AF=6 bit
i=1 j=1

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 23/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

So, the probability distribution of is 2. fun 1(n) is increasing the value of static int i
n n

i=1

j=1
aij xij variable and returning the incremented value.

n

n
aij xij 0 1 2... n
Now let us understand fun2(5).
i=1 j=1

n n
P(∑ ∑ a ij xij ) nc nc nc ncn
i=1 j=1 0 1 2

∴ Probability that aij.xij is odd number is


=
nC +nC +⋯+⋯ n−1
1 3 2 1
= n
= = 0. 5
nC +nC +nC +⋯ 2 2
0 1 2

Q56 Text Solution:


Let us try to understand the working of function
fun1
Let fun1(3) is called first
i is an static variable

∴ 55 is printed

Q57 Text Solution:


Before fun1(3) the value of i was 0 and after
In a min-heap the maximum element can be
fun1(3) the value of i becomes 3.
present at a leaf node.
Let us assume fun1() is called again i.e. for the
Property of min heap
2nd time.
For any node x
x < c1 , c2

Largest among x, c1, c2 cannot be x.


Either of child can be maximum
⇒ Greatest element can be at a node which
1. Before fun1(2) value of static variable i was 3 does not have any child ⇒ leaf node.
and after fun1(2) value returned is 5. Which is Number of leaf node a heap with n element =
n
the value of i variable ⌈
2

In the question, n = 1023

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 24/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Number of leaf nodes = ⌈


1023

2
⌉ = 512 b = b/2 = ½ = 0
To find max among 10 elements ⇒ 9 (4) i = 3, b > 0 ⇒ 0 > 0 ⇒ false
comparisons are required Here loop terminates.
To find max among n element ⇒ (n–1) Understanding pp function:
comparisons are required ex: = 3 9 81

To find max among 512 element ⇒ (512 –1) tot = 1 81

comparisons are required len = 3


= 511 comparisons. for(i = 0;i < len;i++)
{
Q58 Text Solution: if(arr[i] == 1)
tot = tot*ex;
ex = ex*ex;
}
above code is executed from i=0 to 2(len =3)
(i) i=0
arr[i]= =1
Note:- that arr[i] in tob is same as arr[i] in pp 0 = = 1(false)
and also array contains garbage value initially. ex = ex*ex
Understanding tob function: ex = 3*3
ex = 9
(ii) i = 1
arr[i] == 1
0 == 1(false)
b = 4 2 ex = ex*ex
if (b%2)
]exeutes when b is odd
ex = 9*9 => 81
arr [i] = 1; ex = 81
else
]exeutes when b is even
(iii) i = 2
arr [i] = 0; arr[i] == 1
b
b =
2
]exeutes every time
1 == 1(true)
(1) i = 0, b > 0 ⇒ 4 > 0 ⇒ true(b is even) tot = tot*ex
arr[i] = 0 tot = 1*81
arr[0] = 0 tot = 81
b = b/2 = 4/2 = 2 ex = ex*ex
(2) i =1 b > 0 ⇒ 2 > 0 ⇒ true(b is even) ex = 81*81
arr[i] = 0 81 is returned.
arr[1] = 0
b = b/2 = 2/2 = 1 Q59 Text Solution:
(3) i = 2, b > 0 ⇒ 1 > 0 ⇒ true (b is odd) 1 1 1 1 1

V1 → V2 → V3 → V4 → . ...V99 → V100
arr[i] = 1
Number of edges needed = 99 × 1 = 99.
arr[2] = 1

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 25/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

Q60 Text Solution:


P.NO Arrive Time Burst Time
P1 0 8
P2 0 7
P3 0 2
Number of states = 6
P4 0 4
Gantt chart using SJF:
Q62 Text Solution:
CPU P3 P4 P2 P1
0 2 6 13 21
Time
TAT = Completion time- arrival time
TAT P1 = 21 – 0 = 21
TAT P2 = 13 – 0 = 13
TAT P3 = 2 – 0 = 2
TAT P4 = 6 – 0 = 6
42
Average TAT =
4
= 10. 5
Q63 Text Solution:
Round Robin Given,
Ready Queue − P 1 ; P 2 ; P 3 ; P 4 ; P 1 ; MMAT = 100ns;
P2 ;
TLBAT = 20 ns;
Gantt chart using round robin: Disk R/W = 5000ns;
TLB Hit ratio = 95%;
CPU P1 P2 P3 P4 P1 P2
Page fault rate = 10%;
0 4 8 10 14 18 21
Dirty page 20%
TAT
Average MAT= 0.95 (20 + 100) ns + 0.05[20ns +
TAT P1 = 18
0.9 (100ns + 100ns) + 0.1 (100ns + 0.2 (5000 +
TAT P2 = 21
500)) ns + 0.8 (500) ns]
TAT P3 = 10
Average MAT = 154. 5 ns
TAT P4 = 14
Total = 63
63 Q64 Text Solution:
Average TAT = = 15. 75
4
Block size = 4KB,
Difference = [15.75 – 10.5] = 5.25
Search key = 12 Byte

Q61 Text Solution: BP = 8B

Divisible by 2 strings = ∈, aa, aaaa, aaaaaa, ….. Total number of records = 106

Divisible by 3 strings = ∈, aaa, aaaaaa, ORDER of B+ Tree

aaaaaaaaa, ….. P × BP + (P –1) key < Block size

Divisible by 2 but not 3 strings = a2, a4, a8, a10, P × 8 + (P –1) 12 < 4 ×1024

a12, ….. 8P + 12P – 12 < 4096

DFA design for number of a’s divisible by 2 but 20P – 12 < 4096

not 3: 20P < 4108

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 26/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

GATE

P=⌊ = ⌊205.4⌋
4108
⌋ At t + 30 : 34 KB
20

P = 205 At t + 36 : 36 KB

Minimum number of levels means that we get At t + 42 : 38 KB

maximum number of keys at a block. At t + 48 : 40 KB

(BP) ORDER (P) = 205 At t + 54 : 42 KB

(P – 1) maximum key = 204 At t + 60 : 44 KB

Or (RP)


1st level: ⎪




Total number of Record = 106 (Entries) ⎪


6
⎬ Congestion Avoidance
Total number of Block = ⌈ 204
10
⌉ = 4902 Blocks



2nd level ⎪




Total number of entries = 4902 (No. of 1st level ⎭

block) OR
Total number of blocks = ⌈ = 24 blocks
4902

205

3rd level
Total number of entries = 24 (No. of 2nd level
block)
Total number of Block = ⌈ 205
24
⌉ = 1 block

Here, 3 Block access for 3 level + 1 block access


for accessing the records = 3 + 1 = 4.

Q65 Text Solution:


RTT = 6msec.
WR = 50 km
Slow start threshold = 32 KB
MSS = 2 KB
t=0
(t + 60) m sec. , Wc = ?


At t = 0 : 2 KB ⎪










At t + 6 : 4 KB ⎪

⎬Slow start


At t + 12 : 8 KB ⎪







At t + 18 : 16 KB ⎪




At t + 24 : 32 KB

Android App | iOS App | PW Website

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 27/28
12/6/23, 12:47 PM GATE_GATE PYQ TEST 7_DPP

https://qbg-admin.penpencil.co/finalize-question-paper/preview-pdf 28/28

You might also like