# Recent questions tagged gate2013

1
A computer uses $46-bit$ virtual address, $32-bit$ physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table ($T1$), which occupies exactly one page. Each entry of $T1$ stores the base ... needed to guarantee that no two synonyms map to different sets in the processor cache of this computer? $2$ $4$ $8$ $16$
2
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and one destination operand. Assume that all variables are dead after this code segment. c = a + b; d ... this code segment without any spill to memory? Do not apply any optimization other than optimizing register allocation. 3 4 5 6
3
The procedure given below is required to find and replace certain characters inside an input character string supplied in array $A$. The characters to be replaced are supplied in array $oldc$, while their respective replacement characters are supplied in array $newc$. Array $A$ has a ... test cases will be successful in exposing the flaw in this procedure? None $2$ only $3$ and $4$ only $4$ only
4
Relation $R$ has eight attributes $\text{ABCDEFGH}$. Fields of $R$ contain only atomic values. $F$ = $\text{{CH$\rightarrow$G, A$\rightarrow$BC, B$\rightarrow$CFH, E$\rightarrow$A, F$\rightarrow$EG}}$ is a set of functional dependencies $(FDs)$ so that $F^+$ is exactly the ... in $1NF$, but not in $2NF$. in $2NF$, but not in $3NF$. in $3NF$, but not in $\text{BCNF}$. in $\text{BCNF}$.
5
The current erection cost of a structure is Rs. 13,200. If the labour wages per day increase by 1/5 of the current wages and the working hours decrease by 1/24 of the current period, then the new cost of erection in Rs. is 16,500 15,180 11,000 10,120
6
A tourist covers half of his journey by train at $60$ $km/h$, half of the remainder by bus at $30$ $km/h$ and the rest by cycle at $10$ $km/h$. The average speed of the tourist in $km/h$ during his entire journey is $36$ $30$ $24$ $18$
7
After several defeats in wars, Robert Bruce went in exile and wanted to commit suicide. Just before committing suicide, he came across a spider attempting tirelessly to have its net. Time and again, the spider failed but that did not deter it to refrain from ... is the pillar of success. Honesty is the best policy. Life begins and ends with adventures. No adversity justifies giving up hope.
8
Out of all the $2$-digit integers between $1$ and $100,$ a $2$-digit number has to be selected at random. What is the probability that the selected number is not divisible by $7$ ? $\left(\dfrac{13}{90}\right)$ $\left(\dfrac{12}{90}\right)$ $\left(\dfrac{78}{90}\right)$ $\left(\dfrac{77}{90}\right)$
9
Find the sum of the expression $\frac{1}{\sqrt{1}+\sqrt{2}}+\frac{1}{\sqrt{2}+\sqrt{3}}+\frac{1}{\sqrt{3}+\sqrt{4}}+............+\frac{1}{\sqrt{80}+\sqrt{81}}$ $7$ $8$ $9$ $10$
10
Choose the grammatically INCORRECT sentence: He is of Asian origin. They belonged to Africa. She is an European. They migrated from India to Australia.
11
Were you a bird, you ___________________ in the sky. would fly shall fly should fly shall have flown
12
What will be the maximum sum of $44, 42, 40, \dots$ ? $502$ $504$ $506$ $500$
13
Complete the sentence: Universalism is to particularism as diffuseness is to _______________. specificity neutrality generality adaptation
14
Which one of the following options is the closest in meaning to the word given below? Nadir Highest Lowest Medium Integration
15
Relation $R$ has eight attributes $\text{ABCDEFGH}$. Fields of $R$ contain only atomic values. $F$= $\text{{CH→G, A→BC, B→CFH, E→A, F→EG}}$ is a set of functional dependencies $(FDs)$ so that $F^+$ is exactly the set of $FDs$ that hold for $R$. How many candidate keys does the relation $R$ have? $3$ $4$ $5$ $6$
16
The procedure given below is required to find and replace certain characters inside an input character string supplied in array $A$. The characters to be replaced are supplied in array $oldc$, while their respective replacement characters are supplied in array $newc$. Array $A$ ... test cases given above, how many test cases will be able to capture the flaw? Only one Only two Only three All four
17
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and one destination operand. Assume that all variables are dead after this code segment. c = a + b; d = c ... place to another while preserving correctness. What is the minimum number of spills to memory in the compiled code? 0 1 2 3
18
A RAM chip has a capacity of 1024 words of 8 bits each (1K × 8). The number of 2 × 4 decoders with enable line needed to construct a 16K × 16 RAM from 1K × 8 RAM is (A) 4 (B) 5 (C) 6 (D) 7
19
The preorder traversal sequence of a binary search tree is $30, 20, 10, 15, 25, 23, 39, 35, 42$. Which one of the following is the postorder traversal sequence of the same tree? $10, 20, 15, 23, 25, 35, 42, 39, 30$ $15, 10, 25, 23, 20, 42, 35, 39, 30$ $15, 20, 10, 23, 25, 42, 35, 39, 30$ $15, 10, 23, 25, 20, 35, 42, 39, 30$
20
Which of the following is/are undecidable? $G$ is a CFG. Is $L(G) = \phi$? $G$ is a CFG. Is $L(G) = \Sigma^*$? $M$ is a Turing machine. Is $L(M)$ regular? $A$ is a DFA and $N$ is an NFA. Is $L(A) = L(N)$? 3 only 3 and 4 only 1, 2 and 3 only 2 and 3 only
21
Consider the following two sets of LR(1) items of an LR(1) grammar.$\begin{array}{l|l} X \rightarrow c.X, c/d &X → c.X, \$\\ X \rightarrow .cX, c/d& X → .cX, \$\\ X \rightarrow .d, c/d & X → .d, \$ ... . Cannot be merged since goto on c will lead to two different sets. $1$ only $2$ only $1$ and $4$ only $\text{1, 2, 3}$ and $4$
22
A certain computation generates two arrays a and b such that $a[i] = f(i)$ for $0 \leq i < n$ and $b[i] = g(a[i])$ for $0 \leq i < n$. Suppose this computation is decomposed into two concurrent processes $X$ and $Y$ such that $X$ computes the array $a$ and $Y$ computes the array $b$. The processes ... R); } EntryY(R, S) { V(S); P(R); } ExitX(R, S) { V(R); P(S); } EntryY(R, S) { V(S); P(R); }
23
The following figure represents access graphs of two modules M1 and M2. The filled circles represent methods and the unfilled circles represent attributes. If method $m$ is moved to module M2 keeping the attributes where they are, what can we say about the average ... up but coupling is reduced. (C) Average cohesion goes down and coupling also reduces. (D) Average cohesion and coupling increase.
24
In an IPv4 datagram, the $M$ bit is $0$, the value of $HLEN$ is $10$, the value of total length is $400$ and the fragment offset value is $300$. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are: Last fragment, $2400$ and $2789$ First fragment, $2400$ and $2759$ Last fragment, $2400$ and $2759$ Middle fragment, $300$ and $689$
25
Determine the maximum length of the cable (in km) for transmitting data at a rate of $500$ Mbps in an Ethernet LAN with frames of size $10,000$ bits. Assume the signal speed in the cable to be $2,00,000$ km/s. $1$ $2$ $2.5$ $5$
26
Consider the following relational schema. Students(rollno: integer, sname: string) Courses(courseno: integer, cname: string) Registration(rollno: integer, courseno: integer, percent: real) Which of the following queries are equivalent to this query in English? Find the distinct names of all students who ... I, II, III and IV I, II and III only I, II and IV only II, III and IV only
27
A shared variable $x$, initialized to zero, is operated on by four concurrent processes $W, X, Y, Z$ as follows. Each of the processes $W$ and $X$ reads $x$ from memory, increments by one, stores it to memory, and then terminates. Each of the processes $Y$ and $Z$ ... $S$ is initialized to two. What is the maximum possible value of $x$ after all processes complete execution? $-2$ $-1$ $1$ $2$
Consider the DFA $A$ given below. Which of the following are FALSE? Complement of $L(A)$ is context-free. $L(A) = L((11^*0+0)(0 + 1)^*0^*1^*)$ For the language accepted by $A, A$ is the minimal DFA. $A$ accepts all strings over $\{0, 1\}$ of length at least $2$. 1 and 3 only 2 and 4 only 2 and 3 only 3 and 4 only
Consider the following languages. $L_1 = \left \{ 0^p1^q0^r \mid p,q,r \geq 0 \right \}$ $L_2 = \left \{ 0^p1^q0^r \mid p,q,r \geq 0, p\neq r \right \}$ Which one of the following statements is FALSE? $L_2$ is context-free. $L_1\cap L_2$ is context-free. Complement of $L_2$ is recursive. Complement of $L_1$ is context-free but not regular.
Consider the following function: int unknown(int n){ int i, j, k=0; for (i=n/2; i<=n; i++) for (j=2; j<=n; j=j*2) k = k + n/2; return (k); } The return value of the function is $\Theta(n^2)$ $\Theta(n^2\log n)$ $\Theta(n^3)$ $\Theta(n^3\log n)$