### Computer Science (GATE Exam) 2011 - Previous Question Paper Solution

 Description: GATE Exam Previous Year Question Paper Solution Computer Science(CS) - 2011 Number of Questions: 64 Created by: Aliensbrain Bot Tags: Previous Year Paper Computer Science GATE CS
Attempted 0/63 Correct 0 Score 0

The simplified SOP (Sum of Product) from the Boolean expression

$$(P + \bar{Q} + \bar{R}) . (P + \bar{Q} + R) . (P + Q +\bar{R})$$ is

1. $(\bar{P}.Q+\bar{R})$

2. $(P+\bar{Q}.\bar{R})$

3. $(\bar{P}.Q+R)$

4. $(P.Q+R)$

Correct Option: B
Explanation:

The minimum number of D flip-flops needed to design a mod-258 counter is

1. 9

2. 8

3. 512

4. 258

Correct Option: A
Explanation:

$2^n \ge 258 \Rightarrow n = 9$

A thread is usually defined as a ‘light weight process’ because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the followings is TRUE?

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

2. The OS does not maintain a separate stack for each thread.

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

4. On per thread basis, the OS maintains only scheduling and accounting information.

Correct Option: A

Which of the following circuits is NOT equivalent to a 2-input XNOR (exclusive NOR) gate?

Correct Option: D
Explanation:

All options, except option ‘4’, give EX-NOR gates.

K4 and Q3 are graphs with the following structures

Which one of the following statements is TRUE in relation to these graphs?

1. K4 is planar while Q3 is not.

2. Both K4 and Q3 are planar.

3. Q3 is planar while K4 is not.

4. Neither K4 not Q3 is planar.

Correct Option: B
Explanation:

Both K4 and Q3 are planar.

If the difference between the expectation of the square of a random variable $\left(E\left[X^2\right]\right)$ and the square of the expectation of the random variable $\left(E\left[X\right]\right)^2$ is denoted by $R$, then

1. $R=0$

2. $R<0$

3. $R \geq 0$

4. $R > 0$

Correct Option: C

The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?

1. Finite state automata

2. Deterministic pushdown automata

3. Non-Deterministic pushdown automata

4. Turing machine

Correct Option: A
Explanation:

Lexical Analysis is implemented by finite automata.

What does the following fragment of C-program print?
char c[ ] "GATE2011";
char *p =c;
printf "%s", p+p [3] - p[1];

1. GATE2011

2. E2011

3. 2011

4. 011

Correct Option: C

Consider a hypothetical processor with an instruction of type LW R1, 20(R2), which during execution reads a 32-bit word from memory and stores it in a 32-bit register R1. The effective address of the memory location is obtained by the addition of constant 20 and the contents of register R2. Which of the following best reflects the addressing mode implemented by this instruction for the operand in memory?

Correct Option: D
Explanation:

Here, 20 will act as base and content of R2 will be index.

A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT

1. block entire HTTP traffic during 9:00 PM and 5:00 AM

2. block all ICMP traffic

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

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

Correct Option: A
Explanation:

Since it is a layer 4 firewall, it cannot block application layer protocol like HTTP.

Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 106 memory accesses, what is the effective access time for the memory?

1. 21ns

2. 30ns

3. 23ns

4. 35ns

Correct Option: B
Explanation:

P = page fault rate
EA = p×page fault service time

• (1 - p)×Memory access time = $\dfrac{1}{10^6} \times 10\times 10^6 +\left( 1 - \dfrac{1}{10^6}\right)\times20 \equiv 29.9ns$

A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?

Correct Option: B
Explanation:

Heap is a complete binary tree

In a compiler, keywords of a language are recognized during

1. parsing of the program

2. the code generation

3. the lexical analysis of the program

4. dataflow analysis

Correct Option: C
Explanation:

Any identifier is also a token, so it is recognized in lexical analysis.

An algorithm to find the length of the longest monotonically increasing sequence of numbers in an array $A[0:n-1]$ is given below.

Let $L_i$, denote the length of the longest monotonically increasing sequence starting at index $i$ in the array.

Initialize $L_{n-1} = 1$.

For all $i$ such that $0 \leq i \leq n-2$

$L_i = \begin{cases} 1+ L_{i+1} & \quad\text{if A[i] < A[i+1]} \\ 1 & \quad\text{Otherwise}\end{cases}$

