Question 1 |

parsing of the program | |

the code generation | |

the lexical analysis of the program | |

dataflow analysis |

**GATE CS 2011**

**Lexical analysis**

**Discuss it**

Question 2 |

block entire HTTP traffic during 9:00PM and 5 :0OAM | |

block all ICMP traffic | |

stop incoming traffic from a specific IP address but allow outgoing traffic to the same IP address | |

block TCP traffic from a specific user on a multi-user system during 9:00PM and 5:00AM |

**GATE CS 2011**

**Transport Layer**

**Discuss it**

Question 3 |

1/3 | |

1/4 | |

1/2 | |

2/3 |

**GATE CS 2011**

**Probability**

**Discuss it**

Question 4 |

m1: Send an email from a mail client to a mail server m2: Download an email from mailbox server to a mail client m3: Checking email in a web browser Which is the application level protocol used in each activity?

ml: HTTP m2: SMTP m3: POP | |

ml: SMTP m2: FTP m3: HTTP | |

ml: SMTP m2: POP m3: HTTP | |

ml: POP m2: SMTP m3: IMAP |

**GATE CS 2011**

**Application Layer**

**Discuss it**

Question 5 |

Parameter | Language L1 | Language L2 |

Man years needed for development | LOC/10000 | LOC/10000 |

Development cost per man year | Rs. 10,00,000 | Rs. 7,50,000 |

Maintenance time | 5 years | 5 years |

Cost of maintenance per year | Rs. 1,00,000 | Rs. 50,000 |

4000 | |

5000 | |

4333 | |

4667 |

**GATE CS 2011**

**Software Engineering**

**Discuss it**

Question 6 |

t1 > t2 | |

t1 = t2 | |

t1 < t2 | |

nothing can be said about the relation between t1 and t2 |

**Process Management**

**GATE CS 2011**

**Discuss it**

**Abhishek Kumar.**

Question 7 |

234.25 | |

932.50 | |

287.80 | |

122.40 |

**GATE CS 2011**

**Software Engineering**

**Discuss it**

Effort Applied (E) = a_{b}(KLOC)^{bb}[ person-months ] = 2.8 x(40)1.20 = 2.8 x 83.65 = 234.25

Question 8 |

Functional Requirements | |

Non-Functional Requirements | |

Goals of Implementation | |

Algorithms for Software Implementation |

**GATE CS 2011**

**Software Engineering**

**Discuss it**

Question 9 |

Deterministic finite automata(DFA) and Non-deterministic finite automata(NFA) | |

Deterministic push down automata(DPDA)and Non-deterministic push down automata(NPDA) | |

Deterministic single-tape Turing machine and Non-deterministic single-tape Turing machine | |

Single-tape Turing machine and multi-tape Turing machine |

**GATE CS 2011**

**Context free languages and Push-down automata**

**Discuss it**

NDPDA can handle languages or grammars with ambiguity, but DPDA cannot handle languages with ambiguity and any context-free grammar.

Question 10 |

Embed web objects from different sites into the same page | |

Refresh the page automatically after a specified interval | |

Automatically redirect to another page upon download | |

Display the client time as part of the page |

**GATE CS 2011**

**HTML and XML**

**Discuss it**

Question 11 |

. Interrupt from CPU temperature sensor (raises interrupt if CPU temperature is too high) . Interrupt from Mouse(raises interrupt if the mouse is moved or a button is pressed) . Interrupt from Keyboard(raises interrupt when a key is pressed or released) . Interrupt from Hard Disk(raises interrupt when a disk read is completed)Which one of these will be handled at the HIGHEST priority?

Interrupt from Hard Disk | |

Interrupt from Mouse | |

Interrupt from Keyboard | |

Interrupt from CPU temperature sensor |

**Input Output Systems**

**GATE CS 2011**

**Discuss it**

Question 12 |

1.Which one of the following option isRegistration_Num: Unique registration number of each registered student 2.UID: Unique identity number, unique at the national level for each citizen 3.BankAccount_Num: Unique account number at the bank. A student can have multiple accounts or join accounts. This attribute stores the primary account number. 4.Name: Name of the student 5.Hostel_Room: Room number of the hostel

**INCORRECT**?

BankAccount_Num is candidate key | |

Registration_Num can be a primary key | |

UID is candidate key if all students are from the same country | |

If S is a superkey such that S∩UID is NULL then S∪UID is also a superkey |

**GATE CS 2011**

**Database Design(Normal Forms)**

**Discuss it**

Question 14 |

(P'.Q + R') | |

