Alien head

Computer Science (GATE Exam) 2009 - Previous Question Paper Solution

Description: GATE Exam Previous Year Question Paper Solution Computer Science(CS) - 2009
Number of Questions: 60
Created by:
Tags: Computer Science GATE CS Previous Year Paper
Attempted 0/60 Correct 0 Score 0

Which one of the following in NOT necessarily a property of a Group?

  1. Commutativity

  2. Associativity

  3. Existence of inverse for every element

  4. Existence of identity


Correct Option: A

What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n $\ge$ 2.

  1. 2

  2. 3

  3. n-1

  4. n


Correct Option: A
Explanation:

null

Which one of the following is TRUE for any simple connected undirected graph with more than 2 vertices?

  1. No two vertices have the same degree.

  2. At least two vertices have the same degree.

  3. At least three vertices have the same degree.

  4. All vertices have the same degree.


Correct Option: B
Explanation:

For simple corrected graph with more than two vertices at least 2 vertices have the same degree

What is the number of swaps required to sort n elements using selection sort, in the worst case?

  1. $\theta(n)$

  2. $\theta(n log\ n)$

  3. $\theta(n^2)$

  4. $\theta(n^2log\ n)$


Correct Option: C
Explanation:

Which of the following statement(s) is / are correct regarding Bellman-Ford shortest path algorithm? P. Always finds a negative weighted cycle, if one exists. Q. Finds whether any negative weighted cycle is reachable from the source.

  1. P only

  2. Q only

  3. both P and Q

  4. Neither P nor Q


Correct Option: C
Explanation:

An unbalanced dice (with 6 faces, numbered from 1 to 6) is thrown. The probability that the face value is odd is 90% of the probability that the face value is even. The probability of getting any even numbered face is the same. If the probability that the face is even given that it is greater than 3 is 0.75, which one of the following options is closest to the probability that the face value exceeds 3?

  1. 0.453

  2. 0.468

  3. 0.485

  4. 0.492


Correct Option: B

Let $\pi_A$ be a problem that belongs to the class NP. Then which one of the following is TRUE?

  1. There is no polynomial time algorithm for $\pi_A$.

  2. If $\pi_A$ can be solved deterministically in polynomial time, then P = NP.

  3. If $\pi_A$ is NP-hard, then it is NP-complete.

  4. $\pi_A$ may be un decidable.


Correct Option: C
Explanation:

Consider the HTML table definition given below:


      ab 
          cd 

      ef 
          gh 

      ik 


The number of rows in each column and the number of columns in each row are:

  1. 2,2,3 and 2,3,2

  2. 2,2,3 and 2,2,3

  3. 2,3,2 and 2,3,2

  4. 2,3,2 and 2,2,3


Correct Option: C
Explanation:

Here two <td> command used in first <tr> command and three <td> command used in second <tr> command, so required rows in each column is <2, 3, 2>

The coupling between different modules of a software is categorized as follows: I. Content coupling II. Common coupling III. Control coupling IV Stamp coupling V. Data coupling Coupling between modules can be ranked in the order of strongest (least desirable) to weakest (most desirable) as follows:

  1. I-II-III-IV-V

  2. V-IV-III-II-I

  3. I-III-V -II-IV

  4. IV-II-V -III-I


Correct Option: A

For the composition table of a cyclic group shown below

* a b c d
a a b c d
b b a d c
c c b d a
d d c a b

Which one of the following choices is correct?

  1. a, b are generators

  2. b, c are generators

  3. c, d are generators

  4. d, a are generators


Correct Option: C
Explanation:

a * a = a. So a can not generate anything other than a. In fact a is identity so a can not be generator.

So this eliminates Option A & D.

b*b = a. Also a is just identity, so b*a=a*b = a. So b can not generate all elements . So Option B is out.

So Answer is C.

