103 views

Uploaded by Sudhanshu Iyer

- notes.pdf
- Compiler Construction Manual
- siromoney1
- Compiler Design -- Practical Earley Parsing
- Putty (Copy).TmTheme 12
- Pwo Error Log
- take off
- lab3_precedence_associativity.pdf
- Putty (Copy).TmTheme 10
- Alv 11 Linecolor
- Turing Machines
- 3327
- Putty (Copy).TmTheme 13
- Done
- 6
- Lecture 1
- Alv Documentation and Examples11 by Rajagopalan. m
- Putty (Copy).TmTheme 07
- Log
- Import Java

You are on page 1of 23

by five suggested answers or completions. Select the one that is best in each case and then fill in corresponding space on the answer sheet. 1 The value of the prefix expression *5-3 4 is (A) 17 (B) 7 (C) 3 (D) -3 (E) -5 2 A disk unit uses a bit string to record the occupancy or vacancy of its tracks, with 0 denoting vacant and 1 occupied. A 32-bit segment of this string has the hexadecimal value D4FE2003. The percentage of occupied tracks for the corresponding part of the disk ,to the nearest percent ,is (A) 12% (B) 25% (C) 38% (D) 44% (E) 62% 3 A starvation-free job-scheduling policy guarantees that no job waits indefinitely for service. Which of the following job-scheduling policies is starvation-free? (A) Round robin (B) Priority queuing (B) Shortest job first Youngest job first (C) (D) Youngest job first (E) None of the above Questions 4-5 are based on the finite-state machine below with start A and where b/c represents a transition on input b providing out c. 0/0 Start 0/0 A 0/0 1/1 1/0 4 1/0 1/1 D 0/0 B C

What is the output when the input is 001100? (A) 010010 (B) 001001 (C) 001000 (D) 000110 (E) 000010 5 What is the greatest number of 1-output that could be made in response to an input of length 15? (A) 3 (B) 4 (C) 5 (D) 7 (E) ?

In the following code for a stack machine ,PUSH X means push X onto the stack, POP X means Pop the top of the stack into X, and an operator without an operand (ADD,MULT) means pop the top two items off the stack, perform the indicated operation on them ,and push the result back onto the stack. 1) PUSH A 2) PUSH B 3) ADD

4) 5)

POP T1 PUSH B

6) 7) 8)

9) 10) 11)

12)

What is the final of Z? (A) B+C(A+B)2 (B) (B+C)(A+B)2 2 (D) (B+C )(A+B) (E) (B+C)(2)(A+B) 7

?above shows a doubly linked list that (A) makes any node accessible from any other node (B) is a directed tree (C) is a circuit list (D) has one or more illegal links (E) is an example of acyclic graph 8 Consider the following transformations on a string of five bits. T1: Complement any two bits T2: Exchange any two bits Which of the following strings CANNOT be obtained from the strings 00000 by any sequence of applications of T1 and T2? (A) 11011 (B) 10001 (C) 01010 (D) 00100 (E) 00011 9 A procedure that printed the following binary tree A B C

D E F in postorder would output (A) ABCDEF (B) ABDECF (C) DBEAFC (D) DEBFCA (E) DEFBCA 10 What is the least restrictive statement about z that guarantees x > 0 after execution of the following statement? y := z - 4; x := y + 5

2

(A) z < 0 (B) z < -1 (C) z > 0 (D) z >1 (E) z > -1 11 Consider the following grammar G bellow, where S is the start symbol S aSbSa S aaSb S ab Which of the following strings is in language generated by G? (A) aab (B) aabaab (C) aabbaba (D) abbaabb (E) aaabaaab

12 Sally and Sue agree to cooperate in the writing of a Pascal program in which Sally will write the

main program, and Sue will write a function ZAP to be called by the main program, ZAP will have two parameters , x and y , and evaluated a particular function of x and y. Sally and Sue need NOT agree on which of the following in order that their two pieces of code , debugged separately , will be sure to compile and run correctly together? (A) The number of places in which ZAP will be called by the main program (B) Precisely what ZAP is supposed to compute (C) The data type of x and y (D) The data type returned by ZAP (E) The order of parameters a call of ZAP

13

Computer arithmetic is by nature inexact. Suppose that on some machine the result of any binary