Finally the the length of the longest monotonically increasing sequence is $\text{Max} :(L_0, L_1, \dots , L_{n-1}).$

Which of the following statements is TRUE?

1. The algorithm uses dynamic programming paradigm.

2. The algorithm has a linear complexity and uses branch and bound paradigm.

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

4. The algorithm uses divide and conquer paradigm.

Correct Option: A

If two fair coins are flipped and at least one of the outcomes is known to be a head, what is the probability that both outcomes are heads?

1. 1/3

2. 1/4

3. 1/2

4. 2/3

Correct Option: A
Explanation:

Sample space = {HH, HT, TH}
Required probability =$\dfrac{1}{3}$

Consider different activities related to email.
m1: Send an email from a mail client to a mail server
m3: Checking email in a web browser
Which is the application level protocol used in each activity?

1. m1: HTTP m2:SMTP m3:POP

2. m1: SMTP m2:FTP m3:HTTP

3. m1: SMTP m2: POP m3: HTTP

4. m1: POP m2: SMTP m3:IMAP

Correct Option: C
Explanation:

Sending an email will be done through user agent and message transfer agent by SMTP, downloading an email from mail box is done through POP, checking email in a web browser is done through HTTP.

Let $P$ be a regular language and $Q$ be a context-free language such that $Q \subseteq P$. (For example, let $P$ be the language represented by the regular expression $p^q^$ and $Q$ be ${p^nq^n \mid n \in N})$. Then which of the following is ALWAYS regular?

1. $P \cap Q$

2. P - Q

3. $P-Q$

4. $\Sigma^*-Q$

Correct Option: C
Explanation:

$\Sigma^*-P$ is the complement of P so it is always regular,
since regular languages are closed under complementation

Which of the following pairs have DIFFERENT expressive power?

1. Deterministic finite automata (DFA) and Non-deterministic finite automata (NFA)

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

3. Deterministic single-tape Turing machine and Non-deterministic single tape Turing machine

4. Single-tape Turing machine and multi-tape Turing machine

Correct Option: B
Explanation:

NPDA is more powerful than DPDA.

Which of the following is NOT desired in a good Software Requirement Specifications (SRS) document?

1. Functional Requirements

2. Non Functional Requirements

3. Goals of Implementation

4. Algorithms for Software Implementation

Correct Option: D

Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?

1. t1 > t2

2. t1 = t2

3. t1 < t2

4. Nothing can be said about the relation between t1 and t2

Correct Option: C
Explanation:

Process switching also involves mode changing.

Consider the matrix as given below.

$$\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 7 \\ 0 & 0 & 3\end{bmatrix}$$

Which one of the following options provides the CORRECT values of the eigenvalues of the matrix?

1. 1, 4, 3

2. 3, 7, 3

3. 7, 3, 2

4. 1, 2, 3

Correct Option: A
Explanation:

Given matrix is an upper triangular matrix and its diagonal elements are its eigen values, i.e. 1, 4, 3.

HTML (Hyper Text Markup Language) has language elements which permit certain actions other than describing the structure of the web document. Which one of the following actions is NOT supported by pure HTML (without any server or client side scripting) pages?

1. Embed web objects from different sites into the same page

2. Refresh the page automatically after a specified interval

4. Display the client time as part of the page

Correct Option: D

A company needs to develop digital signal processing software for one of its newest inventions. The software is expected to have 40000 lines of code. The company needs to determine the effort in person-months needed to develop this software using the basic COCOMO model. The multiplicative factor for this model is given as 2.8 for the software development on embedded systems, while the exponentiation factor is given as 1.20. What is the estimated effort in person-months?

1. 234.25

2. 932.50

3. 287.80

4. 122.40

Correct Option: A
Explanation:

Effort person per month
= $\alpha.$(kDSI)B
KDSI = kilo LOC
= 2.8×(40)1.20
= 2.8×83.6511
= 234.22 person per month

Definition of a language $L$ with alphabet ${a}$ is given as following.

$$L = \left\{a^{nk} \mid k > 0, :: and :: n \text{ is a positive integer constant} \right\}$$

What is the minimum number of states needed in a DFA to recognize $L$?

1. k+1

2. n+1