Evaluate: $\int^{\pi/4}_0 (1-\tan x)/(1+\tan x)dx $

  1. 0

  2. 1

  3. $ln2$

  4. $\dfrac{1}{2}ln2$


Correct Option: D
Explanation:

$\int^{\pi/4}_0 \dfrac{(1-\tan x)}{(1+\tan x)}dx = \int^{\pi/4}_0 \dfrac{(\cos x-\sin x)}{(\cos x+\sin x)}dx$ Let, cos x + sin x = t $\therefore$(- sinx + cos x) dx = dt

$\int^{\sqrt 2}_0 \dfrac{dt}{t}dx = [\log t] = \log \sqrt 2 = \dfrac{1}{2} \log 2$

Consider the following well-formed formulae:

I. $\neg \forall x(P(x))$ II. $\neg \exists x(P(x))$ III. $\neg \exists x(\neg P(x))$ IV. $\exists x(\neg P(x))$

Which of the above are equivalent?

  1. I and III

  2. I and IV

  3. II and III

  4. II and IV


Correct Option: B

What is the minimum number of gates required to implement the Boolean function (AB + C) if we have to use only 2-input NOR gates?

  1. 2

  2. 3

  3. 4

  4. 5


Correct Option: B
Explanation:

(1217)8 is equivalent to

  1. (1217)16

  2. (028F)16

  3. (2297)10

  4. (0B17)16


Correct Option: B
Explanation:

Consider the binary relation R = {(x,y), (x,z), (z,x), (z,y)} on the set {x,y,z}.

Which one of the following is TRUE?

  1. R is symmetric but NOT antisymmetric

  2. R is NOT symmetric but antisymmetric

  3. R is both symmetric and antisymmetric

  4. R is neither symmetric nor antisymmetric


Correct Option: D

In which one of the following page replacement policies, Belady's anomaly may occur?a

  1. FIFO

  2. Optimal

  3. LRU

  4. MRU


Correct Option: A
Explanation:

Baledy's anomaly is property of FIFO page replacement policy in which the no. of page faults increases even if no. of page frames are increased in some cases.

Which one of the following is the most appropriate logical formula to represent the statement? “Gold and silver ornaments are precious”. The following notations are used: G(x): x is a gold ornament S(x): x is a silver ornament P(x): x is precious

  1. $\forall x(P(x) \implies (G(x) \wedge S(x)))$

  2. $\forall x((G(x) \wedge S(x)) \implies P(x))$

  3. $\exists x((G(x) \wedge S(x)) \implies P(x))$

  4. $\forall x((G(x) \vee S(x)) \implies P(x))$


Correct Option: D
Explanation:

Given that gold and silver ornament are precious. So, we use, gold and silver gold $\lor$ silver $\forall$((G(x) $\lor$ S(x))) Gold and silver $\rightarrow$precious $\forall$((G(x) $\lor$ S(x)) $\rightarrow$ P(x)

A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because

  1. It reduces the memory access time to read or write a memory location.

  2. It helps to reduce the size of page table needed to implement the virtual address space of a process.

  3. It is required by the translation look aside buffer.

  4. It helps to reduce the number of page faults in page replacement algorithms.


Correct Option: B
Explanation:

Consider a disk system with 100 cylinders. The requests to access the cylinders occur in the following sequence: 4, 34, 10, 7, 19, 73, 2, 15, 6, 20

Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1ms to move from one cylinder to the adjacent one and shortest seek time first policy is used?

  1. 95 ms

  2. 119 ms

  3. 233 ms

  4. 276 ms


Correct Option: B
Explanation:

In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state:

Now consider the following statements: I. If a process makes a transition D, it would result in another process making transition A immediately. II. A process P2 in blocked state can make transition E while another process P1 is in running state. III. The OS uses preemptive scheduling. IV. The OS uses non-preemptive scheduling. Which of the above statements are TRUE?

  1. I and II

  2. I and III

  3. II and III

  4. II and IV


Correct Option: C
Explanation:

The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows:

void enter_CS(X)
{
    while(test-and-set(X));
}

void leave_CS(X)
{
    X = 0;
}

In the above solution, X is a memory location associated with the CS and is initialized to 0. Now consider the following statements: I. The above solution to CS problem is deadlock-free. II. The solution is starvation free. III. The processes enter CS in FIFO order. IV More than one process can enter CS at the same time. Which of the above statements is/are TRUE?

  1. Only I

  2. Both I and II

  3. Both II and III

  4. Only IV


Correct Option: A
Explanation:

While opening a TCP connection, the initial sequence number is to be derived using a time-of-day (ToD) clock that keeps running even when the host is down. The low order 32 bits of the counter of the ToD clock is to be used for the initial sequence numbers. The clock counter increments once per millisecond. The maximum packet lifetime is given to be 64s. Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase?

  1. 0.015/s

  2. 0.064/s

  3. 0.135/s

  4. 0.327/s


Correct Option: B
Explanation:

In quick-sort, for sorting n elements, the $\left(n/4\right)^{th}$ smallest element is selected as pivot using an O(n) time algorithm. What is the worst case time complexity of the quick sort?

  1. $\Theta(n)$

  2. $\Theta(n \log n)$

  3. $\Theta(n^2)$

  4. $\Theta(n^2 \log n)$


Correct Option: B
Explanation:

The running time of an algorithm is represented by the following recurrence relation:

$T(n) = \begin{cases} n & n \leq 3 \\ T(\frac{n}{3})+cn & \text{ otherwise } \end{cases}$

Which one of the following represents the time complexity of the algorithm?

  1. $\Theta(n)$

  2. $\Theta(n \log n)$

  3. $\Theta(n^2)$

  4. $\Theta(n^2 \log n)$


Correct Option: A
Explanation:

$= \theta(n)$

Consider the following statements about the cyclomatic complexity of the control flow graph of a program module. Which of these are TRUE?

I. The cyclomatic complexity of a module is equal to the maximum number of linearly independent circuits in the graph. II. The cyclomatic complexity of a module is the number of decisions in the module plus one, where a decision is effectively any conditional statement in the module. III. The cyclomatic complexity can also be used as a number of linearly independent paths that should be tested during path coverage testing.

  1. I and II

  2. II and III

  3. I and III

  4. I, II and III


Correct Option: B

Which of the following statements are TRUE?

I. The context diagram should depict the system as a single bubble. II. External entities should be identified clearly at all levels of DFDs. III. Control information should not be represented in a DFD. IV. A data store can be connected either to another data store or to an external entity.

  1. II and III

  2. II and I

  3. I and III

  4. I, II and III


Correct Option: C

Let G(x) be the generator polynomial used for CRC checking. What is the condition that should be satisfied by G(x) to detect odd number of bits in error?

  1. G(x) contains more than two terms

  2. G(x) does not divide 1 + xk, for any k not exceeding the frame length

  3. 1 + x is a factor of G(x)

  4. G(x) has an odd number of terms.


Correct Option: C
Explanation:

The binary operation □ is defined as follows

P Q P □ Q
T T T
T F T
F T F
F F T

Which one of the following is equivalent to $P \vee Q$?

  1. $\neg Q □ \neg P$

  2. $P□\neg Q$

  3. $\neg P□Q$

  4. $\neg P□ \neg Q$


Correct Option: B
Explanation:

|||||| | |---|---|---|---|---| | P| Q| $P □ Q$| $P \lor Q$| $ P □ \neg Q$| | T| T| T| T| T| | T| F| T| T| T| | F| T| F| T| T| | F| F| T| F| F|

A sub-sequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences X[m] and Y[n] of lengths m and n, respectively, with indexes of X and Y starting from 0.

The values of l(i,j) could be obtained by dynamic programming based on the correct recursive definition of l(i,j) of the form given above, using an array L[M,N], where M = m+1 and N=n+1, such that L[i, j] = l(i,j). Which one of the following statements would be TRUE regarding the dynamic programming solution for the recursive definition of l(I, j)?

  1. All elements L should be initialized to 0 for the values of l(i, j) to be properly computed.

  2. The values of l(i, j) may be computed in a row major order or column major order of L(M,N).

  3. The values of l(i, j) cannot be computed in either row major order or column major order of L(M,N).

  4. L[p, q] needs to be computed before L[r, s] if either p<r or q<s.


Correct Option: D
Explanation:

In the RSA public key cryptosystem, the private and public keys are (e,n) and (d,n) respectively, where n=p*q and p and q are large primes. Besides, n is public and p and q are private. Let M be an integer such that 0<M<n and $\phi$ (n) = (p − 1) (q − 1). Now consider the following equations. I. M' = Me mod n
M = (M')d mod n II. Ed = 1 mod n III. ed = 1 mod $\phi$(n) IV. M' = Me mod $\phi$(n) M = (M')d mod $\phi$(n) Which of the above equations correctly represent RSA cryptosystem?

  1. I and II

  2. I and III

  3. II and IV

  4. III and IV


Correct Option: B
Explanation:

A sub-sequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences X[m] and Y[n] of lengths m and n, respectively, with indexes of X and Y starting from 0.

We wish to find the length of the longest common sub-sequence (LCS) of X[m] and Y[n] as l(m, n), where an incomplete recursive definition for the function l(i, j) to compute the length of the LCS of X[m] and Y[n] is given below: l (i, j) = 0, if either i=0 or j=0 = expr1, if i,j>0 and X [i-1] = Y [j 1] = expr2, if i,j>0 and X [i-1] = Y [j 1]

Which one of the following options is correct?

  1. expr1 = l (i − 1, j) + 1

  2. expr1 = l (i, j − 1)

  3. expr2 = max (l (i − 1, j), l (i,j - 1))

  4. expr2 = max (l (i − 1, j − 1), l (i, j))


Correct Option: C
Explanation:

Frames of 1000 bits are sent over a 106 bps duplex link between two hosts. The propagation time is 25 ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link).

What is the minimum number of bits (l) that will be required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames.

  1. l=2

  2. l=3

  3. l=4

  4. l=5


Correct Option: D
Explanation:

Consider the following graph:

Which one of the following is NOT the sequence of edges added to the minimum spanning tree using Kruskal's algorithm?

  1. (b,e) (e,f) (a,c) (b,c) (f,g) (c,d)

  2. (b,e) (e,f) (a,c) (f,g) (b,c) (c,d)

  3. (b,e) (a,c) (e,f) (b,c) (f,g) (c,d)

  4. (b,e) (e,f) (b,c) (a,c) (f,g) (c,d)


Correct Option: D
Explanation:

Krushal's algorightm, arranging edges in ascending order.

Frames of 1000 bits are sent over a 106 bps duplex link between two hosts. The propagation time is 25 ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link).

Suppose that the sliding window protocol is used with the sender window size of 2l, where l is the number of bits identified in the earlier part and acknowledgements are always piggy backed. After sending 2l frames, what is the minimum time the sender will have to wait before starting transmission of the next frame? (Identify the closest choice ignoring the frame processing time.)

  1. 16 ms

  2. 18 ms

  3. 20 ms

  4. 22 ms


Correct Option: B
Explanation:

Which of the following statements are TRUE? I. There exist parsing algorithms for some programming languages whose complexities are less than $\theta$(n3). II. A programming language which allows recursion can be implemented with static storage allocation. III. No L-attributed definition can be evaluated in the framework of bottom-up parsing. IV. Code improving transformations can be performed at both source language and intermediate code level.

  1. I and II

  2. I and IV

  3. III and IV

  4. I, III and IV


Correct Option: B
Explanation:

The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k) = k mod 10 and linear probing. What is the resultant hash table?

  1. 0
    1
    2 2
    3 23
    4
    5 15
    6
    7
    8 18
    9
  2. 0
    1
    2 12
    3 13
    4
    5 5
    6
    7
    8 18
    9
  3. 0
    1
    2 12
    3 13
    4 2
    5 3
    6 23
    7 5
    8 18
    9 15
  4. 0
    1
    2 12,2
    3 13,3,23
    4
    5 5,15
    6
    7
    8 18
    9