(P + Q'.R') | |

(P'.Q + R) | |

(P.Q + R) |

**GATE CS 2011**

**Digital Logic & Number representation**

**Discuss it**

Question 15 |

9 | |

8 | |

512 | |

258 |

**GATE CS 2011**

**Discuss it**

An n-bit binary counter consists of n flip-flops and can count in binary from 0 to 2^n - 1. (Source: Computer System Architecture by Morris Mano)

2^n ≥ 258

Question 16 |

On per-thread basis, the OS maintains only CPU register state | |

The OS does not maintain a separate stack for each thread | |

On per-thread basis, the OS does not maintain virtual memory state | |

On per-thread basis, the OS maintains only scheduling and accounting information |

**Process Management**

**GATE CS 2011**

**Discuss it**

**Option (A):**as you can see in the above diagram, NOT ONLY CPU Register but stack and code files, data files are also maintained. So, option (A) is not correct as it says OS maintains only CPU register state.

**Option (B):**according to option (B), OS does not maintain a separate stack for each thread. But as you can see in above diagram, for each thread, separate stack is maintained. So this option is also incorrect.

**Option (C):**according to option (C), the OS does not maintain virtual memory state. And It is correct as Os does not maintain any virtual memory state for individual thread.

**Option (D):**according to option (D), the OS maintains only scheduling and accounting information. But it is not correct as it contains other information like cpu registers stack, program counters, data files, code files are also maintained. Reference: https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/4_Threads.html This solution is contributed by

**Nitika Bansal**

Question 17 |

K4 is planar while Q3 is not | |

Both K4 and Q3 are planar | |

Q3 is planar while K4 is not | |

Neither K4 nor Q3 are planar |

**GATE CS 2011**

**Graph Theory**

**Discuss it**

Question 18 |

R = 0 | |

R < 0 | |

R >= 0 | |

R > 0 |

**GATE CS 2011**

**Probability**

**Discuss it**

**V**

**ariance**measures how far a set of numbers is spread out. (A variance of zero indicates that all the values are identical.) A non-zero variance is always positive:

Question 19 |

Finite state automata | |

Deterministic pushdown automata | |

Non-Deterministic pushdown automata | |

Turing Machine |

**GATE CS 2011**

**Lexical analysis**

**Discuss it**

Question 20 |

21ns | |

30ns | |

23ns | |

35ns |

**Memory Management**

**GATE CS 2011**

**Discuss it**

Let P be the page fault rate Effective Memory Access Time = p * (page fault service time) + (1 - p) * (Memory access time) = ( 1/(10^6) )* 10 * (10^6) ns + (1 - 1/(10^6)) * 20 ns = 30 ns (approx)

Question 21 |

Immediate Addressing | |

Register Addressing | |

Register Indirect Scaled Addressing | |

Base Indexed Addressing |

**GATE CS 2011**

**Computer Organization and Architecture**

**Discuss it**

Question 22 |

char c[] = "GATE2011"; char *p =c; printf("%s", p + p[3] - p[1]) ;

GATE2011 | |

E2011 | |

2011 | |

011 |

**GATE CS 2011**

**Discuss it**

Question 23 |

A | |

B | |

C | |

D |

**GATE CS 2011**

**Discuss it**

Question 24 |

^{n}q

^{n}|n N}). Then which of the following is ALWAYS regular? (A) P Q (B) P - Q (C) * - P (D) * - Q

A | |

B | |

C | |

D |

**GATE CS 2011**

**Context free languages and Push-down automata**

**Discuss it**

**Vineet Purswani.**

Question 25 |

The algorithm uses dynamic programming paradigm | |

The algorithm has a linear complexity and uses branch and bound paradigm | |

The algorithm has a non-linear polynomial complexity and uses branch and bound paradigm | |

The algorithm uses divide and conquer paradigm. |

**GATE CS 2011**

**Discuss it**

Question 26 |

**NOT TRUE**?

Push Down Automata (PDA) can be used to recognize L1 and L2 | |

L1 is a regular language | |

All the three languages are context free | |

Turing machine can be used to recognize all the three languages |

**GATE CS 2011**

**Context free languages and Push-down automata**

**Discuss it**

L2 is not regular, can be proved using pumping lemma (refer to Ullman). But L2 is CFL.

S → AB A → 0A|ε B → 1B|εL3 is not CFL, can be proved using pumping lemma (refer to Ullman). But L3 is Recursive. Every regular language is also a CFL. So PDA can be used to recognized L1 and L2. As a CFL and Regular language is algo a Recursive language. Hence, Turing machine can be used to recognise L1, L2 and L3. L2 is not regular, can be proved using pumping lemma (refer to Ullman). But L2 is CFL.