3. 2n+1

4. 2k+1

Correct Option: B
Explanation:

Let n = 3 and k=1

(n + 1) states

Consider an instruction pipeline with four stages (S1, S2, S3 and S4), each with combinational circuit only. The pipeline registers are required between each stage and at the end of the last stage. Delays for the stages and for the pipeline registers are as given in the figure:

What is the approximate speed up of the pipeline in steady state under ideal conditions when compared to the corresponding non-pipeline implementation?

1. 4.0

2. 2.5

3. 1.1

4. 3.0

Correct Option: B
Explanation:

$\dfrac(5+6+11+8){11+1} = \dfrac{30}{12} = 2.5$

An application loads 100 libraries at startup. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm. If all 100 libraries are loaded from random locations on the disk, how long does it take to load all libraries? (The time to transfer data from the disk block once the head has been positioned at the start of the block may be neglected)

1. 0.50 s

2. 1.50 s

3. 1.25 s

4. 1.00 s

Correct Option: B
Explanation:

6000 rotations ________ 60 sec
1 rotation ________10 ms
$\therefore$Rotational latency = 5 ms
Time for one disk access = 15 ms
Time to load all libraries = 15×100 = 1500 ms = 1.5 sec

An 8 KB direct mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following.
1 Valid bit
1 Modified bit
As many bits as the minimum needed to identify the memory block mapped in the cache.
What is the total size of memory needed at the cache controller to store metadata (tags) for the cache?

1. 4864 bits

2. 6144 bits

3. 6656 bits

4. 5376 bits

Correct Option: D
Explanation:

Required answer = 256×19 + 2 = 5376 bits

A computer handles several interrupt sources of which the following are relevant for this question.
Interrupt from CPU temperature sensor
Interrupt from Mouse
Interrupt from Keyboard
Interrupt from Hard Disk

1. Interrupt from Hard Disk

2. Interrupt from Mouse

3. Interrupt from Keyboard

4. Interrupt from CPU temp sensor

Correct Option: D

We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?

1. 0

2. 1

3. n!

4. $\frac{1} {n+1} .^{2n}C_n$

Correct Option: D

A deterministic finite automation DFAD with alphabet $\sum$ is given below:

Which of the following finite state machines is a valid minimal DFA which accepts the same language as D?

Correct Option: A
Explanation:

Options B and C will accept the string b.
Option – D will accept the string “bba”.
Both are invalid strings.
So, the minimized DFA is option A.

Consider a relational table with a single record for each registered student with the following attributes.

1. Registration_Number: Unique registration number for each registered student
2. UID: Unique Identity number, unique at the national level for each citizen
3. BankAccount_Number: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attributes stores the primary account number
4. Name: Name of the Student
5. Hostel_Room: Room number of the hostel Which of the following options is INCORRECT?
1. BankAccount_Number is a candidate key

2. Registration_Number can be a primary key

3. UID is a candidate key if all students are from the same country

4. If S is a superkey such that S UID $\cap$ is NULL then S $\cup$ UID is also a superkey

Correct Option: A
Explanation:

In case two students hold joint account then BankAccount_Num will not uniquely determine other attributes.

A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with L1. The product will have to be maintained for five years. Various parameters for the company are given in the table below.

Parameter Language L1 Language L2
Man years needed for development LOC/10000 LOC/10000
Development Cost per 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

Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2?

1. 4000

2. 5000

3. 4333

4. 4667

Correct Option: B
Explanation:

LOC L1 = x
2 L = 2x
Total cost of project
$\dfrac{x}{10000}\times1000000 + 5 \times 100000 = \dfrac{2x}{10000}\times750000+50000\times5$
100x + 500000 = 150x + 250000
$\Rightarrow$50x = 500000 – 250000
$\therefore$        $x = \dfrac{250000}{50} \Rightarrow x = 5000$

Four matrices M1, M2, M3, and M4 have dimensions p x q, q x r, r x s, and s x t respectively can be multiplied in several ways with different number of total scalar multiplications. For example, when multiplied as ((M1 x M2) x (M3 x M4)) total number of scalar multiplications is pqr + rst + prt.

When multiplied as (((Mi x M2) x M3) x M4) the total number of scalar multiplications is pqr + prs + pst.

