# Questions by Keith Kr

1
True or False: Relational algebra cannot perform aggregate function
2
True or False: DCFL is closed under set difference
1 vote
3
Given a relation R(A, B, C) with functional dependencies set {A &rarr; B, B &rarr; C, C &rarr; B} (i) lossless decomposition is always possible for R (ii) Dependency preserving decomposition is always possible for R. Assume decomposition includes all the attributes ... ) Both (i) and (ii) are false Please explain your answer and what does Assume decomposition includes all the attributes of R mean?
4
Which of the following are true about associative memory. S1: Associative memory is fast memory. S2: Associative memory searches by content and not by accessing the address. a) Both S1 and S2 are true and S2 is correct explanation of S1 b) Both S1 and S2 are true, and S2 is not correct explanation of S1 c) S1 is true but S2 is false d) S1 is false but S2 is true
5
Indicate the type of data hazards (RAW, WAR, and WAW) that exist between the following instructions: I1:ADD R1, R2, R3 ; R1 = R2 + R3 I2:ADD R4, R1, R4 ; R4 = R1 + R4 I3:ADD R3, R1, R2 ; R3 = R1 + R2 I4:ADD R1, R1, R4 ; R1 = R1 + R4 Soln: Between ... in single instruction?(as in I2 and I4) ii)Do we have to consider only consecutive instructions? (as in I1 and I2) or can it be (I1 and I3) too?
6
int f(int &x, int c) { c=c-1; if(c==0) return 1; x=x+1; return f(x,c) * x; } What will be the output for f(p,p), if p is initialized to 4.
7
int main(void) { char p; char *s = "Gate015"; int length = strlen(s); int i=0; for(i=0;i<length;i++) p[i]=s[length-i]; printf("%s",p); return 0; }
8
Consider the following, five binary strings of length 8. 01010010, 11011011, 10011010, 11111011, 01110010 A hash table of size M = 8 (0 to 7) is using open addressing for hashing the binary strings. Assume finding an empty slot directly without collision or after collision is also a probe. Calculate the total number of probes that occur while hashing five strings using linear probing.
1 vote
9
The digital operations such as AND, OR, NOT can be performed by using A)switches B)amplifiers C)rectifiers D)oscillators
10
Consider the following sequence of actions. r1(A) r2(B) w1(C) r3(B) r3(C) w2(B) w3(A) Which of the following time stamp ordering allowed to execute the schedule using basic time stamp protocol? A) (T1, T2, T3) = (10, 30, 20) B) (T1, T2, T3) = (20, 30, 10) C) (T1, T2, T3) = (30, 20, 10) D) (T1, T2, T3) = (10, 20, 30)
1 vote
11
A relation R with 5 attributes A1, A2, A3, A4, A5. Given the following FDs A1 → A2 A2A3 → A5 A4A5 → A1 Find the number of candidates keys that includes attribute A3
12
GIven a relation instance X Y Z 2 8 4 2 10 6 2 12 6 6 4 4 which of the following FDs is satisfied by relation A)XY → Z, Z → Y B)YZ → X, Y → Z C)YZ → X, X → Z D)XZ → Y, Y → X
13
Consider the following statement (i) Primary index is always sparse (ii) Secondary index may or may not be dense Which of the above statement is/are false? A)Only (i) B)Only (ii) C)Both (i) and (ii) D)None of these
14
Disk requests come to a disk driver for cylinders in the order 10, 22, 20, 2, 40, 6 and 38 at a given time when the given disk drive is reading from cylinder 20. The seek time is 6ms per cylinder. 1.What is the total seek time, if the disk arm scheduling algorithm FCFS is ... D)None 2.What is the total seek time, if the closest cylinder next scheduling is used? A)360 ms B)876 ms C)850 ms D)900 ms
15
Consider the following sequential code which is executed in a multiprogramming mode by assuming that each statement can execute independently to achieve the concurrency. If any statement dependent on other statements then those statements will be executed in the order. S1: a = b + c; S2: ... can execute concurrently at the beginning of execution? a)S3 and S4 b)S2 and S3 c)S1 and S2 d)S2 and S4
16
Which of the following are equal things when there is only one CPU in a system. A) Multiprogramming and Multitasking B) Multiprocessing and Multiprogramming C) Multitasking and Multiprocessing D) None of these
1 vote
17
Fragmentation is a. dividing the secondary memory into equal sized fragments b. dividing the main memory into equal size fragments c. fragments of memory world used in a page d. fragments of memory words unused in a page. Please explain.
The minimum number of record movements required to merge five files A (with $10$ records), B (with $20$ records), C (with $15$ records), D (with $5$ records) and E (with $25$ records) is: $165$ $90$ $75$ $65$
Let $L_1$ be the set of all languages accepted by a PDA by final state and $L_2$ the set of all languages accepted by empty stack. Which of the following is true? $L_1 = L_2$ $L_1 \supset L_2$ $L_1 \subset L_2$ None