S → AB A → 0A|ε B → 1B|εL3 is not CFL, can be proved using pumping lemma (refer to Ullman). But L3 is Recursive. Every regular language is also a CFL. So PDA can be used to recognised L1 and L2. As a CFL and Regular language is algo a Recursive language. Hence, turing machine can be used to recognise L1, L2 and L3. Source: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html

Question 27 |

A | |

B | |

C | |

D |

**GATE CS 2011**

**Discuss it**

Question 28 |

Initialize the address register Initialize the count to 500 LOOP: Load a byte from device Store in memory at address given by address register Increment the address register Decrement the count If count != 0 go to LOOPAssume that each statement in this program is equivalent to machine instruction which takes one clock cycle to execute if it is a non-load/store instruction. The load-store instructions take two clock cycles to execute. The designer of the system also has an alternate approach of using DMA controller to implement the same transfer. The DMA controller requires 20 clock cycles for initialization and other overheads. Each DMA transfer cycle takes two clock cycles to transfer one byte of data from the device to the memory. What is the approximate speedup when the DMA controller based design is used in place of the interrupt driven program based input-output?

3.4 | |

4.4 | |

5.1 | |

6.7 |

**GATE CS 2011**

**Computer Organization and Architecture**

**Discuss it**

Explanation:STATEMENT CLOCK CYCLE(S) NEEDEDInitialize the address register 1 Initialize the count to 500 1 LOOP:Loada byte from device 2Storein memory at address given by address register 2 Increment the address register 1 Decrement the count 1 If count != 0 go to LOOP 1 Interrrupt driven transfer time = 1+1+500×(2+2+1+1+1) = 3502 DMA based transfer time = 20+500*2 = 1020 Speedup = 3502/1020 ≈ 3.4 Source: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html

Question 29 |

0 | |

1 | |

n! | |

(1/(n+1)).2nCn |

**GATE CS 2011**

**Discuss it**

Question 30 |

P(x) = ¬(x=1)∧∀y(∃z(x=y*z)⇒(y=x)∨(y=1))

P(x) being true means that x is a prime number | |

P(x) being true means that x is a number other than 1 | |

P(x) is always true irrespective of the value of x | |

P(x) being true means that x has exactly two factors other than 1 and x |

**GATE CS 2011**

**Propositional and First Order Logic.**

**Discuss it**

So the predicate is evaluated as P(x) = (¬(x=1))∧(∀y(∃z(x=y*z)⇒((y=x)∨(y=1)))) P(x) being true means x ≠ 1 and For all y if there exists a z such that x = y*z then y must be x (i.e. z=1) or y must be 1 (i.e. z=x) It means that x have only two factors first is 1 and second is x itself. This predicate defines the prime number.Source: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html

Question 32 |

SELECT Y FROM T WHERE X=7;

127 | |

255 | |

129 | |

257 |

**GATE CS 2011**

**SQL**

**Discuss it**

Question 33 |

*X*= {

*x*

_{1},

*x*

_{2},...,

*x*

_{n}}. Let

*μ*

_{x}be the mean and

*σ*

_{x}be the standard deviation of

*X*. Let another finite sequence

*Y*of equal length be derived from this as

*y*

_{i}

*=*

*a*x*

_{i}

*+*

*b*, where

*a*and

*b*are positive constants. Let

*μ*

_{y}be the mean and

*σ*

_{y}be the standard deviation of this sequence. Which one of the following statements is INCORRECT?

Index position of mode of X in X is the same as the index position of mode of Y in Y. | |

Index position of median of X in X is the same as the index position of median of Y in Y. | |

μ_{y} = aμ_{x}+b | |

σ_{y} = aσ_{x}+b |

**GATE CS 2011**

**Probability**

**Discuss it**

Question 34 |

1/5 | |

4/25 | |

1/4 | |

2/5 |

**GATE CS 2011**

**Probability**

**Discuss it**

Question 35 |

Process Arrival time Burst Time P0 0 ms 9 ms P1 1 ms 4 ms P2 2 ms 9 msThe pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?

5.0 ms | |

4.33 ms | |

6.33 | |

7.33 |

**GATE CS 2011**

**CPU Scheduling**

**Discuss it**

Question 36 |

2 | |

9 | |

5 | |

3 |

**GATE CS 2011**

**Computer Organization and Architecture**

**Discuss it**