If p = 10, q = 100, r = 20, s = 5, and t = 80, then what is the minimum number of scalar multiplications needed ?

1. 248000

2. 44000

3. 19000

4. 25000

Correct Option: C
Explanation:

Multiply as $(M_3 \times M_2 \times M_3) \times M_4$
The total number of scalar multiplication is
= qrs + pqs + pst
= 10000 + 5000 + 4000 = 19000

Consider the languages $L1, :L2 :and : L3$ as given below.

$L1={0^p 1^q \mid p, q \in N}, \\ L2 = {0^p 1^q \mid p, q \in N :and :p=q} : and \\ L3 = {0^p 1^q 0^r \mid p, q, r \in N: and : p=q=r}.$

Which of the following statements is NOT TRUE?

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

2. L1 is a regular language

3. All the three languages are context free

4. Turing machines can be used to recognize all the languages

Correct Option: C
Explanation:

L1: regular language
L2: context free language
L3: context sensitive language

On a non-pipelined sequential processor, a program segment, which is a part of the interrupt service routine, is given to transfer 500 bytes from an I/O device to memory.
Initialize the count to 500
LOOP: Load a byte from device
Decrement the count
If count != 0 go to LOOP
Assume that each statement in this program is equivalent to a 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 the 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?

1. 3.4

2. 4.4

3. 5.1

4. 6.7

Correct Option: A
Explanation:

No. of clock cycles required by using load-store approach = 2 + 500 x 7 = 3502 and that of by using DMA = 20 + 500×2 = 1020
Required speed up = $\dfrac{3502}{1020} = 3.4$

Which one of the following options is CORRECT given three positive integers $x, y$ and $z$, and a predicate

$$P\left(x\right) = \neg \left(x=1\right)\wedge \forall y \left(\exists z\left(x=y*z\right) \Rightarrow \left(y=x\right) \vee \left(y=1\right) \right)$$

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

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

3. P(x) is always true irrespective of the value of x.

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

Correct Option: A

Given $i = \sqrt{-1}$, what will be the evaluation of the definite integral $\int \limits_0^{\pi/2} \frac{\cos x +i \sin x} {\cos x - i \sin x} dx$?

1. 0

2. 2

3. – i

4. i

Correct Option: D
Explanation:

$\int_0^{\pi/2} \dfrac{e^{ix}}{e^{-ix}}dx = \int_0^{\pi/2} e^{2ix} dx$
$\left( \dfrac{e^{2ix}}{2i}\right) = \dfrac{1}{2i}[e^{ix}-1] = \dfrac{1}{2i}[\cos \pi + i \sin \pi -1] =\dfrac{1}{2i}[-1 + 0 -1] = \dfrac{-2}{2i} = \dfrac{-1}{i} \times \dfrac{i}{i} = \dfrac{-i}{-1} = i$

Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3 and f4?
f1 (n) = 2n; f2 (n) = n3/2; f3 (n) = n log2 n; f4 (n) = nlog2n

1. f3, f2, f4,f1

2. f3, f2, f1,f4

3. f2, f3, f1,f4

4. f2, f3, f4,f1

Correct Option: A
Explanation:

Let n = 1024
f1 (n) = 21024
f2 (n) = 215
f3 (n) = 10×210
f4 (n) = 102410 = 2100
$\therefore$f3, f2, f4, f1 is the required increasing order

Consider a relational table $r$ with sufficient number of records, having attributes $A_1, A_2, \dots ,A_n$ and let $1 \leq p \leq n$. Two queries $Q1$ and $Q2$ are given below.

$Q1: \pi_{A_1, \dots ,A_p} \left(\sigma_{A_p=c}\left(r\right)\right)$ where $c$ is a constant
$Q2: \pi_{A_1, \dots ,A_p} \left(\sigma_{c_1 \leq A_p \leq c_2}\left(r\right)\right)$ where $c_1$ and $c_2$ are constants.
The database can be configured to do ordered indexing on $A_p$ or hashing on $A_p$. Which of the following statements is TRUE?

1. Ordered indexing will always outperform hashing for both queries.

2. Hashing will always outperform ordered indexing for both queries.

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

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

Correct Option: C

Consider the following recursive C function that takes two arguments