arithmetic operation may differ from thecorrect value(i.e., from the result produced by exact arithmetic on the operand actually presented) by as much as 10 percent .what is the largest error that could be introduced by this machine while evaluating the expression 100.0 + 200.0 - 300.0 from left to right? (A) 0.0 (B) 30.0 (C) 30.3 (D) 33.0 (E) 66.0 14 Consider the following Pascal-like program segment. var i , j : integer; procedure P(k, l : integer) ; begin k : = k l; l:=k+l; k:=l-k end ; i := 2; j := 3; P (i , j) ; Both parameters to P are passed by reference, what are the value of i and j at the end of the program segment? (A)i=0, j=2 (B) i=1, j=5 (C) i=2, j=3 (D) i=3, j=2 (E) none of the above 15 The postfix expression ABC/-DE*+ is equivalent to which of the following infix expression? (Assume normal rules of operator precedence.) (A) A/B-C*D+E (B) A-B/C+D*E (C) A-B/(C+D)*E

3

(D) A-B/(C+D*E) (E) (A-B)/(C+D)*E 16 A computer network consists of n interconnected processors. What is the minimum number of communication likes to provide two distinct paths between any two processors? (A) |n/2| (B) n(n-1)/2 (C) n(n-1) (D) n (E) 2n 17 A stack is a appropriate mechanism to use dynamic storage allocation if (A) requests and release occur in last allocated, first freed order (B) requests and release occur in first allocated, first freed order (C) requests and release occur in no particular order, but are of fix size (D) requests and release occur in no particular order, and are of variable size (E) release occur in decreasing order of request size Questions 18-19 are based on the following information Suppose that {S1,S2,SN} is a set of N fixed- length strings ordered alphabetically so that S1 < S2 << Sn .

18 If these strings are hold , in order in an array of N elements, then the time to find the location of S

given the location of Si, 1SN, has order (A) 1 (B) log 2 N (C) N (D) N log 2 N (E) N 2

i+1

19 Suppose that these strings are held in some binary search tree, where nodes consist of a string , a

pointer to the parent (nil if the node is the root), a pointer to the left child(nil if none), and a pointer to the right child(nil if none). The worst-case time to locate the node holding S i+1 given the node holding Si over all i , 1SNand of all possible binary search trees for S1,S2,SN has order (A) 1 (B) log 2 N (C) N (D) N log 2 N (E) N 2 2+3*4-5 20 Assume that subtraction has precedence over addition and multiplication, which are of equal precedence. Also assume that operators of equal precedence are evaluated left to right. What is the value of the expression above? (A) -5 (B) -1 (C) 0 (D) 9 (E) 15 21 The following routine, where procedure Swap exchange its argument, sorts an array A in descending for j := 1 to N-1 for k := 1 to N-j if A(k) < A(k+1) then swap (A(k) , A(k+1)) if initially, for I= 1,2, ,N, then the number of the calls to Swap is (A) N-1 (B) N (C) N(N-1)/2 (D) (N-1)(N-2) (E) N(N-1)

SET

SET

SET

CLR

CLR

C LR

clock

22 Shift register? Has its output inverted and feed back to its input ,as shown in the figure above. The ? which this device can cycle when clock is (A)? (B) ? (C) 1 or 3 (D) 3 or 5 (E) 2 or 6 23 Consider the following recursive definition ? f = 1 if x = 1 f = (x-1)+2x-1 if x > 1 While of following of the positive integers does f(x) define ? (A) 2x-1 (B) x2 (C) x(x+1)/2 (D) x2 - x+1 (E) 2x-1 24 ?computed to other complementation of symbol tables , hash-coded symbol tables are often preferred for use in a compiler because they (A) make it possible to keep track information about a programs identifiers (B) ? information hiding by transforming a programs identifiers to disguised internal form (C) ? if possible to encode lexical block level as part of an identifiers (D) provide access to information about a programs identifiers in nearly constant time (E) acquire less space 25 A black-and white computer graphics display is divided up into an array of pixels as show bellow

Pixel

Each of the pixels can take one of eight gray levels ranging from 0(white) to 7(black). In order to prevent sharp discontinuities of shade, the software system that causes pictures to be displayed enforces the rule that the gray levels of two adjacent pixels cannot differ by more than two. How many the 64 possible assignments of gray levels to two adjacent pixels satisfy this rule? (A) 24 (B) 32 (C) 34 (D) 40 (E) 64 Questions 26-27 are based on the following information If the variables are suitably initialized and if i remains within appropriated bounds , then the following code complements stack operations Push and Pop when the stack is represented as a vector V[1,N] and a pointer i . Push: begin c = x ; i := i+1 ; end Pop: begin i := i-1; x := V[i] ; end 26 Which of the following give the correct initialization for this stack implementation ?

5

(A) i := 0

(B) i := 1

(C) i := N-1

(D) N

27 If is assumed that suitable changes in the initialization code were also made , which of the following

