0% found this document useful (0 votes)
341 views30 pages

Drdo Set 2009

Drdo Set 2009

Uploaded by

Navneet Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
341 views30 pages

Drdo Set 2009

Drdo Set 2009

Uploaded by

Navneet Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 30
Section - A ‘Which of the following statements is/are TRUE? P : A weak entity set does not have a primary key. Q : For a weak entity set to be meaningful, it must be part of a one-to-many relationship set. R : For a weak entity set, it is not required to have a key so that cach tuple is distinguishable S : Every weak entity set corresponds to an identifying entity set. (A) P, QandR are TRUE, (B) P, Qand S are TRUE 3: (C) Q,Rand S are TRUE, @) P,Q,Rand S are TRUE Let r(R) be a relation on schema R and s(S) be a relation on schema S. To perform the operation rs, the attribute set of r and s must satisty (A) Res (B) SCR ( Rns= (@) R-S=9 Let R be a relational schema and let F be a sot of functional dependencies on R. Let Ry and Ro form a decomposition of R. For lossless-join decomposition of R, F must contain (A) R,UR,9R, or R,UR, OR, (B) R,UR,9R, of RAR, SR (©) BUR, SR, of ROR, SR @) RAR, >R, or RAR, +R, Ina B+ nee, we store the data value in (A). intermediate node. (B) leaf node. (C)_ both in intermediate node and leaf node. (D) neither in intermediate node nor in leaf node, A relation with 2 attributes is always in (A) 4NF (8) BCNF (© SNF () DNF In an RDBMS with m atributes, how many super keys are possible? om B) m © 2 @ 2 An RDBMS with 3 attributes has the following functional dependencies: ASB ASC C3RB ‘Then the RDBMS must be in (A) 2NF (®) 3NF (©) 4NF (@) BCNF 09-C35-¥-3/36 9. 10. Let R be an RDBMS with attributes Ai, Ax Let § denotes the set {Aj, Ass sss An}: Let TS be a set of attributes that forms candidate key. ‘Then which of the following is/are TRUE? P ; T38-T Q : SPCT st PS-P R : WQDT st Q9S-Q (A) Only Pis TRUE (B) PandQare TRUE (©) PandR are TRUE ) QandR are TRUE Two concurrent iansactions Ty and T; operate on two data items A and B as follows: Ti: lock-X(B); Ta: lock-SiA): read(A); Jock-S(B}; read(B): display(A4B); unlock(A}; uunlock(B); lock-X( ): Exclusive Lock _lock-8( ): Shared Lock ‘Then which of the following is NOT TRUE? (A) Any schedule for the above 2 transactions is conflict serializable. (B) Any schedule for the above 2 transactions is free from deadlock. (©) Transactions obey 2 phase locking protocol (D) Any schedule for the above 2 transactions is view serializable, (Consider the following relational database schema: ‘employee(emp_no, name, address) Project()_ ne, p_name) ‘work_on(emp_no, p na) We have a relational algebra expression on the above schema: THaage EMPLOYEE) —T, ype (Employee @ work _ on) Here ® denotes natural join operator. Then which of the following query best resembles te above relational algebra expression? (A) Find the name of all employees working in a project, (B) Find the name of all employees working in all projects. (€) Find the name of all employees who don’t work in all projects. (D) Find the name of all employees who don’t work in any project. 09-€8-¥-436 i 12, 13, 14, ‘Consider the relational schema of Question 10. Consider the following query. Find all addresses of employees working in the project with p_name = “database”. Which of the following SQL represents the above query? (A) SELECT address FROM employee, project WHERE (p_name=“database") (work_on.emp_no=employee.emp_no) (B) SELECT address FROM employes, project, work_on WHERE (p_name= “database”)/(wwork_on.emp_no=employee.cmp_no)(work_on.p_no=project. p.no) (©) SELECT address FROM employee, work_on WHERE (p_name= “database™)« (work_on.emp_nomemployee.emp_no} (D) SELECT address FROM project, work_on WHERE (p_name=“database)n (work_on.emp_no=employee emp_n0) Consider the tclational schema of Question 10. What does the following query return? {¢|'¥ue project(ufp_no] => Gse employee(t{name] = s{name]) #3v6€ work _on(s{emp_no]= vfemp_no}))} (A)__ Name of the employees who are working in all projects. (B) Name of the employees who are working in at most one project. (C)_Name of the employees who are not working in any project. (D)_ Name of the employees who are working in at least one project. Sivon thet Dias 8 ORB Nat a8 NEA end Fahd PDA, Let L; = L(D) U LON) and L=L(P) NL. Then Lis (A) context-free but may not be regular. (B) regular. (C)_ recursive but not context-free (D) deterministic context-free but not regular. Which of the following isiare TRUE? 1. The language accepted by any Turing machine is recursive. IL Complement of the language accepted by any PDA must be context-free. IIL Every subset of a regular set is regular. (A) Tonly ®) Wonly (©) Tandtt — (D) Tand 09-C3-¥-5/36 15 16. 17. 18, Consider the following DRA: ‘The complement of the language accepted by the DFA is the set of all strings over (a, B} that (A). begins with either aor b. (B) ends with either a or b. (C) contains the substring bb, (D) contains at least two b's. Given Li={a"b'cab | m =n, i+) Lz=(aBed'' i aA |aaA | aaa |: A— aAb|B B+ Bbc ‘The language generated by the grammar G is (A) {a [n, m>0.1> mn) (B) the set of all strings over (a, 6) (including the empty string) that begins with and ends with » and the number of a’s is either equal to or more than the number of b's by 2 or 3. (©) (ab |nzm+3} (D) {a°b"|nsm+3) Given that the language L; is recursively enumerable and the complement of Lo is recursive. Then there exist some Turing machines M, and Mz such that (A) M; accepts the complement of L; and M; accepts Ly (B)_M, accepts L; and halts on every input and M2 accepts the complement of Lz (C)_-Myaccepis L; U Lz and Mp accepts the complement of Lz (D) M; accepts Ly and Mz accepts the complement of Ly Lz 09-CS-¥-6/36 19. al. 23, 24. ‘The complement of any arbitrary context-free language is accepted by some (A) PDA but not by any DPDA. (B) NEA (©) DPDA (D) Turing machine thet halts on every input. Which of the following is/are undecidable? I. Whether a language accepted by a PDA is ambiguous TL. Whether a given regular language is context-free IIL Whether two CFGs generate the same language IV. Whether a given recursive language is accepted by a Turing machine that halts on every input (A) land (B) Wandiv (C) MandIV (D) Land tv Which of the following is TRUE for the language (a"¥/ | (A) Ibis context-free but net regular. (B) This not accepted by any Turing machine. (©) _Itis accepted by an NFA but not context-free. @)_Itis neither regular nor context-free, If the decision problem IT, is NP-complete and [gs in class NP, then which of the following is TRUE? (A) There is no polynomial time algorithm for Ty, B) If Mg

B @) A 0 I 0 i 0 1 0 1 o|-|-|o|-Jo]o}o|> la|-|-lolo}4||o}e -|-1o|-le|-|S}<} If the initial state is A =0 and B = 0, what is the minimum length of an input string ‘which will take the machine to the state A = 1 and B = 1 with output 1? (A) 3 @) 4 © 5 @) 6 ‘An 8x1 multiplexer has input A, B and C connected to the selection input 8;, 8 and s, respectively. The data input [po Lare as follows: [, L=1; i= =D and |, implements is D_ The Boolean function that the multiplexer (A) £(A,B.C.D) = F(.6,7,9,10,11,12) (BY (A,B,C, D)= 5(0,3,4,5,1112) (C) £(A.B.C.D)= 0,3,5,7.9, 1113.15) (D) FA.BC.D)= $0.1,3-4,5,612) 09-C8-¥-8/36 32. 33. 34. 35. 36. 37. The size of address bus of a microprocessor is 20 bits and the size of data bus is 8 bits. What is the maximum number of RAM chips of size 64 K x 4 that ean be comnecied to this microprocessor? A) 8 B) 16 (© 2% @) 32 Static RAM (A) isa volatile memory ®) isanon-volatile memory (C)_needs refreshing to retain the value (D) contains static information, ic., it cannot be modified Pick up the correet pair in which the first clement refers to the addressing modes ‘with minimum operand fetching time and the second one refers to the addressing, modes with maximum operand fetching time. (A) Register direct and memory indirect, (B) Register dicect and indexed indirect, (C) Immediate and indexed indirect. (D) Immediate and indexed. While an instruction is executed, the Program Counter (PC) should contain the address of (A). the current instruetion (B) the next sequential instruction (C) the operand (D) the previous instruction A typical vertical microinstruction format is characterized by (A) limited encoding with limited parallelism (B) limited encoding with high degree of parallelism (©) high degree of encoding with high degree of parallelism (D) high degree of encoding with limited parallelism In set associative mapping, the cache is divided into v sets, each of which consists of k lines. The requited relationships are: m=vxk andi jmodulo y where (A) i= cache line number; j = main memory block number, m= number of lines in the cache (B) i = main memory biock number; j = cache set aumbec; m= number of blocks in main memory (C) i-=cache set number; the cache (D) 4 =cache set number; j = cache line number; m= number of set in the cache yumber of Hines in jain memory block number, m 09-CS-¥-9136 38. 39. 41. 42. 43 Consider a memory system that uses a 20-bit address to address at the byte level and a cache that uses a 256-byte line size. Assume a direct map cache with a tag field of 6-bit inthe address, The number of blocks in main memory and the number of lines in cache, respectively, are (A) 024,128 (B) 409664 = (C) 4096, 128 (D) 8192, 64 The number of entries in an inverted page table (A) depends on the size of the process. (B)_ is equal to the number of page frames in main memory. (©) is equal to the number of page frames in virtual memory. (D) is equal to the size of the page frame. ‘There are four page frames in the memory. The following sequence of virtual pape numbers is encountered in the course of execution of a program: 3,4,2, 6 4,7,6,1,3,7.35 Assume that main memory is initially empty and LRU replacement policy is adopted. The number of page transferred during this sequence of reference is 5 @) 8 © 10 @) 12 The instruction mix in an application and instruction execution speed of a hypothetical machine are as follows: Instruction Speed (eyele) Occurrence (%) ADD 8 30 SHIFT 4 20 c LOAD 2 30 STORE 12 20 If the clock frequency is 2.3 GHz, the machine performance in MIPS is (A) 230 @) 250 ) 360 (D) 920 ‘The address bus of a computer has 16 address lines, Ajso. If the address assigned to ‘one device is 7CA4i¢ and the address decoder for that device ignores lines As and ‘Ao, What are all the addresses to which this device will respond? (A) TEAS, TCAS 16 TCAGie and IAT ig (B) 708446, 709416. 7CAdis and 1CB4ig (CQ) 7CAti, TDAt«, TEAts and FFAG (D) 7CA4i, 6CAdig SCA4i¢ and 4CA4 ys Ackerman’s function is defined recursively on the non-negative integers as follows An, A) = nel ig m==0 Alm, n) = Alm-1, 1) Alm, n) = Alm-l, Alm, n-1}) Using the above definition A(2, 2) equals: (Ay 2 @) 3 © 6 m 7 09-C3-¥-1036 45. 46, 41. 43. 49. 50. Consider the following C-function that computes (") : else returnicombin-1, r) + conbin-1, r-1)): } ‘How many recursive calls are made to the function “eomb'"? a () B) (";') © fea) o *)-1 r : rl r Insert 2, 1, 4, 5, 9, 3, 6 into an initially empty AVL tree. The preorder traversal of the tee after insertion is, (A) 4,2,1.3.6.5,9 (B) 1.2.4.3,9.5.6 (©) 3.4,1,2,6,9,5 @) 6,5,2,4,3,1,9 The minimum number of comparisons required to sort a sequence of 5 data tems 1s (A) 4 (B) 5 © 6 @) 7 A file contains characters a, ¢, 1, 0, u, sand 1 with frequencies 10, 15, 12, 3,4, 13 and I respectively. If we use Huffman Coding for data compression then the average code i 140 46 130 o @ A) 58. 58. 58 3B ‘A sort method is said to be stable if the relative order of Keys is the same after the sort as it was before the sort. In which of the following pairs both sorting algorithms are stable? (A) Quick-sortand Insertion-sort_ _(B)_Insertion-sort and Merge-sort (©) Quick-sort and Heap-sore (D) Quick-sort and Bubble-sort Insert keys 4, 12, 8, 16, 6 18, 14, 7 into an initially empty binary search tree. Delete the node having the key 6. The preorder traversal after deletion is (A) 4, 12,7,8,24, 18, 16 @B) 4,12, 8,7, 16 18, 24 (©) 4, 12,8,7,24, 18, 16 @) 4,12, 7,8, 16, 18,24 The minimum number of nodes in an AVL tree of height 10 (assuming a tee of height 0 is a tee having only 1 node) is (A) 144 (B) 160 ©) 252 @) 257 09-C3-Y-11/36 31. 52, 53, Let T be a B-tree of order m and height h. Let = [2] and let n be the number of elements in 7, Then which of the following is TRUE? (A) m‘-isn (B) 2d!" ten (©) hSlog, (41) ©) vo (2 Jsisn The maximum number of disk accesses needed for inserting a key into a 2-3 tree of height fis A a ®) % Om @) 341 Consider the following program: void f(int x, int ey, const int 42) ‘ ex void main() int a= 22, b= 33, © = 44; E(a,b.e)s (242-3, b,c); print€(‘astd bebd ceBd\nt, a, by od; : ‘What will be the output of the above program? Consider the following C-function: int £(int a, int b) t if(ea) retumn(ftb.a)); eles iff b==0) rerurn(a); elec ratuen(£{b, abh}): Which of the following will be returned by the function call f[18, 30)? (a) 2 () 3 © 6 8 09-CS-Y-12/36 55. 56. 38. Consider the following C-function: Float £(float x, float y) ( int iz float 2: 48 (2-°0.0) returs 0.0; LE (y==0.0) return 1.0) 05 for (iso; icyy itt) ‘Which value will be returned by the function call ((2.0, ~3.0)? (A) -6.0 By -10 (Q 0.125 @) 15 Consider the following program: tq7 DHINEE(*m=ta, nea, r=t\n", my ny 21) What will be the output of the above program? (A) madd, n= 46,r=45 (B) m=45,n=44,r=45 (C) m=46,n=44r=46 (D) m=46,n=43,r=46 In a C program how many bytes are required to store the string “john’ character array? (a) 2 (B) 3 © 4 © 5 We have the following recurrence relation: 1 ns5 Ce m5 Then which of the following statement is TRUE? (A) Teme 00") (B) Tine Qe/n) (C) Mn)e On) (D) 7(n)e Wnlogn) 09-CS-Y-13/36 39. 1. 62. 63. ‘We have the following recurrence relation: T(n) 1 a aeaive a>l Then which of the following statements is TRUE? (A) Tee O(n) B) Tine O%n'™’) (©) Tine @(n*y @) Tie Wn") ‘What is the total number of Hamiltonian Cycles in a complete graph of n vertices? nl (f=)! (A) at @) (-1)! © [I oO z ‘What is the upper bound on the number of edge disjoint spanning trees in complete graph of n vertices? (A) a @) n-1 © lz] o [3] Ina graph G = (V, EB) the feedback edge set is the set of the minimam number of edges whose removal will make the resultant graph acyclic. Then the cardinality of the feedback edge set for an undirected graph G is A) El-[M+1 @) El-|}) I= 1 @) M-1 Let A, B and C be languages corresponding to decision problems T1,, [1 and 1. respectively. Let A be NP-Complete. Then which of the following is NOT TRUE? (A) AENP. ®) VLENP.L + +10 #3 4 A) 128. The néxtterm in the sequence -—, (A) 16 (B) & © -8 (@) -16 09-C5-¥-20/36 129, 130, 131 ‘The missing term in the sequence 4, 2, 6,4, 8, 8, 10, _, I2is (a) 10 @) 2 © 6 ©) 18 Consider the following figure: When the above figure is rotated clockwise through 90 degrees and held before a plane mirrer, the image obtained will be (A) (B) (Cc) {D) Consider the following sequence of figures: QOO®2) The next figure in the above sequence is best given by (a) ®) © (0) 132. 133. 134, 135 137, Consider the following sequence of figures: 1 AE ‘The next figure in the above sequence is best given by (Ay 8) (ce) (D) Ina diagram there are disjoint hexagons, pentagons and squares. The number of sides of the pentagons added together is equal to the number of sides of the hexagons added together. This number is two more than the number of sides of the squares added together. Then, the number of hexagons is (a) 20 (B) 15 © 2 () 10 shy De integers such that 0< a,

You might also like