R1←c, R2←d, R2←R1+R2, R1←e, R2←R1-R2

Now to calculate the rest of the expression we must load a and b into the registers but we need the

content of R2 later.

So we must use another Register.

R1←a, R3←b, R1←R1-R3, R1←R1+R2

Source: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html

Question 37 |

f3, f2, f4, f1 | |

f3, f2, f1, f4 | |

f2, f3, f1, f4 | |

f2, f3, f4, f1 |

**GATE CS 2011**

**Discuss it**

Question 38 |

248000 | |

44000 | |

19000 | |

25000 |

**GATE CS 2011**

**Discuss it**

Question 39 |

Ordered indexing will always outperform hashing for both queries | |

Hashing will always outperform ordered indexing for both queries | |

Hashing will outperform ordered indexing on Q1, but not on Q2 | |

Hashing will outperform ordered indexing on Q2, but not on Q1. |

**GATE CS 2011**

**ER and Relational Models**

**Discuss it**

Question 40 |

1, 4, 3 | |

3, 7, 3 | |

7, 3, 2 | |

1, 2, 3 |

**GATE CS 2011**

**Linear Algebra**

**Discuss it**

The Eigen values of a triangular matrix are given by its diagonal entries. We can also calculate (or verify given answers) using characteristic equation obtained by |M - λI| = 0.

1-λ 2 3

0 4-λ 7 = 0

0 0 3-λ

Which means

(1-λ)(4-λ)(3-λ) = 0

Question 41 |

4.0 | |

2.5 | |

1.1 | |

3.0 |

**GATE CS 2011**

**Computer Organization and Architecture**

**Discuss it**

Pipeline registers overhead is not counted in normal time execution So the total count will be 5+6+11+8= 30 [without pipeline] Now, for pipeline, each stage will be of 11 n-sec (+ 1 n-sec for overhead). and, in steady state output is produced after every pipeline cycle. Here, in this case 11 n-sec. After adding 1n-sec overhead, We will get 12 n-sec of constant output producing cycle. dividing 30/12 we get 2.5

Question 42 |

*a*} is given as following.

L={| k>0, and n is a positive integer constant}What is the minimum number of states needed in DFA to recognize L?

k+1 | |

n+1 | |

2^(n+1) | |

2^(k+1) |

**GATE CS 2011**

**Regular languages and finite automata**

**Discuss it**

Question 43 |

4864 bits | |

6144 bits | |

6656 bits | |

5376 bits |

**GATE CS 2011**

**Computer Organization and Architecture**

**Discuss it**

Cache size = 8 KB Block size = 32 bytes Number of cache lines = Cache size / Block size = (8 × 1024 bytes)/32 = 256 total bits required to store meta-data of 1 line = 1 + 1 + 19 = 21 bits total memory required = 21 × 256 = 5376 bitsSource: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html

Question 44 |

0.50 s | |

1.50 s | |

1.25 s | |

1.00 s |

**Input Output Systems**

**GATE CS 2011**

**Discuss it**

Question 45 |

A | |

B | |

C | |

D |

**GATE CS 2011**

**Regular languages and finite automata**

**Discuss it**

Question 46 |

Borrower Bank_Manager Loan_Amount Ramesh Sunderajan 10000.00 Suresh Ramgopal 5000.00 Mahesh Sunderajan 7000.00What is the output of the following SQL query?