changes to Push and Pop would yield a correct implementation of stack ? . Replace the code for Push with that for Pop and vice versa . Make Push decrement i and Pop increment i . Reverse the order of the statements in both Push and Pop (A) only (B) only (C) only (D) and (E)and

X1 X2 X3 Q

regardless of the actual value applied . if the AND gates shown above has a stuck-at-0 fault on X1 , which of the following represents the minimum set of inputs such that one among of them guaranteed to signal the presence of the fault by means of an incorrect output at Q ? (A) 011 (B) 111 (C) 011,111 (D) 000,001,010,011 (E) 100,101,110,111 29 During instruction interpretation , a processor may be in three states (1) Fetch (2) Defer(for indirect addressing) (3) Execute The interpretation of an instruction involves one of the following sequences states Fetch only Fetch followed by Execute Fetch followed by Defer followed by Execute The connectivity matrix for the states of this processor is

(A)

1 1 1

(B)

1 1 1 0 0 1 1 0 1

(C)

0 1 0 0 0 1 1 0 0

0 1 1 0 0

(D)

1 1 0

(E) 0 1 0 1

0 1 1 0 0 1 1 0 0

0 1

30

6

5 7

5 7 6 5

(D) 4 3

5 6 7

(E) 4 3

5 7 6

31

In the balanced number system the digit are 1, 0 and 1 (for -1). For example, 11.01=121 -

120 + 02-1 - 12-2 = 3/4 Which of the following is NOT a balanced binary representation of the decimal number 6.25 ? (A) 110.01 (B) 111. 11 (C) 1001.01 (D) 1010.01 (E) 1011. 11

32

A computer communication network transmits data at a rate of 10,000,000 bits per second. The speed at which data propagates on this network is 100,000 meters per second. If a message of 10,000

7

bits is send between two stations separated by 1,000 meters, how much time elapses between the start of transmissions and the end of reception ? (A) 0.001 sec (B) 0.0011 sec (C) 0.01 sec (D) 0.011 sec (E) 0.11 sec Virtual Actual Page Page 0 3 1 -2 4 3 0 33 The lookup page table shown above is for a job paged virtual storage system with a page size of 1,024 locations. Each virtual address is in the form [p, d] where page number and the displacement in that page respectively. A virtual address of [0, 514] maps to a actual address of (A) 514 (B) 1024 (C) 3586 (D) 4514 (E) none of the above 34 Consider the following process . begin x:=y; x:=x+l; end If x and y initially 0 and two copies of the process run concurrently sharing the same data. What is the set of the possible values of x after both copies of the process terminate ? (A) {1} (B) {2} (C) {1,2} (D) {0,1} (E) {0,1,2}

35 Which of the following indicates all integer values of n such that ? |log (n+1)| = 1+ |log n|

2 2

36 Consider

the following program segment written in a block structured language (Which is not

Pascal) that uses a stack discipline for a allocating local variables. begin var x , y : real; var i , j : integer; for i: =1 to 10 do begin var j : integer; j : = l; end for j : = 1 to 10 do begin var y : real; y : = 2.0 * j

end end ; suppose integer variables and real variables require one word of storage per variable . How many words of storage are required for the variables of the program segment above ? (A) 4 (B) 5 (C) 6 (D) 14 (E) 24 BC A 00

01

11

10 1 x 0 0 1 1 X 0

37 A switch function f (A,B,C) is defined by the Karnauph map shown in the figure above . The symbol x denotes a Dont care. Which of the following is NOT a valid expression of f ? (A) (BC)( AC) (B) ABCBC (C) (BC)( ABC) (D) (BC) (BC) (E) BCBC 38 If the English vowels are coded by A : 00 E : 01 I : 11 O: 110 U: 111 What is the average number of bits per vowel in coded message whose vowels are a, e, i, o, u have relative frequency 2,3,2,2,1 respectively ? (A) 2,2 (B) 2,3 (C) 2,4 (D) 2,5 (E) 2,6 39 (GR96-49) SaSb The parsing automation below is for context-free grammar with the productions indicated above .

a a Start S S b b aS b S S aS S aS S b

aS

Each state includes certain items, which are productions with dots in their right sides. The parser using this automation , with X1,X2,Xn on the stack, reduces by the production Aa if and only if there is a

path labeled X1,X2,Xn from the start states to a state that include the item Aa(note the dot at the right end) Which of the following stack contents causes the parser to reduce by some production ? (A) a (B) aa (C)bb (D)aaS (E) 40 Consider a singly linked list of the form

F F

L L