Correct Option: C
Explanation:

How many 32 K x 1 RAM chips are needed to provide a memory capacity of 256 Kbytes?

  1. 8

  2. 32

  3. 64

  4. 128


Correct Option: C
Explanation:

A CPU generally handles an interrupt by executing an interrupt service routine

  1. As soon as an interrupt is raised

  2. By checking the interrupt register at the end of fetch cycle.

  3. By checking the interrupt register after finishing the execution of the current instruction.

  4. By checking the interrupt register at fixed time intervals.


Correct Option: C
Explanation:

Consider a 4-way set associative cache (initially empty) with total 16 cache blocks. The main memory consists of 256 blocks and the request for memory blocks is in the following order: 0, 255, 1, 4, 3, 8, 133, 159, 216, 129, 63, 8, 48, 32, 73, 92, 155. Which one of the following memory block will NOT be in cache if LRU replacement policy is used?

  1. 3

  2. 8

  3. 129

  4. 216


Correct Option: D
Explanation:

A hard disk has 63 sectors per track, 10 platters each with 2 recording surfaces and 1000 cylinders. The address of a sector is given as a triple (c,h,s) , where c is the cylinder number, h is the surface number and s is the sector number. Thus, the 0th sector is addressed as (0,0,0), the 1st sector as (0,0,1), and so on