SELECT Count(*) FROM ( (SELECT Borrower, Bank_Manager FROM Loan_Records) AS S NATURAL JOIN (SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T );

3 | |

9 | |

5 | |

6 |

**GATE CS 2011**

**SQL**

**Discuss it**

See Question 3 of http://www.geeksforgeeks.org/database-management-systems-set-4/

Question 47 |

/* This function computes the roots of a quadratic equation a.x^2 + b.x + c = . The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases. (i) When coefficient a is zero irrespective of discriminant (ii) When discreminant is positive (iii) When discriminant is zero (iv) When discriminant is negative. Only in case (ii) and (iii) the stored roots are valid. Otherwise 0 is stored in roots. The function returns 0 when the roots are valid and -1 otherwise. The function also ensures root1 >= root2 int get_QuadRoots( float a, float b, float c, float *root1, float *root2); */A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant. Which one of the following option provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?

T1,T2,T3,T6 | |

T1,T3,T4,T5 | |

T2,T4,T5,T6 | |

T2,T3,T4,T5 |

**GATE CS 2011**

**Software Engineering**

**Discuss it**

Question 48 |

unsigned int foo(unsigned int n, unsigned int r) { if (n > 0) return (n%r + foo (n/r, r )); else return 0; }What is the return value of the function foo when it is called as foo(345, 10) ?

345 | |

12 | |

5 | |

3 |

**Recursion**

**GATE CS 2011**

**Discuss it**

Question 49 |

unsigned int foo(unsigned int n, unsigned int r) { if (n > 0) return (n%r + foo (n/r, r )); else return 0; }What is the return value of the function foo when it is called as foo(513, 2)?

9 | |

8 | |

5 | |

2 |

**Recursion**

**GATE CS 2011**

**Discuss it**

Question 50 |

000 | |

001 | |

010 | |

011 |

**GATE CS 2011**

**Digital Logic & Number representation**

**Discuss it**

D | Q(t+1) |

0 | 0 |

1 | 1 |

Question 51 |

3 | |

4 | |

5 | |

6 |

**GATE CS 2011**

**Digital Logic & Number representation**

**Discuss it**

Question 52 |

(3, 2, 0, 2, 5) | |

(3, 2, 0, 2, 6) | |

(7, 2, 0, 2, 5) | |

(7, 2, 0, 2, 6) |

**GATE CS 2011**

**Network Layer**

**Discuss it**

See Question 3 of http://www.geeksforgeeks.org/computer-networks-set-3/

Question 53 |

3 | |

9 | |

10 | |

Infinite |

**GATE CS 2011**

**Network Layer**

**Discuss it**

Question 54 |

1/12(11n^2 – 5n) | |

n^2 – n + 1 | |

6n – 11 | |

2n + 1 |

**GATE CS 2011**

**Discuss it**

Question 55 |

11 | |

25 | |

31 | |

41 |

**GATE CS 2011**

**Discuss it**

Question 56 |

**Inexplicable**

incomprehensible | |

indelible | |

inextricable | |

infallible |

**GATE CS 2011**

**English**

**Discuss it**

Question 57 |

**TRUE**?

P ^{2} = Q^{3}R^{2} | |

Q ^{2} = PR | |

Q ^{2} = R^{3}P^{2} | |

R = P ^{2}Q^{2} |

**GATE CS 2011**

**General Aptitude**

**Discuss it**

It is given thatLog(P) = (1/2)Log(Q) = (1/3)Log(R)LetLog(P) = (1/2)Log(Q) = (1/3)Log(R) = CLet the base of log beBP = BWhich means^{C}Q = B^{2C}R = B^{3C}Q^{2}= PR

Question 58 |

**I Contemplated ____________ Singapore for my vacation but decided against it.**

to visit | |

having to visit | |

visiting | |

for a visit |

**GATE CS 2011**

**English**

**Discuss it**

Question 59 |

If you are trying to make a strong impression on your audience, you cannot do so by being understated, tentative or_____________.

Hyperbolic | |

Restrained | |

Argumentative | |

Indifferent |

**GATE CS 2011**

**English**

**Discuss it**

Question 60 |

**Amalgamate**

merge | |

split | |

collect | |

separate |

**GATE CS 2011**

**Discuss it**

Question 61 |

how to write a letter of condolence | |

what emotional stages are passed through in the healing process | |

what the leading causes of death are | |

Show to give support to a grieving friend |

**GATE CS 2011**

**English**

**Discuss it**

Question 62 |

P | |

Q | |

R | |

S |

**GATE CS 2011**

**General Aptitude**

**Discuss it**

P = 800*0.4*50 = 16000 Q = 600*0.5*40 = 12000 R = 300*0.4*30 = 3600 S = 200*0.8*20 = 3200

Question 63 |

5 | |

4 | |

7 | |

6 |

**GATE CS 2011**

**General Aptitude**

**Discuss it**

Question 64 |

4 | |

5 | |

6 | |

7 |

**GATE CS 2011**

**General Aptitude**

**Discuss it**

Let each truck can take at most x units. Let the daily order be y and let backlog be z. 7*4*x = 4y + z 3*10*x = 10y + z We need value of (5y + z)/5 in terms of x. We can get value of y by subtracting first from second 6y = 2x y = x/3 We can get value of z by substituting value of y in first equation 4y + z = 28x 4(x/3) + z = 28x z = (80/3)x So the value of (5y + z)/5 is 5*(x/3) + (80/3)x which is 17/3 So almost 6 days needed.

Question 65 |

7.58 litres | |

7.84 litres | |

7 litres | |

7.29 litres |

**GATE CS 2011**

**General Aptitude**

**Discuss it**