Where is a pointer to the first element in the list and is a pointer to the last element in the list. The time of which of the following operation depend on the length of the list? (A) Delete the last element in the list (B) Delete the first element in the list (C) Add an element after the last element in the list (D) Add an element before the first element in the list (E) None of the above

B C

A B C

A C

A B

41 The switching function(A,B,C) produced by the network shown in the figure above is given by (A) ABCABCABC

(E) 42

F ( x) = x i G ( x) = x Si .andF ( x)G ( x) = Ai x i

i =0 i =0 i =0

10

(C) (i/5)-1

(D) (i/5)

(E) (i/5)+1

Questions 43-44 are based on the following information Consider a computer with a cache memory interposed between the processor and the primary memory. The cache is k-way set-associative (for some fixed k); i.e., each location in primary memory maps to(can be cached in) any of k locations in the cache. Let there be P locations in primary memory and C locations in the cache. 43. On the average, how many different locations in primary memory map to a particular location in the cache if k=2? (A) 1 (B) 2 (C) P/C (D) 2P/C (E) P 44. If the value to the user of a k-way set-associative cache is proportional to log 2k and if the cost of building such a cache is proportional to k, what integer value of k should a computer designer choose to maximize the ratio of value to cost? (A) 1 (B) 2 (C) 3 (D) 4 (E) C 45 In a radix 2 number system , the bit string anan-1a1a0 , where each aj[0,1], has the value

a

j =o

(2) j

which of the following is the correct representation of an increasing sequence of consecutive integers a radix 2 ? (A) 0110 -0111 1000 -1001 (B) 01010 01001 01000 00111 (C) 00011 00111 01111 11111

(D)

(E)

46. Consider the following program fragment i := 0 ; read (n) ; while n>1 do begin n := n/2 ; i := i+1 ; end If the value of n is 2k, where k is a positive integer, then the value of i at the fragment will be (A) log2 (log2 n) (B) log2 n (C) n/2 (D) n-1 (E) 2n

G H gate

D

SET

X F

11

SET

Y Y

CLR

X

CLR

clock

47 A D-type flip-flop is a device that ,when clocked stores the value of its input. Two D-type flip-flops and a gate , as shown in the figure above , are to implement a modulo-3 counter with X as the least significant bit, i.e., to generate the count sequence YX=,00,01,10,00.Which of the following specifications of inputs F,G,H, and gate type, respectively, will accomplish this? (A) X X Y NAND (B) X X Y NOR (C) X X Y NOR (D) Y X Y AND

(F)

X X Y NOR

48. A n-way tree is a tree in which each node either is a leaf or has exactly n children, which of the following are true? there is a 4-way tree with 6 leaves if n is odd, there are no nonempty trees with an even number of leaves if n is even, there are no nonempty trees with an even number of nodes (A) only (B) only (C) only (D) and only (E) and

49. A terminal or nonterminal symbol X in a context-free grammar with start symbol S is useful if there is a derivation S uXv uwv, where u, v, and w are strings of terminals. (Note that means derives in 0 or more steps.) In the following grammar, where S, A, and B are nonterminals, and a and b are terminals, which symbol is useful? S AS | AB A a B aB | bB (A) A (B) B (C) S (D) a (E) None of the above 50 Consider the regular expression R = 1 0 * 1* 0 and the finite automation, M with the start state A shown below

C start A B D E

In order for M to accept exactly the strings in the language defined by R, the set of all accepting state(s) of M must be (A) { C } (B) { E } (C) { DE } (D) { CE } (E) { CDE } 51. Suppose that a stack is used to evaluate fully parenthesized arithmetic expressions from left to right. Each operand is placed on the stack, and operators operate on the top two elements of the stack. What is

12

the minimum stack size required for evaluation of the expression below? (((a * b) + c) (d * e)) (A) 1 (B) 2 (C) 3 (D) 4 (E) 5 52. Let L be an identity function, meaning (x) l (x) = x Let U be a unit function, meaning (x) U(x) = L Let be an arbitrary function, meaning (x y) (x) = y Which of the following is FALSE for some x and some? (A) U ((l (x))) = U (l ((x))) (B) l (U ( (x))) = (U (l (x))) (C) (l(U (x))) = l ((U(x))) (D)(U (l (x))) =(l (U (x))) (E) l (U ((x))) = U (l ((x))) 53. If the factorial function for real x is defined by x (n) = x ( x 1 ) ( x 2 ).( x n + 1 ) for all positive integers n, and x (0) = 1, then ( x + 1 ) (n) x ( n) = (A) ( n 1 ) ( n 1) (B) ( n 1 ) ( x + 1 ) ( n) (C) ( n 1 ) ( x + 1 ) ( n 1)

