Q2➡| Digital Logic Design The format of the single-precision floating-point representation of a real number as per the IEEE 754 standard is as follows:
Which one of the following choices is correct with respect to the smallest normalized positive number represented using the standard?
i ➥ exponent = 00000001 and mantissa = 00000000000000000000001
ii ➥ exponent = 00000000 and mantissa = 00000000000000000000000
iii ➥ exponent = 00000000 and mantissa = 00000000000000000000001
iv ➥ exponent = 00000001 and mantissa = 00000000000000000000000
Q4➡| Theory of Computation Let L ⊆ {0, 1}* be an arbitrary regular language accepted by a minimal DFA with k states. Which one of the following languages must necessarily be accepted by a minimal DFA with k states?
Q6➡| Computer Network Consider the three-way handshake mechanism followed during TCP connection established between hosts P and Q. Let X and Y be two random 32-bit starting sequence numbers chosen by P and Q respectively. Suppose P sends a TCP connection request message to Q with a TCP segment having SYN bit = 1, SEQ number = X, and ACK bit = 0. Suppose Q accepts the connection request. Which one of the following choices represents the information present in the TCP segment header that is sent by Q to P?
i ➥ SYN bit = 1, SEQ number = Y, ACK bit = 1, ACK number = X, FIN bit = 0
ii ➥ SYN bit = 1, SEQ number = X+1, ACK bit = 0, ACK number = Y, FIN bit = 0
iii ➥ SYN bit = 1, SEQ number = Y, ACK bit = 1, ACK number = X+1, FIN bit = 0
iv ➥ SYN bit = 0, SEQ number = X+1, ACK bit = 0, ACK number = Y, FIN bit = 1
Show Answer With Best Explanation
Answer: III
Explanation: Given, Random Sequence number chosen by P is X. Random Sequence number chosen by Q is Y.
P sends a TCP connection request to Q with TCP Segment having, SYN bit = 1, SEQ (Sequence) number = X, ACK bit = 0
Let’s briefly understand some terms, Sequence Number: The Sequence Number for each segment is the number of the 1st Byte carried in that segment. Host can choose any Random Sequence Number.
SYN bit: It is used during connection to synchronize the connection. First TCP segment send by any Host have SYN bit =1. TCP is full Duplex protocol. So, 1st Segment sent by Host P to Host Q and 1st Segment sent by Host Q to Host P contain SYN bit = 1.
ACK bit: The ACK bit =1, indicate the segment contains Acknowledge. The ACK bit =0, indicate the segment does not contain Acknowledge.
ACK(Acknowledge) number: ACK number is the Byte Number expected next. If the receiver of the segment has successfully received Byte Number x from other party, if defines X+1 as the Acknowledge Number.
TCP Segment Header that is sent by Q to P have :
SYN = 1, Because it is 1st Segment sent from Q to P, it is used to Synchronize the connection.
Seq number = y , It is given that y be Sequence number chosen by Q.
Ack number = X+1 , SYN flag consume one Sequence number. Byte number X is consume by Q. So, Q expect X+1 next Byte number.
FIN bit = 0 , when FIN bit = 1, Host want to terminate connection. when FIN bit = 0, Host does not want to terminate connection.
Q7➡| Database Management System Consider the following statements S1 and S2 about the relational data model: S1: A relation scheme can have at most one foreign key. S2: A foreign key in a relation schema R cannot be used to refer to tuples of R. Which one of the following choices is correct?
Q9➡| Data Structure Let H be a binary min-heap consisting of n elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in H?
Q10➡| Engineering Mathematics Let G be a connected undirected weighted graph. Consider the following two statements. S1: There exists a minimum weighted edge in G which is present in every minimum spanning tree of G. S2:If every edge in G has distinct weight, then G has a unique minimum spanning tree. Which of the following options is correct?
[Q16 – Q25 Numerical Answer Type(NAT), carry ONE mark each (no negative marks) ]
Q16➡| Computer Organization Consider a computer system with DMA support, The DMA module is transferring one 8-bit character in one CPU cycle from a device to memory through cycle stealing at regular intervals. Consider a 2 MHz processor. If 0.5% processor cycles are used for DMA, the data transfer rate of the device is ________ bits per second.
Q17➡|Computer Organization Consider a set-associative cache of size 2KB (1KB = 210bytes) with cache block size of 64 bytes. Assume that the cache is byte-addressable and a 32-bit address is used for accessing the cache. If the width of the tag field is 22 bits, the associativity of the cache is __
Q20➡| Data Structure Consider a complete binary tree with 7 nodes, Let A denote the set of first 3 elements obtained by performing Breadth-First Search (BFS) starting from the root. Let B denote the set of first 3 elements obtained by performing Depth-First Search (DFS) starting from the root. The value of |A – B| is _______.
Q22➡| Engineering Mathematics Suppose that P is a 45 matrix such that every solution of the equation Px=0 is a scalar multiple of [2 5 4 3 1]T. The rank of P is _____.
Q24➡| Engineering Mathematics For a given biased coin, the probability that the outcome of a toss is a head is 0.4. This coin is tossed 1,000 times. Let X denote the random variable whose value is the number of times that head appeared in these 1,000 tosses. The standard deviation of X (rounded to 2 decimal places) is ______.
Q25➡| Database Management System A data consisting of 1,50,000 student-records is stored on a hard disk with block size of 4096 bytes. The data file is sorted on the primary key RollNo. The size of a record pointer for this disk is 7 bytes. Each student-record has a candidate key attribute called ANum of size 12 bytes. Suppose an index file with records consisting of two fields, ANum value and the record pointer to the corresponding student record, is built and stored on the same disk. Assume that the records of data file and index file are not split across disk blocks. The number of blocks in the index file is _______.
[Q26 – Q39 Multiple choice Question(MCQ),carry TWO marks each (for each wrong answer: – 2/3) ]
Q26➡| Programming
Assume that the variable y points to a struct (allocated on the head) containing two fields f1 and f2, and the local variables x, y, z, p, q, and i are allotted registers. Common sub-expression elimination (CSE) optimization is applied on the code. The number of addition and de-reference operations (of the form y->f1 or y->f2) in the optimized code, respectively, are:
Q27➡| Engineering Mathematics In an examination, a student can choose the order in which two questions (QuesA and QuesB) must be attempted. • If the first question is answered wrong, the student gets zero marks. • If the first question is answered correctly and the second question is not answered correctly, the student gets the marks only for the first question. • If both the questions are answered correctly, the student gets the sum of the marks of the two questions. The following table shows the probability of correctly answering a question and the marks of the question respectively.
Assuming that the student always wants to maximize her expected marks in the examination, in which order should she attempt the questions and what is the expected marks for that order (assume that the questions are independent)? A First QuesB and then QuesA. Expected marks 22.
i ➥ First QuesB and then QuesA. Expected marks 22.
ii ➥ First QuesA and then QuesB. Expected marks 14.
iii ➥ First QuesB and then QuesA. Expected marks 14.
iv ➥ First QuesA and then QuesB. Expected marks 16.
Q28➡| Theory of Computation Suppose we want to design a synchronous circuit that processes a string of 0’s and 1’s. Given a string, it produces another string by replacing the first 1 in any subsequence of consecutive 1’s by a 0. Consider the following example. Input sequence: 00100011000011100 Output sequence: 00000001000001100
A Mealy Machine is a state machine where both the next state and the output are functions of the present state and the current input. The above mentioned circuit can be designed as a two-state Mealy machine. The states in the Mealy machine can be represented using Boolean values 0 and 1. We denote the current state, the next state, the next incoming bit, and the output bit of the Mealy machine by the variables s, t, b and y respectively. Assume the initial state of the mealy machine is 0. What are the Boolean expressions corresponding to t and y in terms of s and b?
Q29➡| Computer Organization Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements. S1: Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2. S2: Write allocate policy must be used in conjunction with write through caches and no-write allocate policy is used with write back caches.
Q30➡| Algorithms Consider the string abbccddeee. Each letter in the string must be assigned a binary code satisfying the following properties: 1. For any two letters, the code assigned to one letter must not be a prefix of the code assigned to the other letter. 2. For any two letters of the same frequency, the letter which occurs earlier in the dictionary order is assigned a code whose length is at most the length of the code assigned to the other letter. Among the set of all binary code assignments which satisfy the above two properties, what is the minimum length of the encoded string?
Q32➡| Computer Network Consider the cyclic redundancy check (CRC) based error detecting scheme having the generator polynomial X3+X+1. Suppose the message m4m3m2m1m0=11000 is to be transmitted. Check bits c2c1c0 are appended at the end of the message by the transmitter using the above CRC scheme. The transmitted bit string is denoted by m4m3m2m1m0c2c1c0. The value of the checkbit sequence c2c1c0 is
i ➥ 110
ii ➥ 100
iii ➥ 111
iv ➥ 101
Show Answer With Best Explanation
Answer: II
Explanation: Given, Generator Polynomial = X3+X+1 The message m4m3m2m1m0=11000
Q33➡| Engineering Mathematics A bag has r red balls and b black balls. All balls are identical except for their colours. In a trial, a ball is randomly drawn from the bag, its colour is noted and the ball is placed back into the bag along with another ball of the same colour. Note that the number of balls in the bag will increase by one, after the trial. A sequence of four such trials is conducted. Which one of the following choices gives the probability of drawing a red ball in the fourth trial?
Q34➡| Database Management System Let S be the following schedule of operations of three transactions T1, T2 and T3 in a relational database system: R2(Y), R1(X), R3(Z), R1(Y), W1(X), R2(Z), W2(Y), R3(X), W3(Z)
Consider the statements P and Q below: P: S is conflict-serializable. Q: If T3commits before T1finishes, then S is recoverable. Which one of the following choices is correct?
Q35➡| Database Management System The relation scheme given below is used to store information about the employees of a company, where empId is the key and deptId indicates the department to which the employee is assigned. Each employee is assigned to exactly one department. emp(empId, name, gender, salary, deptId)
Consider the following SQL query: select deptId, count (*) from emp where gender = “female” and salary > (select avg(salary) from emp) group by deptId; The above query gives, for each department in the company, the number of female employees whose salary is greater than the average salary of
Q37➡| Compiler Design For a statement S in a program, in the context of liveness analysis, the following sets are defined: USE(S) : the set of variables used in S IN(S) : the set of variables that are live at the entry of S OUT(S) : the set of variables that are live at the exit of S Consider a basic block that consists of two statements, S1 followed by S2. Which one of the following statements is correct?
Q39➡| Theory of Computation Consider the following two statements about regular languages: S1: Every infinite regular language contains an undecidable language as a subset. S2: Every finite language is regular. Which one of the following choices is correct?
[Q40 – Q47 Multiple select Question(MSQ),carry TWO marks each (no negative mark) ]
Q40➡| Theory of Computation Which of the following regular expressions represent(s) the set of all binary numbers that are divisible by three? Assume that the string ∊ is divisible by three.
Q42➡| Computer Network Consider a computer network using the distance vector routing algorithm in its network layer. The partial topology of the network is as shown below:
The objective is to find the shortest-cost path from the router R to routers P and Q. Assume that R does not initially know the shortest routes to P and Q. Assume that R has three neighbouring routers denoted as X, Y and Z. During one iteration, R measures its distance to its neighbours X, Y and Z as 3, 2 and 5, respectively. Router R gets routing vectors from its neighbours that indicate that the distance to router P from routers X, Y and Z are 7, 6 and 5, respectively. The routing vector also indicates that the distanceto router Q from routers X, Y and Z are 4, 6 and 8, respectively.
Which of the following statement(s) is/are correct with respect to the new routing table of R, after updation during this iteration
i ➥ The distance from R to P will be stored as 10.
ii ➥ The next hop router for a packet from R to Q is Z.
iii ➥ The next hop router for a packet from R to P is Y.
iv ➥ The distance from R to Q will be stored as 7.
Show Answer With Best Explanation
Answer: III, IV
Explanation: Given, During one iteration, R measures its distance to its neighbours X, Y and Z as 3, 2 and 5, respectively.
The distance to router P from routers X, Y and Z are 7, 6 and 5, respectively.
The distance to router Q from routers X, Y and Z are 4, 6 and 8, respectively.
Combine all the above three diagram:
Ask, The miinimum Distance from R to P =? The miinimum Distance from R to Q =?
Calculation, The minimum Distance from R to P = min{ R->X->P, R->Y->P, R->Z->P } = min{ 3+7, 2+6, 5+5 } = min{ 10, 8, 10 } = 8 The minimum Distance from R to P is 8 and the next hop router for a packet from R to P is Y.
The minimum Distance from R to Q = min{ R->X->Q, R->Y->Q, R->Z->Q } = min{ 3+4, 2+6, 5+8 } = min{ 7, 8, 13 } = 7 The minimum Distance from R to Q is 6 and the next hop router for a packet from R to Q is X.
Q43➡| Digital Logic Design If the numerical value of a 2-byte unsigned integer on a little endian computer is 255 more than that on a big endian computer, which of the following choices represent(s) the unsigned integer on a little endian computer?
Q44➡| Operating System Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing of resources are done by holding a global lock (L). The following scheme is used to own a resource instance:
i ➥ The scheme may lead to starvation.
ii ➥ The scheme ensures that deadlocks will not occur.
iii ➥ The scheme may lead to live-lock.
iv ➥ The scheme violates the mutual exclusive property.
Q46➡| Theory of Computation For a string w, we define wR to be the reverse of w. For example, if w = 01101 then wR= 10110. Which of the following languages is/are context-free?
Q47➡| Database Management System Suppose the following functional dependencies hold on a relation U with attributes P, Q, R, S, and T: P⟶ QR RS⟶ T Which of the following functional dependencies can be inferred from the above functional dependencies?
[Q48 – Q55 Numerical Answer Type(NAT),carry TWO marks each (no negative mark) ]
Q48➡| Engineering Mathematics In a directed acyclic graph with a source vertex s, the quality-score of s directed path is defined to be the product of the weights of the edges on the path. Further, for a vertex v other than s, the quality-score of v is defined to be the maximum among the quality-scores of all the paths from s to v. The quality-score of s is assumed to be 1.
The sum of the quality-scores of all the vertices in the graph shown above is _______.
Q49➡| Computer Network Consider a network using the pure ALOHA medium access control protocol, where each frame is of length 1,000 bits. The channel transmission rate is 1 Mbps (= 106bits per second). The aggregate number of transmissions across all the nodes (including new frame transmissions and retransmitted frames due to collisions) is modelled as a Poisson process with a rate of 1,000 frames per second. Throughput is defined as the average number of frames successfully transmitted per second. The throughput of the network (rounded to the nearest integer) is _______.
Show Answer With Best Explanation
Answer: 130 to 140
Explanation: Given, Frame size = 1000 bits Transmission rate (or Bandwidth) = 1Mbps = 106 bps System produces (or Poission Process) = 1000 Frame per second
Ask, Throughput of the System = ?
Formula, The Efficiency of the pure ALOHA = G * e-2G The maximum Throughput = 0.184 (or 18.4%), when G =1. where, G is the average number of Frame produced by the System during one Frame Transmission time.
Let’s Calculate,
Now, System produces 1000 frame per second. Since, Tt (Transmission Time) is 1ms. Then How many Frames are produced by the System in 1 ms. 1 second = 1000 Frame 1000 ms = 1000 Frame 1 ms = 1 Frame
So, Load(G) = 1
Efficiency = G * e-2G = 1 * e-2 = 0.13534
Throughput: Throughput is defined as the average number of frames successfully transmitted per second.
Q50➡| Computer Organization Consider a pipelined processor with 5 stages, Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Write Back (WB). Each stage of the pipeline, except the EX stage, takes one cycle. Assume that the ID stage merely decodes the instruction and the register read is performed in the EX stage. The EX stage takes one cycle for ADD instruction and two cycles for MUL instruction.
Consider the following sequence of 8 instructions: ADD, MUL, ADD, MUL, ADD, MUL, ADD, MUL
Assume that every MUL instruction is data-dependent on the ADD instruction just before it and every ADD instruction (except the first ADD) is data- dependent on the MUL instruction just before it. The Speedup is defined as follows:
Assume that every MUL instruction is data-dependent on the ADD instruction just before it and every ADD instruction (except the first ADD) is data-dependent on the MUL instruction just before it. The Speedup is defined as follows:
Q51➡| Digital Logic design Consider a Boolean function f(w, x, y, z) such that f(w, 0, 0, z) = 1 f(1, x, 1, z) = x + z f(w, 1, y, z) = wz + y The number of literals in the minimal sum-of-products expression of f is _______.
Q52➡| Compiler Design Consider the following augmented grammar with {#, @, <, >, a, B, c} as the set of terminals. S’ ⟶ S S ⟶ S#cS S ⟶ SS S ⟶ S@ S ⟶ < S > S ⟶ a S ⟶ b S ⟶ c Let I0=CLOSURE({S’ ⟶.S}). The number of items in the set GOTO(GOTO(I0, <), <) is __.
Q53➡|Engineering Mathematics Let S be a set consisting of 10 elements. The number of tuples of the form (A, B) such that A and B are subsets of S, and A ⊆ B is _______.
Q55➡| Operating System Consider a three-level page table to translate a 39-bit virtual address to a physical address as shown below:
The page size is 4KB (1KB = 210bytes) and page table entry size at every level is 8 bytes. A process P is currently using 2GB (1GB = 230bytes) virtual memory which is mapped to 2GB of physical memory. The minimum amount of memory required for the page table of P across all levels is_______ KB.