The address <400, 16, 29> corre4sponds tp sector number:

  1. 505035

  2. 505036

  3. 505037

  4. 505038


Correct Option: C
Explanation:

Consider a 4 stage pipeline processor. The number of cycles needed by the four instructions I1, I2, I3, I4 in stages S1, S2, S3, S4 is shown below:

S1 S2 S3 S4
11 2 1 1 1
12 1 3 2 2
13 2 1 1 3
14 1 2 2 2

What is the number of cycles needed to execute the following loop? For (I = 1 to 2) {I1; I2; I3; I4;}

  1. 16

  2. 23

  3. 28

  4. 30


Correct Option: D
Explanation:

A hard disk has 63 sectors per track, 10 platters each with 2 recording surfaces and 1000 cylinders. The address of a sector is given as a triple (c, h, s), where c is the cylinder number, h is the surface number and s is the sector number. Thus, the 0th sector is addressed as (0, 0, 0), the 1st sector as (0, 0, 1), and so on

The address of the 1039th sector is

  1. (0, 15, 31)

  2. (0, 16, 30)

  3. (0, 16, 31)

  4. (0, 17, 31)


Correct Option: C
Explanation:

Consider the program below:

#include 
int fun(int n, int *f_p) {
    int t, f;
    if (n &lt;= 1) {
        *f_p = 1;
        return 1;
    }
    t = fun(n-1, f_p);
    f = t + *f_p;
    *f_p = t;
    return f;
}

int main() {
    int x = 15;
    printf("%d/n", fun(5, &amp;x));
    return 0;
}

The value printed is

  1. 6

  2. 8

  3. 14

  4. 15


Correct Option: B
Explanation:

What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0.

  1. 2

  2. 3

  3. 4

  4. 5


Correct Option: B
Explanation:

Consider a binary max-heap implemented using an array.

Which one of the following array represents a binary max-heap?

  1. {25,12,16,13,10,8,14}

  2. {25,14,13,16,10,8,12}

  3. {25,14,16,13,10,8,12}

  4. {25,14,12,13,10,8,16}


Correct Option: C
Explanation:

If the value presented at any node is greater than all its children then thr tree is called max heap

Consider a binary max-heap implemented using an array.

What is the content of the array after two delete operations on the correct answer to the previous question?

  1. {14,13,12,10,8}

  2. {14,12,13,8,10}

  3. {14,13,8,12,10}

  4. {14,13,12,8,10}


Correct Option: D
Explanation:

The following key values are inserted into a B+ - tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+ - tree is initially empty. 10, 3, 6, 8, 4, 2, 1 The maximum number of times leaf nodes would get split as a result of these insertions is

  1. 2

  2. 3

  3. 4

  4. 5


Correct Option: C
Explanation:

Consider two transactions T1 and T2 and four schedules S1, S2, S3 and S4 of T1 and T2 as given below: T1 : R1 [x] W1 [x] W1 [y] T2 : R2 [x] R2 [y] W2 [y] S1 : R1 [x] R2 [x] R2 [y] W1 [x] W1 [y] W2 [y] S2 : R1 [x] R2 [x] R2 [y] W1 [x] W2 [y] W1 [y] S3 : R1 [x] W1 [x] R2 [x] W1 [y] R2 [y] W2 [y] S4 : R2 [x] R2 [y] R1 [x] W1 [x] W1 [y] W2 [y]

Which of the above schedules is/are conflict-serializable?

  1. Both S1 and S2

  2. Both S2 and S3

  3. Only S3

  4. Only S4


Correct Option: B
Explanation:

Let R and S be relational schemes such that R={a,b,c} and S={c}. Now consider the following queries on the database:

I. $\pi_{R-S}(r) - \pi_{R-S} \left (\pi_{R-S} (r) \times s - \pi_{R-S,S}(r)\right )$ II. $\left\{t \mid t \in \pi_{R-S} (r) \wedge \forall u \in s \left(\exists v \in r \left(u = v[S] \wedge t = v\left[R-S\right]\right )\right )\right\}$ III. $\left\{t \mid t \in \pi_{R-S} (r) \wedge \forall v \in r \left(\exists u \in s \left(u = v[S] \wedge t = v\left[R-S\right]\right )\right ) \right\}$ IV.

Select R.a, R.b
            From R,S
            Where R.c=S.c

Which of the above queries are equivalent?

  1. I and II

  2. I and III

  3. II and IV

  4. III and IV


Correct Option: C
Explanation:

Consider the following relational schema:

Suppliers(sid:integer, sname:string, city:string, street:string) Parts(pid:integer, pname:string, color:string) Catalog(sid:integer, pid:integer, cost:real) Assume that in the suppliers relation above, each supplier and each street within a city has a unique name, and (sname, city) forms a candidate key. No other functional dependency is implied other than those implied by primary and candidate keys.

Which of the following statements is TRUE about the above schema?

  1. The schema is in BCNF.

  2. The schema is in 3NF, but not in BCNF.

  3. The schema is in 2NF, but not in 3NF.

  4. The schema is not in 2NF.


Correct Option: B
Explanation:

 The schema is in 3NF, but not in BCNF. (sname, city) forms the candidate key.
Suppliers(sid, sname, city, street)
sname is primary key.
sid, sname is also key.
city--> street
street is functionally dependent upon city.
sname--> city
So, transitivity occurs.
So, the schema is in 3NF, but not in BCNF.

Consider the following relational schema: Suppliers(sid:integer, sname:string, city:string, street:string) Parts(pid:integer, pname:string, color:string) Catalog(sid:integer, pid:integer, cost:real) Consider the following relational query on the above database: SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN (SELECT C.sid FROM Catalog C WHERE C.pid NOT (SELECT P.pid FROM Parts P WHERE P.color<> 'blue'))

Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?

  1. Find the names of all suppliers who have supplied a non-blue part.

  2. Find the names of all suppliers who have not supplied a non-blue part.

  3. Find the names of all suppliers who have supplied only blue parts.

  4. Find the names of all suppliers who have not supplied only blue parts.