( n 1)

(D) nx

(E) n( x + 1 ) ( n 1) 54. A floating-point number, Which is a fractional part times a power of 2, is represented in a hypothetical computer by: s e m 7 bits 24bits The exponent part e is a 7-bit, excess 64 integer. The mantissa m is a signed magnitude fraction with sign bit s and effective magnitude of 25 bits consisting of a implied leftmost 1 followed by the 24 bits of m. The value of the number represented by 1 1010101 110000 is (A) 0.125 2-43 (B) 0.75 2-43 (C) 0.125 221 (D) 0.75 221 (E) 0.875 221 55. A multiple-function unit CPU has two adders, two multipliers, and a divider. Assume that all arithmetic operations take unit time and that the time to load the inputs of a function unit is negligible. Another piece of hardware supplies operands to the function units so as to maximize at each step the number of operations that can be properly performed simultaneously. How many time units does the CPU take to execute the following program fragment? a := b + c ; d := e * f ; g := e * c ; h := d + e; b := a / c ;

13

(C) Four

(D) Five

(E) Six

var i, j, x : integer read(x); i : = 1; j : = 1; while i < 10 do begin j : = j * i; i : = i + 1; if i = x then exit; end For the program fragment above, written in a Pascal-like language, which of the following statements about the variables i and j must be true after execution of the fragment ? (A) ( j = (x-1)!) ^ ( i x) (B) ( j = 9!) ^ ( i = 10) (C) ( j = 10!) ^ ( i =10) D E Questions 57-58 are based on a linked list of records of type dnode as shown below. A record of type dnode has two fields : val, which is of type integer, and link, which is of type pointer to donde. As in Pascal , let X.denote fieldof data item X, and let Y| be the object to which data item Y points.

57. If HEAD. SPOT and BLOB are all variables, of type pointer to dnode, which sequence of operations should be executed in order to insert the record to which BLOB points after the record to which SPOT points? (A) SPOT : = BLOB; SPOT|.val : = BLOB|.val (B) SPOT|.val : = BLOB|.val; SPOT|.link : = BLOB|.link (C) BLOB|.link : = SPOT|.link; SPOT|.link : = BLOB (D) SPOT|.link : = BLOB; BLOB|.link : = SPOT|.link (E) SPOT|.link : = SPOT|.link; SPOT| : = BLOB|

14

58. Let p and q be of type pointer to dnode and consider the following list structure.

p

3 8 7

q

5

With no references other than the ones shown, assume that a reference-contend garbage-collection discipline is in use. Which of the following assignment statements frees one or more cells that are NOT properly recovered ? (A) q : = p (B) p : = q (C) q| .link : = p (D) p| .link : = q (E) p : = p| .link 59. Which of the following is NOT a context-free language? (A) {0i 1j | i = j 2} (B) {0 j 1j 0k | I + k =j} (C) {0i 1j 0k | i + j = k} (D) {0i 1j | i j} (E) {0i 1j | i j 2i} 60 For n >= 0, let Sn be the number of the 2n subsets of {1, 2, ., n } that do not contain two consecutive integers. Which of the following is a recurrence relation that correctly determines the Sns? (A) S0 = 1, Sn = 2Sn-1 1, n >= 1 (B) S0 = 1, S1 = 2, Sn = Sn-1 + Sn-2 , n >= 2 (C) S0 = 1, Sn = 2Sn-1 + 1, n >= 1 (D) S0 = 1, S1 = 2, Sn = Sn-1 + Sn-2 + 1, n >= 2 (F) None of the above. Questions 61-62 are based on the following information. A palindrome is a string that reads the same from left to right as it does from right to left. Let S be a string and S[k] be the kth character in the string . Let the positive integer n be the number of characters in S. Consider the following program for determining whether or not S is a palindrome PAL : = True; i : = 1; j : = n; while _ _ _ do begin i : = i + 1; j: = j 1 end; (1) if j > i then PAL : = false; 61. Which of the following expressions in place of the _ _ _in the program above will make the program correct (PAL has value true at the end of the program if S is a palindrome and false otherwise ) ? (A) S[i] S[j] or j i (B) S[i] S[j] and j i (C) S[i] = S[j] or j > i (D) S[i] = S[j] and j i (E) S[i] = S[j] and j > i 62. Let n be even. Suppose that half of all the strings S presented to the program are palindromes and that

15

of the others. It is equally probable that the test for being a palindrome will fail the first time for each of the pairs S[1] S[n], S[2] S[n-1], , S[n/2] S[n/2 + 1] where n is the length of the string. On the average, how many times will the statements labeled(1) be executed ? (A) n/4 + 1/8 (B) 3n/8 1/4 (C) n/2 (D) n 1/n (E) n

