Professional Documents
Culture Documents
CSE Mock Test-1
CSE Mock Test-1
Wrong answer for MCQ will result in negative marks, (–1/3) for 1 Mark Questions and (–2/3) for 2 Marks Question.
General Aptitude
Number of Questions: 10 Section Marks: 15
Direction for question 1: Fill in the blank with the suitable (D) People who have emigrated to the U�S� have had
word/phrase: to deal with tougher labour laws�
1. There are ________candidates opting for Home Directions for question 5: Select the correct alternative
Science today as a course of study at the college level� from the given choices�
(A) smaller (B) less 5. In a certain code language, if REPTILE is coded
(C) fewer (D) lesser as 49 and CROCODILE is coded as 81, then how is
Directions for questions 2 and 3: Select the correct alterna- ALLIGATOR coded in that language?
tive from the given choices� (A) 95 (B) 100
2. The average weight of a class increases by 1 kg, when (C) 49 (D) 81
A joins the class� Later when B also joins, the average Direction for question 6: Out of the following four sen-
weight further increases by 1/2 kg� If the number of tences, select the most suitable sentence with respect to
students now in the class is 14, the difference in the grammar and usage:
weights of A and B ______� 6. (A) We took a month and a few days to get acclimated
3. Every Saturday evening from 6 pm to 7 pm a game to our new teacher, who is from Baroda�
known as “FAMILY FORTUNES” is telecast on ‘XTV’ (B) We will take month and few days to get acclimat-
channel� The mode of the game is as follows� ed to our new teacher, who is from Baroda�
A table containing prices of different articles is present (C) We have taken month and a fewer days to get ac-
on the monitor� The anchor asks questions regarding the climated to our new teacher, who is from Baroda�
prices of different articles� If you are able to answer these (D) We took a month few days to get acclimated to our
questions correctly, the corresponding article is yours� new teacher, who is from Baroda�
Be the lucky winner by answering the questions that Directions for question 7: Select the correct alternative
follow the table given below: from the given choices�
2500 3000 1500 3500 7. If 0 < x < 1 and 1 + 3x + 5x2 + 7x3 + 9x4 + ��� ∞ = 3, then
2750 1750 3200 2800 the value of x is ____�
(A) 1/2 (B) 1/3
2400 3600 4000 2200
(C) 1/4 (D) 1/5
1800 1200 1600 2250
Direction for question 8: In the following question, the first
3800 3400 3100 2000
and the last sentences of a passage are in order and num-
A discount of 10% is offered on ‘Ultra Microwave bered 1 and 6� The rest of the passage is split into 4 parts and
Oven’ and in the above price table, the list price and numbered as 2, 3, 4 and 5� These 4 parts are not arranged in
the sale price of the above said article are adjacent to the proper order� Read the sentences and arrange them in a
each other, not necessarily in the same order� What is logical sequence to make a passage and choose the correct
its sale price? sequence from the given order:
(A) `4000 (B) `3600 8. (1) A classic example of how the “get what you want
(C) `1800 (D) `2000 by helping others get what they want” approach
Direction for question 4: Select the statement in which the works is the result that a major automaker got
underlined word is used correctly: when it came out with a new design�
4. (A) These insects adapted themselves very easily to (2) After all, the person turning the wrench knows
new environments� more about the way it really works on the as-
(B) That woman has adapted a child from an orphan- sembly line than the engineers who designed the
age� wrench�
(C) That Telugu family immigrated to Australia last (3) Before making these changes, the management
year� asked the employees who would actually be
4.4 | Mock Test 1
building the new vehicles whether they had any 10. Jane Davis, founder of Get Into Reading, which has
ideas for making the assembly lines more effective� helped Clare Ross so much, discovered the heal-
(4) The workers had dozens of marvelous ideas� ing power of books by accident� An English lecturer
(5) This design necessitated the construction of new at Liverpool University, England, she also taught lit-
plants and the retooling of existing ones� erature courses in her community� In the process she
(6) First, the employees explained that when they had discovered that people derived consolation from great
to go down the steps into the pit to work on the un- writers and the support network the group provided� So
derside of a car, they sometimes slipped and fell, she set up Get Into Reading, which now has more than
injuring themselves� 135 groups�
(A) 5, 3, 4, 2 (B) 3, 4, 2, 5 Which of the statement(s) below is/are logically valid
(C) 2, 5, 4, 3 (D) 4, 3, 2, 5 and can be inferred from the above statements?
Directions for questions 9 and 10: Select the correct alter- (i) Reading gives multiple benefits, both unexpected
native from the given choices� and wholesome�
(ii) Reading helps everyone to set up an association
9. In a parking lot six buses are parked in front of bus
like Get Into Reading�
number 25 and fifteen buses are parked behind bus
(iii) Reading is just a waste of time which makes one
number 45� If six buses are parked between bus num-
hope for an unattainable goal�
bers 25 and 45, then how many buses are there in the
(iv) Reading gives not only help from great writers but
parking lot?
also support from other sources�
(A) 29 (B) 26
(A) (i) and (iii) (B) (i) and (iv)
(C) 15 (D) Cannot be determined
(C) (ii) and (iii) (D) (ii) and (iv)
Directions for questions 11 to 65: Select the correct alter- 14. If the number of telephone calls coming to a telephone
native form the given choices exchange follows Poisson distribution with an average
of 3 calls per hour, then the probability that the number
11. One of the eigenvectors of the matrix
of telephone calls coming to the telephone exchange in
1 0 0 one hour exceeding 3 is _____
A = 0 2 1 is _____
(A) 0�3528 (B) 0�6472
2 0 3 (C) 0�2341 (D) 0�7659
2
15. If f(x) = 2x, g(x) = 3x and h(x) = 3 and (fogoh) (x)
4 2 exists, then the value of (fogoh) (3) is ____
(A) 3 (B) 2
16. Which of the following algorithm can be used to sort
−2 −2 the numbers 1, 2, 3, ���, 99, in O(n) time?
(A) Merge sort
3 −3 (B) Quick sort
(C) 4 (D) −3 (C) Heap sort
−2 −3 (D) Radix sort
17. Consider the following statements:
12. The number of edges in a bipartite graph with 11 verti- I� The minimum number of edges in a connected
ces should be at most ____ graph which is not cyclic on ‘n’ vertices is (n – 1)�
(A) 11 (B) 20 II� A simple connected graph with ‘n’ nodes has
(C) 30 (D) 44 maximum edges�
13. Which of the following is NOT a valid identity for any Which of the following is TRUE?
three arbitrary events A, B and C of a sample space? (A) Only I
(B) Only II
A (C) Both I and II
(A) P = 1 − P ( A/ B )
B (D) Neither I nor II
(B) P(A ∩ B) = P(A) P(B/A)
( n − 1)
(C) P((A ∪ B)/C) = P(A/C) + P(B/C) – P((A ∩ B)/C) n
(D) None of these 2
Mock Test 1 | 4.5
18. A disk has the following parameters: file descriptor of the accepted socket (if there is no
Number of tracks = 360 error)�
Number of blocks per track = 360 II� The return value of receive( ) specifies the number
Disk rotates 600 RPM of bytes read from or if the socket was closed or an
What is the Latency? error was encountered�
(A) 5 seconds (B) 0�5 seconds III� In socket programming close( ) and shut down( )
(C) 0�05 seconds (D) 0�005 seconds functions operate in same way�
19. Which of the following is TRUE? (A) I only (B) I, II only
I� A B-tree of order 3, constructed with n-elements (C) I, II, III (D) II only
which are in ascending order leads to maximum 25. Which of the following is FALSE about the connecting
number of Node splits� device ‘Repeater’?
II� A B+-tree of order 3, constructed with n-elements (A) A Repeater is used to connect segments of a LAN�
which are in descending order leads to maximum (B) A Repeater can connect two LANs of different
number of Node Splits� protocols�
(Assume value of ‘n’ upto 10 elements) (C) A Repeater forwards every frame as it has no fil-
(A) I only (B) II only tering capability�
(C) Both I and II (D) Neither I nor II (D) A Repeater is a generator not an amplifier�
20. Which of the following is always TRUE? 26. Using Caesar Cipher with key = 10, what is the
I� If a program runs on a processor with a higher fre- encrypted message of “GATECS”?
quency, then it implies that the processor always (A) SCETAG (B) AGETSC
executes more number of instructions per second (C) WQJUSI (D) QKDOMC
than a low frequency processor� 27. The binding takes place at, which of the following?
II� If a processor executes more number of instruc- (I) language design time
tions per second then it implies that the processor (II) compile time
always finishes a program faster than a processor (III) load time
which executes fewer instructions per second� (IV) link time (or) run time
(A) I only (B) II only (V) language implementation time
(C) Both I and II (D) Neither I nor II (A) (II), (III), (IV) (B) (II), (III), (IV), (V)
21. A machine has 5-stage pipeline, which uses delay slots (C) (I), (II), (III), (IV) (D) All the above
to handle control dependencies� If the dependencies are 28. Consider the following program:
resolved in the 3rd stage then the number of delay slots var x;
needed to ensure correct operation is __________� function fun1( )
22. A language L consists of all binary strings beginning {
with a ‘1’ such that when its value is converted to deci- var x1 = 20;
mal, is divisible by ‘3’� Then which of the following is document.write (∀x = ∀ + x);
TRUE? }
(A) L can be recognized by a Deterministic Finite Au- function fun2( )
tomata� {
(B) L can be recognized by a Non-deterministic finite var x ;
automata but not by deterministic finite automata� x = 10;
(C) L can be recognized by a deterministic push-down fun1( );
automata but not by a finite automata� }
(D) The language L cannot recognized by any push x = 5
down automata� fun2( );
23. Which of the following problem is decidable? Using static scoping what is the value of x printed when
(A) A Context free language L is regular or not� fun 2( ) is called?
(B) Complement of a CFL is CFL or not� (A) 5 (B) 10
(C) Finding whether a given CFL is empty or not� (C) 20 (D) shows error
(D) Finding whether the intersection of two CFLs is 29. Number of binary trees that can be formed with 3 ele-
empty or not� ments is ______
24. Which of the following is TRUE about socket 30. The root directory of the file system should be placed at
programming? (A) Anywhere on the disk
I� The accept( ) socket call returns the non-negative (B) Fixed location on the disk
4.6 | Mock Test 1
47. Consider a system with processes P1, P2� X is a Binary 50. Consider the following program:
semaphore variable with an initial value of 1 and count int fun (int * x)
is a variable with initial value of 1� {
The processes P1, P2 executes routines P1(), P2() for *x+ = 5;
accessing critical section� return (3 * (* x) – 1) ;
P1 ( ) P2 ( ) }
{ { void main( )
DOWN (X) UP (X); {
count + count - -;
int a = 8, b = 12, s1, s2;
+; s1 = (a/2) + fun(&a);
UP (X); DOWN (X); s2 = fun(&b) * (b/2);
} }
}
Which of the following statement(s) is/are TRUE?
(A) The value of s1 will be same, irrespective of eval-
Consider the following statements (S1, S2, S3) uation order�
S1: The maximum value of count can be infinite� (B) The value of s2 is will be irrespective of evalua-
S2: The system cannot guarantee progress� tion order�
S3: The system doesnot provide Mutual Exclusion� (C) Both (A) and (B)
Which of the above statements is/are TRUE? (D) None of the above
(A) S1only (B) S1 and S3 51. The first 32-bits of an IPv4 header in Hexa-decimal
(C) S2 and S3 (D) S1, S2, S3 notation has a value 4500139CH� Then which of the
48. Consider the function fun() which deletes the duplicate following cannot be concluded by these 32-bits?
elements on a non-empty sorted single linked list� I� The header length is 20 Bytes�
typedef struct SL II� The total length of the packet (both header and
{ data) is 5000 Bytes�
int data; III� The datagram is Last Fragment�
struct SL * next; IV� The fragmentation offset field is 628�
}SLL; (A) III, IV (B) II, III, IV
void fun(SLL *first) (C) II only (D) I, II, III, IV
{ 52. The stations on a wireless ALOHA network are maxi-
SLL *curr = first, *temp; mum of 1200 km apart� Signals propagate with a speed
if (!curr) of 3 × 108 m/s� The maximum number of retransmis-
return ; sion attempts are 15 and for the attempt number 2, by
while (___I___) using Binary exponential Back-off algorithm, which of
{ the following are possible Back-off time values?
temp = curr → next; (A) 0 ms, 1 ms
if (curr → data = = temp → (B) 0 ms, 1 ms, 2 ms, 3 ms
data) (C) 0 ms, 4 ms, 8 ms, 12 ms
curr → next = temp → next; (D) 4 ms, 8 ms
free(temp);
53. Consider the below transition table of a PDA M1:
(____II____)
}} ε 0 1
If first node address is passed to fun( ), Fill in the blanks� → q0 (q1, ε, $) – –
I II q1 (q2, 1, ε) (q1, $, 0$) (q1, $, 1$)
(A) curr temp = temp → next M1 M3
M2 M4
(B) curr curr = curr → next
q2 – – –
(C) ! temp curr = curr → next
(D) temp temp = temp → next Here q0 is the start state and q2 is the final state� The
transition entries has the form (Q, A, B) where Q is the
49. Consider the following Tree traversals of a binary Tree: Target state, A is the top of the stack and B is the sym-
Pre-order: A B C D E F G H J K L M P Q N bols to be written in place of top of stack�
In order: C D E B G H F K L P Q M N J A L(M1) accepts the strings of the form,
Construct a binary tree T from above traversals� The {w/w contains more 1s than 0s}
number of nodes with one child in the tree are _______
Mock Test 1 | 4.9
Based on this information identify the correct transi- is true� If the maximum range of jump instruction is
tions for M1, M2, M3, M4: PC + 4 – X to (PC + 4) + Y� [(PC + 4) – X and
(A) M1: (q1, 1, ε), M2: Not required (PC + 4) + Y are memory address locations]� Then the
M3: (q1, 0, ε), M4: Not required respective values of X and Y would be:
(B) M1: (q1, 1, ε), M2: (q1, 0, 00) (A) –32768 and 32767 (B) 32768 and 32767
M3: (q1, 0, ε), M4: (q1, 1, 11) (C) 131072 and 131068 (D) 131068 and 131072
(C) M1: (q1, 1, 10), M2: (q1, 0, ε) 57. Consider the following code fragment:
M3: (q1, 0, 01), M4: (q1, 1, ε) Loop: LOAD R1, 0(R2) R1 ← M[0 + R2]
(D) M1: (q1, 0, ε), M2: (q1, 1, ε) ADD R1, R1, #1 R1 ← R1 + 1�
M3: (q1, 1, ε), M4: (q1, 0, ε) STORE R1, 0(R2) M[0 + R2] ← R1
54. Consider the following languages: ADD R2, R2, #4 R2 ← R2 + 4�
L1 = {xm yn zp | (m = n ∨ n = p) ∧ m + n + p ≥ 10} SUB R4, R3, R2 R4 ← R3 – R2�
L2 = {xm yn zp | (m = n ∨ n = p) ∧ m + n + p ≤ 10} BNEZ R4, loop Branch to loop if R1! = 0
Which of these languages is/are Regular? Let the initial value of R3 is R2 + 400�
(A) L1 only (B) L2 only The instruction sequence executed on a 5-stage RISC
(C) Both L1 and L2 (D) Neither L1 nor L2 pipeline� (IF: Instruction Fetch, ID: Instruction decode
55. Consider the following languages: and Register fetch, E�x�, execute, MA: Memory Access,
L1 = {ai b2i |i ∈ {1, 2, …}} WB: Write Back) without any forwarding hardware,
L2 = {aibi |i ∈ {1, 2, …}} but register read and write can happen in the same
2
Which of the following statement is correct about L1 clock cycle� Branch outcome is known in the EX stage
and L2? and is handled by flushing the instructions which start-
(A) Both L1 and L2 are CFLs� ed execution before the EX stage of Branch instruction�
(B) L1 is CFL and L2 is recursive but not CFL� If each stage takes 1 clock cycle, then the number of
(C) Complement of L2 is CFL� clock cycles required to execute the given loop will be
(D) L1 is regular and L2 is CFL� ______�
56. Consider a branch instruction which has below format: 58. A floating point number of 20-bit length has the follow-
6 bits 5 bits 5 bits ing format:
opcode RS RT #immediate 1 bits 7 bits
Sign Excess – 64 Exponent Mantissa
The instruction has 6-bit branch type of opcode, 5-bit
registers RS, RT and 16-bit immediate value� The decimal equivalent of the value (5403E)16 is
A Branch instruction performs a modification of _______�
(PC + 4) (address of next instruction) if the condition
Qualified Date
M N
Student Qualification Test
Which of the following possible relations will not hold Boats (bid, bname, color)
if the above ERD is mapped into a relational model? Primary keys are shown with underline�
(A) Student (RNo, Sname) Query: Display the ‘sids’ of sailors who have reserved
(B) Qualification (RNo, TID, Qualified Date) both black and white color boats�
(C) Test (TID, RNo, TName) Which of the following Relational algebra expression
(D) Test (TID, TName) for the above query always gives correct result?
60. Consider the following relations: (A)
Sailor (sid, SName, Rating, Age)
Reserves (sid, bid)
πsid (((σ (Boats)
color =‘black’ ∩ σ(Boats) ) )
color =‘white’ sailor Reserves )
4.10 | Mock Test 1
(
(B) πsid σ(Sailor Reserves
color =‘black’
Boats)
∩ σ(color
Sailor Reserves
=‘white’
Boats)
) V1
Answer Keys
1. C 2. 5 3. B 4. A 5. D 6. A 7. B 8. A 9. A 10. B
11. B 12. C 13. D 14. A 15. 54 16. D 17. C 18. C 19. C 20. D
21. 2 22. A 23. C 24. B 25. B 26. D 27. D 28. A 29. 30 30. B
31. B 32. D 33. C 34. D 35. C 36. B 37. B 38. 1 39. A 40. D
41. C 42. A 43. C 44. B 45. 4.8 46. C 47. B 48. B 49. 8 50. D
51. B 52. C 53. B 54. B 55. B 56. C 57. 1602 58. 15872 59. C 60. C
61. A 62. C 63. B 64. A 65. C
Mock Test 1 | 4.11
condition AX = lX for l = 1
II. Consider the following simple graph
2
The vector 2 is an eigenvector of A Vertices (n) = 5
−2 Edges (E) = 10
Choice (B) (n – 1)n
E=
12. We know that among all bipartite graphs with n verti- 2
ces, the maximum number of edges occur in a complete
Both statements are TRUE. Choice (C)
bipartite graph�
Also, among all the complete bipartite graphs with 1
n vertices, the complete bipartite graph K n −1 n +1 18. Latency or Rotational delay =
2r
,
2 2
r = rotations per second
will have the maximum number of edges if n is odd� 1 minute – 600 rotations
Here n = 11
∴ The complete bipartite graph K 11−1 11+1 = K5,6 60 seconds – 600 rotations
, 1 second – r
2 2
600 1 1 1
will have the maximum number of edges with 11 r = = 10 = = = 0.05 seconds
vertices� 60 2r 2 × 10 20
And the number of edges in K5,6 = 5 × 6 = 30 Choice (C)
Hence the number of edges in a bipartite graph 19. - B-tree construction on 10 elements, either ascend-
With 11 vertices = 30 Choice (C) ing or descending order gives maximum number
of Node splits.
13. Standard Results Choice (D)
- B+-tree, only on descending order of elements
14. Average number of telephone calls coming to a tele- gives worst-case, that is maximum number of
phone exchange = l = 3 calls per hour node splits. Choice (C)
∴ Probability that the number of telephone calls
coming to a telephone exchange exceeds 3 20. Statement I is FALSE. The lower frequency processor
= P (x > 3) = 1 – P (x ≤ 3) may have higher IPC than higher frequency processor.
= 1 – [P (x = 0) + P (x = 1) + P (x = 2) + P (x = 3)] II is also FALSE. Because the processor which ex-
ecutes more number of instructions does not imply that
λ 0 e − λ λ1e − λ λ 2 e − λ λ3e − λ the processor always finishes a program faster�
=1− + + +
0! 1! 2! 3! (Q Different processors requires different number of in-
structions to execute)� Choice (D)
= 1 − e −3 + 3e −3 + e −3 + e −3
9 9
2 2 21. The Dependencies will be resolved in the 3rd stage� If
the delay slot is 2 clock cycles then the pipeline ensures
= 1 – (13e–3) = 0�3528 Choice (A)
correct operation�
2
15. Given f(x) = 2x, g(x) = 3x and h(x) = 3
∴ (fogoh) (3) = f(g(h(3)) = f(g(3)) = f(27) = 54 1 2 3 4 5 6 7 8
Ans : 54 IL S1 S2 S3 S4 S5
16. The given numbers are 1, 2, 3, ���, 99�
IL+1 S1 S2
Each key contains maximum 2-digits
Radix-sort is implemented 2-times (2-Iterations) IL+2 S1
In each Iteration, we perform n-Enqueue operations IT S1
and n-Dequeue operations, Total (2n) operations�
Mock Test 1 | 4.13
If the delay slot is 2 then in the 3rd stage the branch 34. When y = 1, the output of or gate is 1, so NAND gate
instruction will be evaluated and target instruction will outputs will be 1 ⋅ Q = Q, 1 ⋅ Q = Q i.e., output Q, Q
be evaluated in the next cycle. Ans: 2 remains in same state as long as Y = 1, irrespective of X
22. L consists of the binary strings input.
{11, 110, 1001, 1100, 1111, 10010, ...} When Y = 0, the circuit works as follows
i.e., L consists of the numbers which are divisible by 3.
Output Output Output Output
The DFA is shown below:
Y X OR gate OR (Q) NAND NAND gates
1 (Q )
1 gate 2 gates
1 0
0 0 0 1 1 0
0 1 1 0 0 1
1 1
0 So when y = 0, next state depends on X value.
If x = 0, next state = 1
if x = 1, next state = 0
0 x = 0, y = 0
Choice (A)
x = 1, y = 0 x = 0, y = 0
0 1
23. Finding the emptiness of a CFL is decidable. Remaining x = 0/1, y = 1 x = 0/1, y = 1
three problems are undecidable. Choice (C)
x = 1, y = 0
24. Shutdown( ) will block the communication in both
ways. Close( ) will destroy the socket. Choice (B) Choice (D)
25. A repeater does not connect two LANs. It connects seg- 35. F(a, b, c) = πM(2, 5)
ments of LANs. Choice (B) = Sm(0, 1, 3, 4, 6, 7)
26. Caesar Cipher is also referred as shift cipher. bc
a 00 01 11 10
In shift cipher, the encryption algorithm, “shift key
0 1 1 1
characters down” i.e., towards the end of the alphabet.
(with key as some number). 1 1 1 1
For GATECS with key = 10, the encrypted message is
QKDOMC. Choice (D) = a1c + b1c1 + ab
27. Binding can take place at language design time, lan- bc
guage implementation time, compile time, load time a 00 01 11 10
and link time. 0 1 1 1
Choice (D) 1 1 1 1
28. According to static scoping, the value of ‘x’ will be 5,
as fun1( ) will associate with global variable of ‘x’. = a1b1 + bc + ac1
Choice (A) So both (A) and (B) choices are true. Choice (C)
29. Number of binary tree structures with 3 elements is 36. Let p : Ramu is in the class
6 2n
Cn And q : Lokesh is in the playground
C3
= 5 (With ‘n’ element it is .) ∴ The propositions S1, S2 and S3 can be symbolically
3+1 ( n + 1)
represented as
Number of binary trees that can be formed with n nodes S1 : p → q ; S2 : p and S3 : q
2n Cn ∴ p, p → q ⇒ q (By modus ponens)
is × n ! = 5 × 3 ! = 30 Ans: 30 ∴ S3 logically follows from S1 and S2
n +1 Also, when p is false and q is true, p → q is true
i.e., when S1 and S3 are true, S2 is false.
30. Root directory is placed at fixed location on the disk
Hence S2 does not logically follow from S1 and S3
Choice (B)
Choice (B)
Process execution time
31. Efficiency = � 37. Among the options given, consider option (B), (S2, X6)
Waiting time + Process execution time where S2 = {1, 2, 3, 4, 5}
As the switching of the processes and the execution of For 3, 4 ∈ S2, 3 X6 4 = 0 ∉ S2
process takes same amount of time, the efficiency will ∴ S2 does not satisfy closure axiom under ‘X6’
be 50%� Choice (B) Hence (S2, X6) is not an abelian group Choice (B)
4.14 | Mock Test 1
A ⇓
A
B
B
CDE GHFKLPQMNJ F
⇓ C
J
G
A D
K
H
E L
B M
N
F PQ
C
KLPQMNJ ⇓
DE GH A
⇓
B
A
F
C
B J
G
F D
K
H
C E
J L
G M
D
KLPQMN N
H P
E
⇓ Q
The timing diagram for the 1st iteration of the loop is shown below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
I1 IF ID EX MA WB
I2 IF Stall Stall ID EX MA WB
I3 IF Stall Stall ID EX MA WB
I4 IF ID EX MA WB
I5 IF Stall Stall ID EX MA WB
I6 IF Stall Stall ID EX MA WB
I7 IF ID
Mock Test 1 | 4.17
From the Timing diagram we can observe that 2 stages Option (B)
of two iterations are overlapped. So for 1st 99 itera-
tions it takes 16 clock cycles and 100th iteration takes Sid Sname Rating age bid bname color
18 clock cycles. 11 Anu 7 30 201 A black
12 Radha 8 20 201 A black
∴ Number of clock cycles for 100 iterations 15 Sita 7 30 201 A black
= 99 × 16 + 18 = 1602 Ans: 1602
58. Given number is (5403E)16 Sid Sname Rating age bid bname color
= 0101 0100 0000 0011 1110 11 Anu 7 30 203 C white
13 Sita 6 40 203 C white
Sign = 0 = positive
excess – 64 exponent Result = f (f values should be same under all the col-
= 101 0100 = 84 umns of 2-tables)
Exponent = 84 – 64 = 20 Option (C)
πsid from First part of query
Mantissa = 0.0000 0011 1110 = (0.015)10
∴ Given number = (0.015)10 × 220 = 15872 Sid
Ans: 15872 11
1 7 6 5 4 3 2 8 (2nd Swap)
Reserves
Sid bid 2 6 5 4 3 7 8 (3rd Swap)
11 201
11 203 3 5 4 6 7 8 (4th Swap)
12 201
13 203 4 5 6 7 8
14 202
15 201 ∴ 4-swap operations.
II.
Boats
8 1 2 7 3 6 4 5 (1st Swap)
bid bname color
201 A black 1 8 2 7 3 6 4 5 (2nd Swap)
202 B blue
203 C white
204 C red
2 8 7 3 6 4 5 (3rd Swap)
3 7 8 6 4 5 (4th Swap)
Option (A):
σ(Boats) (Boats)
color =‘black’ ∩ σcolor =‘white’ 4 8 6 7 5 (5th Swap)
5 6 7 8
201 A black ∩ 203 C white =f
∴ 5 swap operations.
4.18 | Mock Test 1
V1 V1 A D BC
1 2 1
3 1 4 1
V2 V3 V2 V3
3 A+ = {ABCDE}
2 2 1 key = A
1
V4 V5 V4 V5 A → D Transitivity exists
1 1
D → E It violates 3NF
Total weight = 1 + 1 + 1 + 1 = 4 We need to perform 3NF – Decomposition�
The decomposed tables are R1(ABCD), R2(DE)
Total weight = 1 + 1 + 1 + 1 = 4
Graph 2 Minimum spanning Tree 2 Check for lossless decomposition:
A B C D E
V1 V1
3 4 3 4 R1 (ABCD) ∗ ∗ ∗ ∗ ∗
5 6 5
V2 V3 V2 V3
R2 (DE) ∗ ∗
7 5 6
6 8
7
V4
9
V5 V4 V5 ∴ It is loss less decomposition�
Choice (C)
Total weight = 3 + 4 + 5 + 6 = 18