unsigned int foo (unsigned int n, unsigned int r) {
if (n &gt; 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)?

1. 9

2. 8

3. 5

4. 2

Correct Option: D
Explanation:

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration.

If at some instance prior to the occurrence of the clock edge, P, Q and R have a value 0, 1 and 0 respectively, what shall be the value of PQR after the clock edge?

1. 000

2. 001

3. 010

4. 011

Correct Option: D
Explanation:

From the table shown in the explanation of question 50, if first state is 010 next State is 011.

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration.

If all the flip-flops were reset to 0 at power on, what is the total number of distinct outputs (states) represented by PQR generated by the counter?

1. 3

2. 4

3. 5

4. 6

Correct Option: B
Explanation:

So Total number of distinct outputs is 4

Consider the following recursive C function that takes two arguments
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) ?

1. 345

2. 12

3. 5

4. 3

Correct Option: B
Explanation:

Database table by name Loan_Records is given below.

Borrower Bank_Manager Loan_Amount
Ramesh Sunderajan 10000.00
Suresh Ramgopal 5000.00
Mahesh Sunderajan 7000.00

What 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
);

1. 3

2. 9

3. 5

4. 6

Correct Option: C
Explanation:

After executing the given query, the output would be

An undirected graph G(V,E) contains n ( n >2 ) nodes named v1 , v2 ,....vn. Two nodes vi , vj are connected if and only if 0 < |i – j| $\le$ 2. Each edge (vi ,vj) is assigned a weight i + j. A sample graph with n = 4 is shown below:

What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?

1. $\frac{1}{12} (11n^2 - 5 n)$

2. n2 – n + 1

3. 6n – 11

4. 2n + 1

Correct Option: B

Choose the word from the options given below that is most nearly opposite in meaning to the given word: Amalgamate

1. Merge

2. Split

3. Collect

4. Separate

Correct Option: B
Explanation:

Amalgamate means combine or unite to form one organization or structure. So the best option here is split. Separate on the other hand, although a close synonym, it is too general to be the best antonym in the given question while Merge is the synonym; Collect is not related.

Consider a network with five nodes, N1 to N5, as shown below:

The net work uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following:
N1: (0, 1, 7, 8, 4)
N2: (1, 0, 6, 7, 3)
N3: (7, 6, 0, 2, 6)
N4: (8, 7, 2, 0, 4)
N5: (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at that instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbours. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors

The cost of link N2-N3 reduces to 2 in (both directions). After the next round of updates, what will be the new distance vector at node, N3?

1. (3. 2, 0, 2, 5)

2. (3, 2, 0, 2, 6)

3. (7, 2, 0, 2, 5)

4. (7, 2, 0, 2, 6)

Correct Option: A
Explanation:

Choose the most appropriate word(s) from the options given below to complete the following sentence.
I contemplated ________ Singapore for my vacation but decided against it.

1. to visit

2. having to visit

3. visiting

4. for a visit

Correct Option: C
Explanation:

Contemplate is a verb which is generally followed by a gerund. Hence, the correct usage of contemplate is verb + ing form.

An undirected graph G(V,E) contains n ( n >2 ) nodes named v1 , v2 ,....vn. Two nodes vi , vj are connected if and only if 0 < |i – j| $\le$ 2. Each edge (vi ,vj) is assigned a weight i + j. A sample graph with n = 4 is shown below:

The length of the path from v5 to v6 in the MST of previous question with n = 10 is

1. 11

2. 25

3. 31

4. 41

Correct Option: C
Explanation:

12 + 8 + 4 + 3 + 6 + 10 = 31

If Log (P) = (1/2) Log (Q) = (1/3) Log (R), then which of the following options is TRUE?

1. P2 = Q3R2

2. Q2 = PR

3. Q2 = R3P

4. R = P2Q2

Correct Option: B
Explanation:

log P =$\dfrac{1}{2}$ log Q =$\dfrac{1}{3}$log(R) = k
$\therefore$P = bk,Q = b2k, R = b3k
Now, Q2 = b4k bk = PR

Directions: Choose the most appropriate word from the options given below to complete the following sentence.
If you are trying to make a strong impression on your audience, you cannot do so by being understated, tentative or _____________.

1. hyperbolic

2. restrained

3. argumentative

4. indifferent

Correct Option: B
Explanation:

The tone of the sentence clearly indicates a word that is similar to understated is needed for the blank. Alternatively, the word should be antonym of strong (fail to make strong impression). Therefore, the best choice is restrained, which means controlled/reserved/timid.

Which of the following options is the closest in the meaning to the word below?
Inexplicable

1. Incomprehensible

2. Indelible

3. Inextricable

4. Infallible

Correct Option: A
Explanation:

Inexplicable means not explicable; that cannot be explained, understood, or accounted for. So, the best synonym here is incomprehensible.

Consider two binary operators $ \uparrow '$ and $‘ \downarrow ’$ with the precedence of operator $\downarrow$ being lower than that of the operator $\uparrow$. Operator $\uparrow$ is right associative while operator $\downarrow$ is left associative. Which one of the following represents the parse tree for expression $(7 \downarrow 3 \uparrow 4 \uparrow 3 \downarrow 2)$

Correct Option: B
Explanation:

$7 \downarrow 3 \uparrow 4 \uparrow 3 \downarrow 2$
$\Rightarrow 7 \downarrow 3 \uparrow 4 \uparrow 3 \downarrow 2\ as \uparrow$ is right associative
$\Rightarrow 7 \downarrow 3 \uparrow 4 \uparrow 3 \downarrow 2$
$\Rightarrow 7 \downarrow 3 \uparrow 4 \uparrow 3 \downarrow 2\ as \downarrow$ is left associative

Consider evaluating the following expression tree on a machine with load-store architecture in which memory can be accessed only through load and store instructions. The variables a, b, c, d and e are initially stored in memory. The binary operators used in this expression tree can be evaluated by the machine only when the operands are in registers. The instructions produce result only in a register. If no intermediate results can be stored in memory, what is the minimum number of registers needed to evaluate this expression?

1. 2

2. 9

3. 5

4. 3

Correct Option: D
Explanation:

Load R1,a ; R1 $\leftarrow$M[a]
Load R2,b ; R2 $\leftarrow$M[b]
Sub R1,R ; R1 $\leftarrow$R1 – R2
Load R2 ,c ; R2 $\leftarrow$M[c]
Load R3 ,d ; R3 $\leftarrow$Md]
Add R2 , R3 ; R2 $\leftarrow$R2 R3
Load R3 ,e ; R3 $\leftarrow$M[e]
Sub R3, R2 : R3$\leftarrow$R3 – R2
Add R1 ,R3 ; R1 $\leftarrow$R1 R3
Minimum 3 Registers are required.

Consider a network with five nodes, N1 to N5, as shown below:

The net work uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following:
N1: (0, 1, 7, 8, 4)
N2: (1, 0, 6, 7, 3)
N3: (7, 6, 0, 2, 6)
N4: (8, 7, 2, 0, 4)
N5: (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at that instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbours. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.

After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost,$\infty$. After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3?

1. 3

2. 9

3. 10

4. $\infty$

Correct Option: C
Explanation:

N3 has neighbors N2 and N4
N2 has made entry $\infty$
N4 has the distance of 8 to N1
N3 has the distance of 2 to N4
So, 2 + 8 = 10

A transporter receives the same number of orders each day. Currently, he has some pending orders (backlog) to be shipped. If he uses 7 trucks, then at the end of the 4th day he can clear all the orders. Alternatively, if he uses only 3 trucks, then all the orders are cleared at the end of the 10th day. What is the minimum number of trucks required so that there will be no pending order at the end of the 5th day?

1. 4

2. 5

3. 6

4. 7

Correct Option: C
Explanation:

Let each truck carry 100 units.
2800 = 4n + e
n = normal
3000 = 10n + e
e = excess/pending
$\therefore$$n =\dfrac{100}{3}, e =\dfrac{8000}{3} 5days \Rightarrow$$500x = \dfrac{5.100}{3} + \dfrac{8000}{3}$
$\Rightarrow$$500x = \dfrac{8500}{3}17 \Rightarrow x > 5$
Minimum possible = 6

A deck of 5 cards (each carrying a distinct number from 1 to 5) is shuffled thoroughly. Two cards are then removed one at a time from the deck. What is the probability that the two cards are selected with the number on the first card being one higher than the number on the second card?

1. 1/5

2. 4/25

3. 1/4

4. 2/5

Correct Option: A
Explanation:

(2, 1), (3, 2), (4, 3), (5, 4)
Required probability = $\dfrac{4}{5\times4} = \dfrac{4}{20} = \dfrac{1}{5}$

P, Q, R and S are four types of dangerous microbes recently found in a human habitat. The area of each circle with its diameter printed in brackets represents the growth of a single microbe surviving human immunity system within 24 hours of entering the body. The danger to human beings varies proportionately with the toxicity, potency and growth attributed to a microbe shown in the figure below.

A pharmaceutical company is contemplating the development of a vaccine against the most dangerous microbe. Which microbe should the company target in its first attempt?

1. P

2. Q

3. R

4. S

Correct Option: D
Explanation:

By observation of the table, we can say S.

P Q R S
Requirement 800 600 300 200
Potency 0.4 0.5 0.4 0.8

Few school curricula include a unit on how to deal with bereavement and grief, and yet all students at some point in their lives suffer from losses through death and parting.
Based on the above passage, which topic would not be included in a unit on bereavement?

1. How to write a letter of condolence

2. What emotional stages are passed through in the healing process

3. What the leading causes of death are

4. How to give support to a grieving friend

Correct Option: C
Explanation:

The given passage clearly deals with how to deal with bereavement and grief after the tragedy occurs and not about precautions. Therefore, irrespective of the causes of death, a school student rarely gets into details of causes, which is beyond the scope of the context. Rest all are important in dealing with grief.

Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X=1, Y=1) is inserted in the table.
Let MX and MY denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX+1, 2*MY+1 respectively. It may be noted that each time after the insertion, values of MX and MY change.
What will be the output of the following SQL query after the steps mentioned above are carried out?
SELECT Y FROM T WHERE X = 7;

1. 127

2. 255

3. 129

4. 257

Correct Option: A
Explanation:

|||
|---|---|
| X| Y|
| 1| 1|
| 2| 3|
| 3| 7|
| 4| 15|
| 5| 31|
| 6| 63|
| 7| 127|

The following is comment written for a C function

/* This function computes the roots of a quadratic equation
a.x<sup>2</sup>+b.x+c = 0. 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 discriminant is positive
(iii) When discrimanant is zero
(iv) When discrimanant is negative
Only in cases (ii) and (iii), the stored roots are valid.
Otherwise 0 is stored in the roots, the function returns 0 when the roots are valid and -1 otherwise.
The function also ensures root1 greater than or equal to 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.

Test Case Input set Expected Output set
--- --- ---
a b
T1 0.0 0.0
T2 0.0 1.0
T3 1.0 2.0
T4 4.0 -12.0
T5 1.0 -2.0
T6 1.0 1.0

Which one of the following options provide the set of non-redundant tests using equivalence class, partitioning approach from input perspective for black box testing?

1. T1, T2, T3, T6

2. T1, T3, T4, T5

3. T2, T4, T5, T6

4. T2, T3, T4, T5

Correct Option: C
Explanation:

T1 and T2 checking same condition a = 0 Hence, any one of T1 and T2 is redundant.
T3, T4: in both case discriminant (D) = b2 – 4ac = 0. Hence, any one of it is redundant.
T5 : D>0
T6 : D<0

Consider the following table of arrival time and burst time for three processes P0, P1 and P2.

Process Arrival time Burst Time P0 0 ms 9 ms P1 1 ms 4 ms P2 2 ms 9 ms

The preemptive 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?

1. 5.0 ms

2. 4.33 ms

3. 6.33 ms

4. 7.33 ms

Correct Option: A
Explanation:

Average waiting time = $\dfrac{4+11}{3}$ = 5 ms

Consider a finite sequence of random values $X=[x_1,x_2,\dots x_n]$. Let $\mu_x$ be the mean and $\sigma_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 $\mu_y$ be the mean and $\sigma_y$ be the standard deviation of this sequence. Which one of the following statements is INCORRECT?

1. ndex position of mode of $X$ in $X$ is the same as the index position of mode of $Y$ in $Y$

2. ndex position of median of $X$ in $X$ is the same as the index position of median of $Y$ in $Y$

3. $\mu_y=a \mu_x + b$

4. $\sigma_y=a \sigma_x + b$

Correct Option: D
+ View questions