x2

y2

x1

y1 x0 y0

63 The logic circuit above is used to compare two unsigned 3-bit numbers. X2X1X0 = X and Y2Y1Y0 = Y. where X0 and Y0 are the least significant bits. ( In general, a small circle on any line in a logic diagram indicates logical not.) Which of the following always makes the output Z = 1? (A) X > Y (B) X < Y (C) X = Y (D) X Y (E) X Y SS + S SS S Sa 64. How many distinct parse trees does the string a+aa+a have under the grammar above? (A) Five (B) Six (C) Seven (D) Eight (E) Nine 65. Let S be the statement: for i := 1 to N do V[i] := V[i]+1 Which of the following perform(s) the same changes to V as S? I. i:= 0; while iN do begin i:=i+1; V[i] := V[i]+1 end. II. i:= 1; while iN do

16

begin V[i] := V[i]+1; i:=i+1 end. III. i:=0 while iN do begin V[i+1] := V[i+1]+1; i:=i+1 end. (A) I only (B) II only (C) III only (D) II and III only (E) I and II and III 66. A committee is a group of one or more people. One of whom is designated as its head. Which of the following expressions correctly describe the number of different committees that can be formed from a group of N people? ( Two selections of the same people with two different people as heads count as different committees.) I. N 2 N-1

N N I. _ Ii N N iiI ._= 1N I I

i=i 0

67. p := 1; k := 0; while k<n do begin p := 2*p; k := k+1 end; For the program fragment above involving integers p, k, and n, which of the following is a loop invariant, i.e., true at the beginning of each execution of the loop and at the completion of the loop? (A) p = k+1 (B) p = (k+1) 2 (C) p = (k+1)*2 k

17

(D) p=2 k

Questions 68-70 are based on the following information. A relation is a set of k-tuples for some fixed k. Normally, the k-tuples are shown as rows of a table, and the columns are headed by attributes. As an example, consider the following relation, R0. A B C 0 2 5 4 2 3 0 6 5 4 1 5 Note that the attributes are A, B, and C; and one of the four 3-tuples is (0,2,5), which has 0 as its Acomponent, 2 as its B-component, and 5 as its C-component. The projection PROJ(R,X) of a relation R onto a subset X of its attributes is the relation formed by deleting from the tuples of R those components corresponding to attributes not in X. If two or more tuples thereby become identical, all but one copy is removed from the projection. The selection SEL(R,P) of a relation R by a condition P is the relation formed by deleting all those tuples that do not satisfy P. (A tuple t satisfies P if P is true when attributes occurring in P are replaced by the corresponding component values from t.) 68. For the example relation R0 above, PROJ ( SEL (R0, A<C ), {A,B}) is which of the following relations? (A) A B (B) A B C 0 2 0 2 5 0 6 0 6 5 4 1 4 1 5

(C)

A B C 0 2 5 0 6 5 0 6 5

(D) A C 0 5 4 5

(E) A B 0 2 0 6

69. Which of the following must be true for arbitrary relatons R, subsets X of the attributes of R, and conditions P that invlove only attributes in X? I. PROJ ( SEL(R,P), X) contains every tuple in SEL( PROJ(R,X), P). II. SEL( PROJ(R,X), P) contains every tuple in PROJ(SEL(R,P), X). III. The number of tuples in PROJ(R,X) is greater than or equal to the number of tuples in SEL(R,P). (A) I only (B) I and II only (C) I and III only (D) II and III only (E) I, II and III

18

70. A relation R is said to satisfy the functional dependency X-Y, where X and Y are attributes of R, if every pair of tuples in R that have equal values in their X-components also have equal values in their Ycomponents. Which of the following functional dependencies does the example relation R0 above satisfy? (A) A-B (B) A-C (C) B-C (D) C-A (E)None of the above 71. A 4-to-1 multiplexer has input terminals labeled A, B, C0, C1, C2, C3, an output terminal F and implements the Boolean function : F = C0~B~A C1~BA C2B~A C3BA Thus , in the figure.

X Y

B A

C0

C1

C2

C3

where signals X, Y, ~Z and the constants 0 and 1 are connected as shown., the multiplexer implements the function: ~Z~XY X~Y which of the following input combinations would NOT yield this function ? A X Y X Z B Y Z Z Y C0 0 X Y X C1 1 ~Y ~Y X C2 ~Z X 0 ~X C3 0 0 ~Y 0

(A) (B) (C) (D) (E) All of the input combinations listed would yield this function

