GATE CSE 2005
View Questions

GATE CSE

1
The time complexity of computing the transitive closure of a binary relation on a set of elements is known to be:
2
Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable. Which one of the following is TRUE?
3
Suppose T(n) = 2T (n/2) + n, T(0) = T(1) = 1
Which one of the following is FALSE?
4
Let G(V, E) an undirected graph with positive edge weights. Dijkstra's single-source shortest path algorithm can be implemented using the binary heap data structure with time complexity:
5
Suppose there are $$\lceil \log n \rceil$$ sorted lists of $$\left\lfloor {{n \over {\log n}}} \right\rfloor $$ elements each. The time complexity of producing a sorted list of all these elements is :
(Hint : Use a heap data structure)
6
Consider the following C - function:
double foo(int n){
 int i;
 double sum;
 if(n == 0) return 1.0;
 sum = 0.0;
 for (i = 0; i < n; i++){
  sum += foo(i);
 }
 return sum;
}
The space complexity of the above function is:
7
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below:
10, 8, 5, 3, 2
Two new elements '1' and '7' are inserted in the heap in that order, The level order traversal of the heap after the insertion of the elements is:
8
Consider the following C - function:
double foo(int n){
 int i;
 double sum;
 if(n == 0) return 1.0;
 sum = 0.0;
 for (i = 0; i < n; i++){
  sum += foo(i);
 }
 return sum;
}
Suppose we modify the above function foo() and store the values of foo(i), $$0 \le i \le n$$, as and when they are computed. With this modification, the time complexity for function foo() is significantly reduced. The space complexity of the modified function would be:
9

Consider the grammar

$$E \to E + n\,|\,E \times n\,|\,n$$

For a sentence n + n × n, the handles in the right-sentential form of the reduction are

10

Consider the grammar

$$S \to \left( S \right)\,|\,a$$

Let the number of states in SLR(1), LR(1) and LALR(1) parsers for the grammar be n1, n2 and n3 respectively.

The following relationship holds good
11
The grammar $$A \to AA\,|\,\left( A \right)\,|\,\varepsilon $$
is not suitable for predictive-parsing because the grammar is
12

Consider the following expression grammar. The seman­tic rules for expression calculation are stated next to each grammar production.

$$\eqalign{ & E \to number\,\,\,\,\,E.val = number.val \cr & \,\,\,\,\,\,\,\,\,\,\,|E\,\,' + '\,\,E\,\,\,\,\,\,{E^{\left( 1 \right)}}.val = {E^{\left( 2 \right)}}.val + {E^{\left( 3 \right)}}.val \cr & \,\,\,\,\,\,\,\,\,\,\,|\,E\,\,' \times '\,\,E\,\,\,\,\,\,\,{E^{\left( 1 \right)}}.val = {E^{\left( 2 \right)}}.val \times {E^{\left( 3 \right)}}.val \cr} $$

The above grammar and the semantic rules are fed to a yacc tool (which is an LALR (1) parser generator) for parsing and evaluating arithmetic expressions. Which one of the following is true about the action of yacc for the given grammar?

13
Consider line number 3 of the following C - program.
int main ( ) {              /* Line 1 */ 
int I, N;                   /* Line 2 */ 
fro (I = 0, I < N, I++);    /* Line 3 */ 
} 
Identify the compiler's response about this line while creating the object-module
14

Consider the following expression grammar. The seman­tic rules for expression calculation are stated next to each grammar production.

$$\eqalign{ & E \to number\,\,\,\,\,E.val = number.val \cr & \,\,\,\,\,\,\,\,\,\,\,|E\,\,' + '\,\,E\,\,\,\,\,\,{E^{\left( 1 \right)}}.val = {E^{\left( 2 \right)}}.val + {E^{\left( 3 \right)}}.val \cr & \,\,\,\,\,\,\,\,\,\,\,|\,E\,\,' \times '\,\,E\,\,\,\,\,\,\,{E^{\left( 1 \right)}}.val = {E^{\left( 2 \right)}}.val \times {E^{\left( 3 \right)}}.val \cr} $$

Assume the conflicts in the previous question are resolved and an LALR(1) parser is generated for parsing arithmetic expressions as per the given grammar. Consider an expression
3 × 2 + 1.
What precedence and associativity properties does the generated parser realize?