Correct Option: B
Explanation:

S $\rightarrow$ aSa | bSb | a | b; The language generated by the above grammar over the alphabet {a, b} is the set of

  1. All palindromes.

  2. All odd length palindromes.

  3. Strings that begin and end with the same symbol

  4. All even length palindromes.


Correct Option: B
Explanation:

Which one of the following languages over the alphabet {0, 1} is described by the regular expression: (0 + 1)0(0 + 1)*0(0 + 1)?

  1. The set of all strings containing the substring 00.

  2. The set of all strings containing at most two 0's.

  3. The set of all strings containing at least two 0's.

  4. The set of all strings that begin and end with either 0 or 1.


Correct Option: C
Explanation:

Which one of the following is FALSE?

  1. There is unique minimal DFA for every regular language

  2. Every NFA can be converted to an equivalent PDA.

  3. Complement of every context-free language is recursive.

  4. Every nondeterministic PDA can be converted to an equivalent deterministic PDA.


Correct Option: D
Explanation:

The above DFA accepts the set of all strings over {0, 1} that

  1. begin either with 0 or 1

  2. end with 0

  3. end with 00

  4. contain the substring 00.


Correct Option: C
Explanation:

Match all items in Group 1 with correct options from those given in Group 2.

Group 1 Group 2 P. Regular expression 1. Syntax analysis Q. Pushdown automata 2. Code generation R. Dataflow analysis 3. Lexical analysis S. Register allocation 4. Code optimization

  1. P-4. Q-1, R-2, S-3

  2. P-3, Q-1, R-4, S-2

  3. P-3, Q-4, R-1, S-2

  4. P-2, Q-1, R-4, S-3


Correct Option: B
Explanation:

Let L = L1 $\cap$ L2, where L1 and L2 are languages as defined below: L1 = $(a^m b^m\ ca^n b^m | m,n \ge 0)$ L2 = $(a^i b^j\ c^k | i,j \ge 0)$ Then L is

  1. Not recursive

  2. Regular

  3. Context free but not regular

  4. Recursively enumerable but not context free.


Correct Option: C
Explanation:

Given the following state table of an FSM with two states A and B, one input and one output:

Present State A Present State B Input Next State A Next State B Output
0 0 0 0 0 1
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 1 0 0
0 0 1 0 1 0
0 1 1 0 0 1
1 0 1 0 1 1
1 1 1 0 0 1

If the initial state is A = 0, B = 0, what is the minimum length of an input string which will take the machine to the state A = 0, B = 1 with Output = 1?

  1. 3

  2. 4

  3. 5

  4. 6


Correct Option: A
Explanation:

Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.

Process P1: Process P2: Process P3:
t=0: requests 2 units of R2 t=0: requests 2 units of R3 t=0: requests 1 unit of R4
t=1: requests 1 unit of R3 t=2: requests 1 unit of R4 t=2: requests 2 units of R1
t=3: requests 2 units of R1 t=4: requests 1 unit of R1 t=5: releases 2 units of R1
t=5: releases 1 unit of R2 and 1 unit of R1. t=6: releases 1 unit of R3 t=7: requests 1 unit of R2
t=7: releases 1 unit of R3 t=8: Finishes t=8: requests 1 unit of R3
t=8: requests 2 units of R4 t=9: Finishes
t=10: Finishes

Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0?

  1. All processes will finish without any deadlock

  2. Only P1 and P2 will be in deadlock.

  3. Only P1 and P3 will be in a deadlock.

  4. All three processes will be in deadlock.


Correct Option: A
Explanation:

The essential content(s) in each entry of a page table is / are

  1. Virtual page number

  2. Page frame number

  3. Both virtual page number and page frame number

  4. Access right information


Correct Option: B
Explanation:

A page table is in main memory which mop a page frame to a virtual memory page. So essential content is page frame number.

+ View questions