Faulty

U1 Faulty

19

U2

72. The directed graph shown above represents a system of two processors U1 and U2, diagnosing one another, with each one indicating that the other is faulty. It is assured that a correctly functioning processor will always correctly diagnose the other processor, but that a faulty processor may indicate that the processor it is testing is either correct or faulty regardless of the latters actual condition. The four possibilities that can occur are indicated as A1, A2, A3, A4 below. U1 Correct Correct Faulty Faulty (D) {A2, A3} U2 Correct Faulty Correct Faulty (E) {A2, A3, A4}

(A) {A2}

73. Consider the following simultaneous equations. 3x+ 9y + 6z=35 7x+21y+ 14z=15 5x+ 8y+ z=25 Which of the following is true? (A) There exists a unique set of values for x, y, and z that satisfies these equations; all the values have the same sign. (B) There exists a unique set of values for x, y, and z that satisfies these equations; not all the values have the same sign. (C) There exist many sets of values for x, y, and z that satisfy these equations. (D) There does not exist any set of values for x, y, and z that satisfies these equations. (E) This problem is ill conditioned, and computer solutions will be extremely inaccurate. Questions 74-76 are based on the following information. The retrieval of a record from a new type of storage device, given a key x for this record, is broken up into three processes P1, P2, and P3, as illustrated below.

P1

X Record (x) P2

P3

For example, P1 might hash x, P2 compute an address from the hashed value, and P3 perform the actual retrieve, but the details of what the process do are irrelevant. It is only important to know that the processes must occur sequentially; Pi can not begin until Pi-1 has been completed. Suppose P1, P2, and P3 require times t1, t2, and t3, respectively. 74 The minimum delay between the time P1 receives a key x and the time the Record(x) is retrieved is (A) t1 (B) t3 (C) max(t1, t2, t3) (D) min(t1, t2, t3) (E) t1+ t2+ t3 75 Suppose that there are three processors, with P 1, P2, and P3 each having its own dedicated processors. Let r be the minimum average time interval between requests that the system can handle unbounded delays, which of the following defines r ?

20

(A) r = t1+ t2+ t3 (B) r = ( t1+ t2+ t3)/3 (D) r = min(t1, t2, t3) (E) 3/(1/ t1+1/ t2+1/ t3)

76 Suppose that there are three processors, but each one can execute any of P1, P2, and P3. Let r be the minimum time interval between requests that the system can handle without unbounded delays. Which of the following defines r ? (A) r = t1+ t2+ t3 (B) r = (t1+ t2+ t3)/3 (C) r = max(t1, t2, t3) (E) r =min(t1, t2, t3) (E) r = 3/(1/ t1+1/ t2+1/ t3) Questions 77-78 are based on the following program fragment: var x, y : integer ; procedure P( var a, b, c : integer) ; begin a := b + x ; b := c + y end; begin x := 10 ; y := 15 ; P (y, x, y); Write ( x, y) end 77. If the implementation of var parameters is call-by-reference, what is written by this fragment? (A) 40, 20 (B) 30, 15 (C) 10, 15 (D) 35, 20 (E) 30, 25 78. If the implementation of var parameters is call-by-value-result with values of arguments restored in left-to-right order, what is written by this fragment? (A) 40, 20 (B) 30, 15 (C) 10, 15 (D) 35, 20 (E) 30, 25

79 A finite state machine, comprising a 2-bit register and an 8-word by 2-bit read-only-memory (ROM), is organized as shown in the figure. The input signal, X, may be 0 or 1 and is assumed not to change when a clock pulse occurs, which causes the current ROM output to be loaded into the register. The ROM contents are shown in the table beside the figure.

21

cl ock

A2 0 0 0 0 1 1 1 1

Address A1 0 0 1 1 0 0 1 1

Data A0 0 1 0 1 0 1 0 1 D2 1 0 0 1 0 1 1 0 D1 1 1 0 0 1 1 0 0

Of the following, which best describes this machine? (A) A three bit counter (B) A two-bit up/down counter (C) A three-bit to two-bit data compressor (D) A controller for an eight-state computer (E) A three-bit shift register

80. A 2-to-1 multiplexer and a depth-k tree of 2-to-1 multiplexers are shown below.

22

xi

a b

xk Xk- 1 = i a xi b x xk

. xk . . . . . ...

x2 X1 x2

...

Xk- 1 xk

...