15
Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.4 μs. The minimum frame size is
16
Suppose that two parties A and B wish to setup a common secret key (D - H key) between themselves using the Diffie-Hellman key exchange technique. They agree on 7 as the modulus and 3 as the primitive root. Party A chooses 2 and party B chooses 5 as their respective secrets. Their D - H key is
17
Packets of the same session may be routed through different paths in
18
An organization has a class B network and wishes to form subnets for 64 departments. The subnet mask would be
19
The address resolution protocol (ARP) is used for
20
In a packet switching network, packets are routed from source to destination along a single path having two intermediate nodes. If the message size is 24 bytes and each packet contains a header of 3 bytes, then the optimum packet size is:
21
The maximum window size for data transmission using the selective reject protocol with n-bit frame sequence numbers is:
22
In a network of LANs connected by bridges, packets are sent from one LAN to another through intermediate bridges. Since more than one path may exist between two LANs, packets may have to be routed through multiple bridges. Why is the spanning tree algorithm used for bridge-routing?
23
Consider a three word machine instruction $$ADD$$ $$A$$ $$\left[ {{R_0}} \right],\,@\,B$$

The first operand (destination) ''$$A$$ $$\left[ {{R_0}} \right]''$$ uses indexed addressing mode with $${{R_0}}$$ as the index register. The second operand (source) $$''@B''$$ used indirect addressing mode. $$A$$ and $$B$$ are memory addresses residing at the second and the third words, respectively. The first word of the instruction specific the opcode, the index register designation and the source and destination addressing modes. During execution of $$ADD$$ instruction, the two operands are added and stored in the destination (first operand).

The number of memory cycles needed during the execution cycle of the instruction is

24
A $$5$$ stage pipelined $$CPU$$ has the following sequence of stages $$IF$$-Instruction fetch from instruction memory, $$RD$$-Instruction decode and register read, $$EX$$-Execute: $$ALU$$ operation for data and address computation, $$MA$$-Data memory access-for write access the register read and $$RD$$ stage it used, $$WB$$-Register write back.

Consider the following sequence of instructions:
$$\eqalign{ & {{\rm I}_1}:L\,R0,\,\,Loc1;\,R0 < \,\, = M\,[Loc1] \cr & {{\rm I}_2}:A\,R0,\,R0;\,\,\,\,\,\,R0 < \,\, = R0 + R0 \cr & {{\rm I}_3}:A\,R2,\,R0;\,\,\,\,\,\,R2 < \,\, = R2 - R0 \cr} $$

Let each stage takes one clock cycle.
What is the number of clock cycles taken to complete the above sequence of instructions starting from the fetch of $${{\rm I}_1}?$$

25
Consider a direct mapped cache of size $$32$$ $$KB$$ with block size $$32$$ bytes. The $$CPU$$ generates $$32$$ bit addresses. The number of bits needed for cache indexing and the number of tag bits are respectively
26
Increasing the $$RAM$$ of a computer typically improves performance because
27
Consider the following data path of a $$CPU$$ GATE CSE 2005 Computer Organization - Alu Data Path and Control Unit Question 4 English

The, $$ALU$$, the bus and all the registers in the data path are of identical size. All operations including incrementation of the $$PC$$ and the $$GPRs$$ are to be carried out in the $$ALU.$$ Two clock cycle are needed for memory read operation-the first one for loading address in the $$MAR$$ and the next one for loading data from the memory but into the $$MDR.$$

The instruction $$''call$$ $$Rn,sub''$$ is a two word instruction. Assuming that $$PC$$ is incremented during the fetch cycle of the first word of the instruction, its register transfer interpretation is $$$\eqalign{ & Rn < = PC + 1; \cr & PC < = M\left[ {PC} \right]; \cr} $$$
The minimum number of $$CPU$$ clock cycles needed during the execution cycle of this instruction is :

28
Consider the following data path of a $$CPU$$ GATE CSE 2005 Computer Organization - Alu Data Path and Control Unit Question 5 English

