There are 5 bags labeled 1 to 5. All the coins in a given bag have the same weight. Some bags have coins of weight 10gm, others have coins of weight 11 gm. I pick 1, 2, 4, 8, 16 coins respectively from bags 1 to 5. Their total weight comes out to 323 gm. Then the product of the labels of the bags having 11 gm coins is _____ .
-
Solution
No. of Bags = 5
All coins in a bag have same weight.
Labels: 1 2 3 4 5
No. of coins 1 2 4 8 1 6
As total weight is 323, the Bag with label 1 must contain coins of 11 gm to make the total odd.If we remove it the remaining weight = 323 – 11 = 312 gm
Label: 2 3 4 5
No. of coins: 2 4 8 16
Weights: (I): 10 11 11 10
Total weight = (2 × 10)+ (4 × 11) + (8 × 11) + (16 × 10)
= 20 + 44 +88 + 160 = 312
So, label 1, 3, 4 contains coins of 11 gm.Multiplying these label numbers we get
1 × 3 × 4 = 12.
Suppose a disk has 201 cylinders, numbered from 0 to 200.At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100,105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________number of requests.
-
Solution
No.of Requests= 3
A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands.Assuming that the immediate operand is an unsigned integer,the maximum value of the immediate operand is ______ .
-
Solution
16383
Suppose that the maximum transmit window size for a TCP connection is 12000 bytes. Each packet consists of 2000 bytes. At some point of time, the connection is in slow-start phase with a current transmit window of 4000 bytes.Subsequently, the transmitter receives two acknowledgment.Assume that no packets are lost and there are no time-outs.What is the maximum possible value of the current transmit window in bytes………….?
-
Solution
Since recv-Wind= 12000 B and Packet Size = 2000 B which is MSS here.
So MSS = 2000B then recv-Wind = 6MSS (Maximum Segment Size) and currect Sender Window = 2MSS
Threshold= recv-Wind/2 = 3 MSS {Maximum Segment Size} and currect Sender Window = 2 MSS
Threshold = recv-Wind/2 = 3 MSS which implies transmission is in Slow Start Phase & for each ACK, thesender increases the currect transmit window by Maximum Segment Size (MSS).
After receiving first ACK: currect Sender Window should increase exponetially to 4 MSS but since threshold = 3MSS,currect Sender Window Size goes to threshold which is 3MSS After receiving second ACK: Since now it is in Congestion avoidance phase sender window size increases linearly which makes currect Sender Window = 4MSS = 4 *1MSS = 4*2000 B = 8000 B
A relations R={A, B, C, D, E, F} is given with following set of functional dependencies F={A→B,AD→C, B→F , A→E}Which of the following is candidate key?
-
Solution
Given R={A, B, C, D, E, F}
To find Candidate key.
Solution FD set F = {A→B,AD→C, B→F , A→E}
To find a candidate key, we have to find the attribute closure if attribute closure contains all the attributes which are given in relations, then that will be the candidate key.
{A}+ = {ABFE} (not all the attributes so A is not a candidate key).{AD}+= {ABCDEF} contains all the attributes which are given in relation. So AD is the candidate key.{AC}+={ABCDEF} not all the attributes. So, AC is not a candidate key.
Let us consider three relations R1 (ABD), R2(BCE) and R3(CF). The primary keys of R1, R2 and R3 are A, Band Crespectively. The number of tuples R1, R2 and are 50, 40 and 80 respectively.Maximum size of R1\(\bowtie\) R2\(\bowtie\) R3\(\bowtie\) (is natural join operator)______.
-
Solution
Given Three relations R1 (ABD), R2 (BCE) and R3(CF). Primary keys of R1, R2 and R3 = A, B and C,respectively. Number of tuples in R1, R2 and R3= 50, 40 and 80 respectively.
To find Maximum size of R1\(\bowtie\) R2\(\bowtie\) R3
Solution Size will be same for both (R1 \(\bowtie\) R2)\(\bowtie\) R3 and R1 \(\bowtie\) R2\(\bowtie\) R3) as join is associated and commutative.Maximum size of R1 R2 is 50 as B is the key for R2 joining the result with R3 will give maximum size of 50 as C is the key for R3.
Hence, maximum size of R1 R2 R3 is 50.
A TCP message consisting of 2100 bytes is passed to IP for delivery across two networks. The first network can carry a maximum payload of 1200 bytes per frame and the second network can carry a maximum payload of 400 bytes per frame,excluding network overhead. Assume that IP overhead per packet is 20 bytes. What is the total IP overhead in the second network for this transmission in bytes………..?
-
Solution
Since in the question they have directly given the payload so 2100 will be divided in 1200 and 904 (y =904, because 900 is not a multiple of 8 so we have to pad 4 bits in order to make it a multiple of 8)
So 1200 packet will be divided in 400,400,400 with each having 20B header and 900 will be divided in 400,400,104 (y 104 is same reason mentioned above) each having 20 B header so total overhead is 20* 6 = 120 B /(byte).
Consider a simplified time slotted MaC protocol, where each host always has data to send and transmits with probability p =0.2 in every slot. There is no back off and one frame can be transmitted in one slot. If more than one host transmits in the same slot, then the transmissions are unsuccessful due to collision. What is the maximum number of hosts which this protocol can support, (if each host has to be provided a minimum throughput of 0.16 per time slot)…………..?
-
Solution
Consider n as number of stations,
With given info
Number of frames per slot =n × 0.2 × (0.8)(n – 1)....(i)
We require throughput of 0.16 frames/host per times lot,So considering entire system we should have throughput as 0.16 × n frames/slot....(ii)
Considering max value of n for which throughput =eq. (i)
Value = 2
Max.number of stations = 2
In a sliding window ARQ scheme, the transmitter’s window size is N and the receiver’s window size is M. The minimum number of distinct sequence numbers required to ensure correct operation of the ARQ scheme is
-
Solution
Transmitted window size = N
Race window size = M
Minimum numbers required to execute correct operation of ARQ scheme is maximum of these two which is max (M, N).
Consider a deterministic finite automata of language over alphabets {0, 1}, which does not contain 3 consecutive 0’s Minimum how many states, S,in all, the DFA will have and how many of them will be final states, F?
-
Solution
Given DFA over {0,1} which does not contain 3 consecu-tive 0’s
To find Number of states required
Solution The regular expression for the language
L = {w|w does not contain 3 consecutive 0’s} is
r = 1*+1*01*+1*01*01*∴Number of states, |S| = 4
Number of final states, |F| = 3