For a depth-n multiplexer tree consider the statement: If the inputs(other than those labeled by some Xj) are chosen from the set S(n) then the tree can be used to realize any combinational function of i(n) variables. Which of the following choices for S(n) and i(n) will make the statement true? I. S(n) = {0, 1} i (n) = n II. S(n) = {0, 1, Xn+1, Xn+1} i (n) = n+1 III. S(n) = {0, 1, Xn+1} i (n) = n+1 A None BI only CII only DI and II only EI II and III ANSWER EDACC AADDE CEBDC BEBAE ABDCD BBDED EBA?AC DDABE

80 f a, f

b 2*2 k-1=2 k k i X Xi. D 58. (B) p:=q . A, q 0 59. A A (0,1,2,3 )

23

- notes.pdfUploaded byHafiz Mujadid Khalid
- Compiler Construction ManualUploaded byelfrich
- siromoney1Uploaded bygaayuiyer
- Compiler Design -- Practical Earley ParsingUploaded byrobertarg72
- Putty (Copy).TmTheme 12Uploaded byaivexuviet6396
- Pwo Error LogUploaded bychristiannivek
- take offUploaded byAl Drin
- lab3_precedence_associativity.pdfUploaded bymemoegyptian
- Putty (Copy).TmTheme 10Uploaded byaivexuviet6396
- Alv 11 LinecolorUploaded byraavi0609
- Turing MachinesUploaded byBilo Bilo
- 3327Uploaded bySoumodip Chakraborty
- Putty (Copy).TmTheme 13Uploaded byaivexuviet6396
- DoneUploaded byTabitha Burke
- 6Uploaded byadviful
- Lecture 1Uploaded byMaria Estrada
- Alv Documentation and Examples11 by Rajagopalan. mUploaded byJaya Sankar
- Putty (Copy).TmTheme 07Uploaded byaivexuviet6396
- LogUploaded byKhang Duy
- Import JavaUploaded bydrunken monkey
- Putty (Copy).TmTheme 08Uploaded byaivexuviet6396
- Tutorial Java ArduinoUploaded byALEJANDRO MORENO ARTUNDUAGA
- Putty (Copy).TmTheme 09Uploaded byaivexuviet6396
- Putty (Copy).TmTheme 11Uploaded byaivexuviet6396
- Putty (Copy).TmTheme 14Uploaded byaivexuviet6396
- PSpice Manual:An IntroductionUploaded byBilal Khattak
- Analysis Report for Occasional Low DC ThroughputUploaded byquaderbtech06
- anyar maneh_apletUploaded byjuliushasan31
- YiLinTeachStmtUploaded bySoonu Aravindan
- Asuro1.BasUploaded byGuillermo Alejandro Montiel

- dm3000_quick start guideUploaded bymariavdenet
- 16 Bit CalculatorUploaded byPankaj Jaiswal
- annotated bibliographyUploaded byapi-302465617
- CrossOver Solo v3.0 Configuration Guide (4801DR-101-03)Uploaded byMurphy B
- Principle of Weak InFeed Echo Permissive Over Reach Transfer Trip SchemesUploaded byThirumal
- Swifts® cable tray systemsUploaded bymonang2390
- Dracast Led2000 Studio Series Info SheetUploaded byJohn
- ONT.at.ScheduleUploaded byman_i_ac
- Uni StrutUploaded bycristhmart
- MPU 9250 RegistersUploaded byAguaForte
- Binder 1Uploaded byadelfawzy1234
- DS9025-05Uploaded byyaidel
- Manual de usuario Panasonic Autoestereo CQRX100UUploaded byrhazhiell
- Electric GripperUploaded byEduardo
- FlexiPacket Microwave Hardware installation guideUploaded bywert83
- lpc177x.lpc178xUploaded bylucasmqs
- Beckhoff Training - Chapters (USA) 3_2018Uploaded byJorge Andril
- Introduction to Microsoft AccessUploaded byReynaldo Rebodos
- SurfShopUserManualUploaded byAgbalaya Olubodun
- P330i Service ManualUploaded byEduardo Mendoza
- Grandstream HT814Uploaded byanon_707832692
- LECTURE 1Uploaded byDevmani Shukla
- 15_242_UHP-ALL-V3.4ENUploaded bynaranjito
- Philips HP OptiGo Service ManualUploaded byJorge Fiser
- Activity 02Uploaded byDenisse Cruz
- HUKINGS Solid State Microwave Generator Data Sheet-HSMG-2450MHz-1000WUploaded byking
- Scanner MaintenanceUploaded byTaur1968
- Web Programming Unit5 2 & 16 MarksUploaded bySubathra Devi Mourougane
- 06 Eurocodes Steel Workshop WALDUploaded byIonut Sava
- Instruction Manual HL2-105Uploaded byСтанислав Георгиев