The, $$ALU$$, the bus and all the registers in the data path are of identical size. All operations including incrementation of the $$PC$$ and the $$GPRs$$ are to be carried out in the $$ALU.$$ Two clock cycle are needed for memory read operation-the first one for loading address in the $$MAR$$ and the next one for loading data from the memory but into the $$MDR.$$

The instruction $$''add$$ $$R0$$, $$R1''$$ has the register transfer interpretation $$R0 < = R0 + R1.$$ The minimum number of cycles needed for execution cycle of this instruction is

29
Consider the disk drive with the following specifications $$16$$ surfaces, $$512$$ tracks/surface, $$512$$ sectors/track, $$1$$ $$KB/sector$$, rotation speed $$3000$$ $$rpm.$$ The disk is operated in cycle stealing mode whereby whenever one byte word is ready it is sent to memory; similarly, for writing, the disk interface reads a $$4$$ byte word from the memory in each $$DMA$$ cycle. Memory cycle time is $$40$$ $$nsec$$. The maximum percentage of time that the $$CPU$$ gets blocked during $$DMA$$ operation is
30
A device with data transfer rate $$10$$ $$KB/sec$$ is connected to a $$CPU.$$ Data is transferred byte-wise. Let the interrupt overhead be $$4$$ $$\mu \sec $$. The byte transfer time between the device interface register and $$CPU$$ or memory is negligible. What is the minimum performance gain of operating the device under interrupt mode over operating it under program controlIed mode?
31
Normally user programs are prevented from handling $${\rm I}/O$$ directly by $${\rm I}/O$$ instructions in them. For $$CPUs$$ having explicit $${\rm I}/O$$ instructions, such $${\rm I}/O$$ protection is ensured by having the $${\rm I}/O$$ instructions privileged. In a $$CPU$$ with memory mapped $${\rm I}/O$$, there is no explicit $${\rm I}/O$$ instruction. Which one of the following is true for a $$CPU$$ with memory mapped $${\rm I}/O$$ ?
32
The data given below. Solve the problems and choose the correct answer. GATE CSE 2005 Computer Organization - Computer Arithmetic Question 3 English

The normalized representation for the above format is specified as follows. The mantissa has an implicit preceding the binary (radix) point. Assume that only $$0's$$ are padded in while shifting a field. The normalized representation of the above $$\left( {0.239 \times {2^{13}}} \right)$$ is

33
The data given below. Solve the problems and choose the correct answer. GATE CSE 2005 Computer Organization - Computer Arithmetic Question 4 English

Mantissa is a pure fraction in sign - magnitude form. The decimal number $$0.239 \times {2^{13}}$$ has the following hexadecimal representation without normalization and rounding off

34
A hash table contains 10 buckets and uses linear probing to resolve collisions. The key values are integers and the hash function used is key % 10. If the values 43, 165, 62, 123, 142 are inserted in the table, in what location would the key value 142 be inserted?
35
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3, 2 Two new elements ”1‘ and ”7‘ are inserted in the heap in that order. The level-order traversal of the heap after the insertion of the elements is:
36
A binary search tree contains the numbers 1, 2, 3, 4, 5, 6, 7, 8. When the tree is traversed in pre-order and the values in each node printed out, the sequence of values obtained is 5, 3, 1, 2, 4, 6, 8, 7. If the tree is traversed in post-order, the sequence obtained would be
37
In a complete k-ary tree, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is
38
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most 2. If the height of the tree is h > 0, then the minimum number of nodes in the tree is:
39
How many distinct binary search trees can be created out of 4 distinct keys?
40
Postorder traversal of a given binary search tree T produces the following sequence of keys 10, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29 Which one of the following sequences of keys can be the result of an inorder traversal of the tree T?
41
The numbers 1, 2, ........, n are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains p nodes. The first number to be inserted in the tree must be
42
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing the integers 1,2,3,4,5,6,7 in the given order. What will be the contents of the list after the function completes execution?
struct node { 
    int value; 
    struct node *next; 
}; 

Void rearrange (struct node *list ){ 
    struct node *p, * q; 
    int temp; 
    if( !list || !list-> next) return; 
    p = list; q = list->next; 
    while (q) { 
      temp = p->value; 
      p-> value = q ->value; 
      q-> value = temp; 
      p = q-> next; 
      q = p ? p->next : 0; 
    } 
}
43
A function f defined on stacks of integers satisfies the following properties. f(∅) = 0 and f (push (S, i)) = max (f(S), 0) + i for all stacks S and integers i. If a stack S contains the integers 2, -3, 2, -1, 2 in order from bottom to top, what is f(S)?
44
A program P reads in 500 integers in the range [0, 100] representing the cores of 500 students. It then print the frequency of each score above 50. What would be the best way for P to store the frequencies?
45
In an inventory management system implemented at a trading corporation, there are several tables designed to hold all the information. Amongst these, the following two tables hold information on which items are supplied by which suppliers, and which warehouse keeps which items along with the stock-level of these items.

Supply = (supplierid, itemcode)
Inventory = (itemcode, warehouse, stocklevel)

For a specific information required by the management, following SQL query has been written

Select distinct STMP.supplierid 
From Supply as STMP 
Where not unique (Select ITMP.supplierid 
    From Inventory, Supply as ITMP 
    Where STMP.supplierid = ITMP.supplierid 
    And ITMP.itemcode = Inventory.itemcode 
    And Inventory.warehouse = 'Nagpur');
For the warehouse at Nagpur, this query will find all suppliers who
46
A B-Tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that could be newly created in the process are:
47
Amongst the ACID properties of a transaction, the 'Durability' property requires that the changes made to the database by a successful transaction persist
48
A table ‘student’ with schema (roll, name, hostel, marks), and another table ‘hobby’ with schema (roll, hobbyname) contains records as shown below:

Table: student

Roll Name Hostel Marks
1798 Manoj Rathod 7 95
2154 Soumic Banerjee 5 68
2369 Gumma Reddy 7 86
2581 Pradeep Pendse 6 92
2643 Suhas Kulkarni 5 78
2711 Nitin Kadam 8 72
2872 Kiran Vora 5 92
2926 Manoj Kunkalikar
5 94
2959 Hemant Karkhanis
7 88
3125 Rajesh Doshi 5 82

Table: hobby

Roll Hobbyname
1798 chess
1798 music
2154 music
2369 swimming
2581 cricket
2643 chess
2643 hockey
2711 volleyball
2872 football
2926 cricket
2959 photography
3125 music
3125 chess

The following SQL query is executed on the above tables:

Select hostel
From student natural join hobby
Where marks > = 75 and roll between 2000 and 3000;

Relations S and H with the same schema as those of these two tables respectively contain the same information as tuples. A new relation S’ is obtained by the following relational algebra operation:

$$\eqalign{ & S' = \prod\nolimits_{hostel} {(({\sigma _{S.roll = H.roll}}} \cr & ({\sigma _{marks > 75\,\,\,and\,\,roll > 2000\,\,and\,\,roll < 3000}}(S))X(H)) \cr} $$

The difference between the number of rows output by the SQL statement and the number of tuples in S’ is

49

Let r be a relation instance with schema R = (A, B, C, D).

We define $${r_1} = {\pi _{A,B,C}}\left( r \right)$$ and $${r_1} = {\pi _{A,D}}\left( r \right)$$. Let $$s = {r_1}*{r_2}$$ where * denotes natural join. Given that the decomposition of r into r1 and r2 is lossy, which one of the following is TRUE?
50

A company maintains records of sales made by its salespersons and pays them commission based on each individual’s total sales made in a year. This data is maintained in a table with following schema:

salesinfo = (salespersonid, totalsales, commission)

In a certain year, due to better business results, the company decides to further reward its salespersons by enhancing the commission paid to them as per the following formula:

If commission < = 50000, enhance it by 2%
If 50000 < commission < = 100000, enhance it by 4%
If commission > 100000, enhance it by 6%

The IT staff has written three different SQL scripts to calculate enhancement for each slab, each of these scripts is to run as a separate transaction as follows:

T1: Update salesinfo
 Set commission = commission * 1.02
 Where commission < = 50000;

T2: Update salesinfo
 Set commission = commission * 1.04
 Where commission > 50000 and commission is < = 100000;

T3: Update salesinfo
 Set commission = commission * 1.06
 Where commission > 100000;
Which of the following options of running these transactions will update the commission of all salespersons correctly?
51
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?
Select title
 From book as B
 Where (select count(*)
   From book as T
   Where T.price > B.price) < 5;
52
Which one of the following statements about normal forms is FALSE?
53
Consider a relation scheme $$R = \left( {A,\,B,\,C,\,D,\,E,\,H} \right)$$ on which the following functional dependencies hold: $$\left\{ {A \to B,\,\,BC \to D,\,\,E \to C,\,\,D \to A} \right\}.$$ What are the candidate keys of $$R?$$
54
In a schema with attributes $$A, B, C, D,$$ and $$E,$$ following set of functional dependencies are given
$$\eqalign{ & \,\,\,A \to B \cr & \,\,\,A \to C \cr & CD \to E \cr & \,\,\,B \to D \cr & \,\,\,E \to A \cr} $$

Which of the following functional dependencies is NOT implied by the above set?

55
A table has fields, $$F1, F2, F3, F4, F5,$$ with the following functional dependencies:
$$F1 \to F3.\,F2 \to F4.\,\,\,\left( {F1\,.\,F2} \right) \to F5$$ in terms of Normalization, this table is in
56
Consider the entities 'hotel room', and 'person' with a many to many relationship 'lodging' as shown below GATE CSE 2005 Database Management System - Er Diagrams Question 7 English

If we wish to store information about the rent payment to be made by person(s) occupying different hotel rooms, then this information should appear as an attribute of

57
The following table has two attributes $$A$$ and $$C$$ where $$A$$ is the primary key and $$C$$ is the foreign key referencing $$A$$ with on-delete cascade. GATE CSE 2005 Database Management System - Er Diagrams Question 8 English

The set of all tuples that must be additionally deleted to preserve referential integrity. When the tuple $$(2,4)$$ is deleted is:

58
Let $${E_1}$$ and $${E_2}$$ be two entities in an E-R diagram with simple single-valued attributes, $${E_1}$$ and $${E_2}$$ are two relationships between $${E_1}$$ and $${E_2}$$, Where $${E_1}$$ is one-to-many and $${E_2}$$ is many-to-many. $${E_1}$$ and $${E_2}$$ do not have any attributes of their own. What is the minimum number of tables required represent this situation in the relation model?
59
Let $$f$$ be a function from a set $$A$$ to a set $$B$$, $$g$$ a function from $$B$$ to $$C$$, and $$h$$ a function from $$A$$ to $$C$$, such that $$h\left( a \right) = g\left( {f\left( a \right)} \right)$$ for all $$a \in A$$. Which of the following statements is always true for all such functions $$f$$ and $$g$$?
60
Consider the following system of equations in three real variables $$x1, x2$$ and $$x3$$ :
$$2x1 - x2 + 3x3 = 1$$
$$3x1 + 2x2 + 5x3 = 2$$
$$ - x1 + 4x2 + x3 = 3$$
This system of equations has
61
Consider the set $$H$$ of all $$3$$ $$X$$ $$3$$ matrices of the type $$$\left[ {\matrix{ a & f & e \cr 0 & b & d \cr 0 & 0 & c \cr } } \right]$$$

Where $$a, b, c, d, e$$ and $$f$$ are real numbers and $$abc$$ $$ \ne \,\,0$$. Under the matrix multiplication operation, the set $$H$$ is:

62
What are the eigen values of the following $$2x2$$ matrix? $$$\left[ {\matrix{ 2 & { - 1} \cr { - 4} & 5 \cr } } \right]$$$
63
Let $$n = {p^2}q,$$ where $$p$$ and $$q$$ are distinct prime numbers. How many numbers $$m$$ satisfy $$1 \le m \le n$$ and $$gcd\left( {m.n} \right) = 1?$$ Note that $$gcd(m,n)$$ is the greatest common divisor of $$m$$ and $$n$$.
64
Let $$G\left( x \right) = 1/\left( {1 - x} \right)2 = \sum\limits_{i = 0}^\infty {g\left( i \right)\,{x^1}} \,\,\,,$$
where $$\left| x \right| < 1$$ What is $$g(i)$$?
65
What is the minimum number of ordered pairs of non-negative numbers that should be chosen to ensure that there are two pairs $$(a, b)$$ and $$(c, d)$$ in the chosen set such that $$a \equiv c$$ mod $$3$$ and $$b \equiv d$$ mode $$5$$
66
What is the value of $$\int\limits_0^{2\pi } {{{\left( {x - \pi } \right)}^3}\left( {\sin x} \right)dx} $$
67
Let $$G$$ be the simple graph with 20 vertices and 100 edges. The size of the minimum vertex cover of $$G$$ is 8. Then, the size of the maximum independent set of $$G$$ is:
68
Let $$G$$ be a simple connected planar graph with 13 vertices and 19 edges. Then, the number of faces in the planar embedding of the graph is:
69
The determination of the matrix given below is $$$\left[ {\matrix{ 0 & 1 & 0 & 2 \cr { - 1} & 1 & 1 & 3 \cr 0 & 0 & 0 & 1 \cr 1 & { - 2} & 0 & 1 \cr } } \right]$$$
70
The following is the Hasse diagram of the poset $$\left[ {\left\{ {a,b,c,d,e} \right\}, \prec } \right]$$

The poset is:

GATE CSE 2005 Discrete Mathematics - Set Theory & Algebra Question 39 English
71
Let $$A$$, $$B$$ and $$C$$ be non-empty sets and let $$X = (A - B) - C$$ and $$Y = (A - C) - (B - C)$$

Which one of the following is TRUE?

72
Which one of the following graphs is NOT planar? GATE CSE 2005 Discrete Mathematics - Graph Theory Question 29 English
73
The set $$\left\{ {1,\,\,2,\,\,4,\,\,7,\,\,8,\,\,11,\,\,13,\,\,14} \right\}$$ is a group under multiplication modulo $$15$$. The inverse of $$4$$ and $$7$$ are respectively:
74
Let f: $$\,B \to \,C$$ and g: $$\,A \to \,B$$ be two functions and let h = fog. Given that h is an onto function which one of the following is TRUE?
75
Let R and S be any two equivalence relations on a non-emply set A. Which one of the following statements is TRUE?
76
Let A be a set with n elements. Let C be a collection of distinct subsets of A such that for any two subsets $${S_1}$$ and $${S_2}$$ in C, either $${S_1}\, \subset \,{S_2}$$ or $${S_2}\, \subset \,{S_1}$$. What is the maximum cardinality of C?
77
A random bit string of length n is constructed by tossing a fair coin n times and setting a bit to 0 or 1 depending on outcomes head and tail, respectively. The probability that two such randomly generated strings are not identical is:
78
An unbiased coin is tossed repeatedly until the outcome of two successive tosses is the same. Assuming that the tails are independent, the expected number of tosses are
79
Box P has 2 red balls and 3 blue balls and box Q has 3 red balls and 1 blue ball. A ball is selected as follows: (i) select a box (ii) choose a ball from the selected box such that each ball in the box is equally likely to be chosen. The probabilities of selecting boxes P and Q are 1/3 and 2/3, respectively. Given that a ball selected in the above process is a red ball, the probability that it came from the box P is:
80
Let $$f(x)$$ be the continuous probability density function of a random variable X. The probability that $$a\, < \,X\, \le \,b$$, is:
81
A bag contains 10 blue marbles, 20 green marbles and 30 red marbles. A marble is drawn from the bag, its colour recorded and it is put back in the bag. This process is repeated 3 times. The probability that no two of the marbles drawn have the same colour is
82
What is the first order predicate calculus statement equivalent to the following?
Every teacher is liked by some student
83
Let $$P(x)$$ and $$Q(x)$$ be arbitrary predicates. Which of the following statement is always TRUE?
84
Let $$P, Q$$ and $$R$$ be three atomic prepositional assertions. Let $$X$$ denotes $$\left( {P \vee Q} \right) \to R$$ and $$Y$$ denote $$\left( {P \to R} \right) \vee \left( {Q \to R} \right)$$.

Which one of the following is a tautology?

85
What is the swap space in the disk used for?
86
Suppose n processes, P1,......., Pn share m identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process Pi is Si, where Si > 0. Which one of the following is a sufficient condition for ensuring that deadlock does not occur?
87
Consider a disk drive with the following specifications:
$$16$$ surfaces, $$512$$ tracks/surface, $$512$$ sectors/track, $$1$$KB/Sector, rotation speed $$3000$$ rpm. The disk is operated in cycle stealing mode whereby whenever one $$4$$ byte word is ready it it's sent to memory; similarly, for writing, the disk interface reads a $$4$$ byte word from the memory in each $$DMA$$ cycle Memory cycle time is $$40$$nsec. The maximum percentage of time that the $$CPU$$ gets blocked during $$DMA$$ operation is:
88
Normally user programs are prevented from handling $${\rm I}/O$$ directly by $${\rm I}/O$$ instructions in the for $$CPU$$ having explicit $${\rm I}/O$$ instructions, such $${\rm I}/O$$ protection is ensured by having the $${\rm I}/O$$ instructions privilege in $$CPU$$ with memory mapped $${\rm I}/O$$ there is no explicit $${\rm I}/O$$ instruction. Which one of the following is true for a $$CPU$$ with memory mapped $${\rm I}/O$$?
89
Consider the following code fragment:
if (fork() == 0)
{
   a = a + 5;
   printf("%d, %d \n", a, &a);
}
else
{
   a = a - 5;
   printf ("%d, %d \n", a, &a);
}

Let $$u,v$$ be the values printed by the parent process, and $$x,y$$ be the values printed by the child process. Which one of the following is TRUE?
90
What does the following C statement declare?
int (*f)(int *);
91
Consider the following C program:
double foo(double); /* Line 1 */
int main () {
  double da, db;
  //input da
  db = foo(da);
}
double foo(double a){
  return a;
}
The above code compiled without any error or warning. If Line 1 is deleted, the above code will show:
92
Consider the following C program:
void foo (int n, int sum) {
  int k = 0, j = 0;
  if(n==0) return;
  k=n%10; j = n /10;
  sum = sum + k;
  foo(j, sum);
  printf("%d",k);
}
int main () {
  int a = 2048, sum = 0;
  foo(a, sum);
  printf("%d\n", sum);
}
What does the above program print?
93
Which one of the following are essential features of an object-oriented programming language?
i) Abstraction and encapsulation
ii) Strictly-typedness
iii) Type-safe property coupled with sub-type rule
iv) Polymorphism in the presence of inheritance
94
An Abstract Data Type (ADT) is
95
A common property of logic programming languages and functional languages is:
96
Consider three decision problems $${P_1},$$ $${P_2}$$ and $${P_3}.$$ It is known that $${P_1}$$ is decidable and $${P_2}$$ is un-decidable. Which of the following is TRUE?
97
Let $${L_1}$$ be a recursive language, and Let $${L_2}$$ be a recursively enumerable but not a recursive language. Which one of the following is TRUE?
98
Consider the language :
$${L_1}\, = \left\{ {w\,{w^R}\,\left| {w \in \left\{ {0,1} \right\}{}^ * } \right.} \right\}$$
$${L_2}\, = \left\{ {w\, \ne {w^R}\,\left| {w \in \left\{ {0,1} \right\}{}^ * } \right.} \right\}$$ where $$ \ne $$ is a special symbol
$${L_3}\, = \left\{ {w\,w\,\left| {w \in \left\{ {0,1} \right\}{}^ * } \right.} \right\}$$

Which one of the following is TRUE?

99
Consider the language :
$${L_1} = \left\{ {{a^n}{b^n}{c^m}\left| {n,m > 0} \right.} \right\}$$ and $${L_2} = \left\{ {{a^n}{b^m}{c^m}\left| {n,m > 0} \right.} \right\}$$

Which of the following statement is FALSE?

100
Let $${N_f}$$ and $${N_p}$$ denote the classes of languages accepted by non-deterministic finite automata and non-deterministic push-down automata, respectively. Let $${D_f}$$ and $${D_p}$$ denote the classes of languages accepted by deterministic finite automata and deterministic push-down automata, respectively. Which one of the following is TRUE?
101
Consider the machine $$M:$$ The language recognized by $$M$$ is: GATE CSE 2005 Theory of Computation - Finite Automata and Regular Language Question 42 English
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12