GATE 2024 (Session 1)
65 questions
MCQ 29 · MSQ 20 · NAT 161-mark 30 · 2-mark 35
Questions 61–65 of 65
Consider the following two regular expressions over the alphabet :
The total number of strings of length less than or equal to 5 , which are neither in nor in , is ____
The total number of strings of length less than or equal to 5 , which are neither in nor in , is ____
Answer: 44
Count of all strings of length 0 to 5: .
- For : the empty string and the all-0 and all-1 strings of lengths 1-5 give .
- For : at each length 1-5 we get strings of the form and . Length 1 ("0", "1") is already in r, so the new strings are .
Strings in r or s: . Strings in neither: .
Answer: 44
- For : the empty string and the all-0 and all-1 strings of lengths 1-5 give .
- For : at each length 1-5 we get strings of the form and . Length 1 ("0", "1") is already in r, so the new strings are .
Strings in r or s: . Strings in neither: .
Answer: 44
Consider a memory management system that uses a page size of . Assume that both the physical and virtual addresses start from 0. Assume that the pages , and are stored in the page frames , and , respectively. The physical address (in decimal format) corresponding to the virtual address (in decimal format) is ____
Answer: 6596
The page size .
Split the virtual address: this gives page 1 and offset 452.
Page 1 sits in frame 3.
So the physical address
Answer: 6596
Split the virtual address: this gives page 1 and offset 452.
Page 1 sits in frame 3.
So the physical address
Answer: 6596
A bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the probability (rounded off to 3 decimal places) that both balls drawn are red is ____
Answer: 0.37 to 0.38
The first ball is red, so 9 red and 15 blue balls are left. That makes 24 balls. Both balls are red only when the second ball is also red:
Answer: 0.375
Answer: 0.375
Consider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and M3 as shown below. and are inputs of . and are inputs of . , and are select lines of , and , respectively.
For an instance of inputs , and , the number of combinations of that give the output is _____
For an instance of inputs , and , the number of combinations of that give the output is _____
Answer: 4
Check each multiplexer one by one:
- M1: both inputs are , so for any A.
- M2: both inputs are , so for any B.
- M3: if , and if .
So only when . A and B can be anything: combinations.
Answer: 4
- M1: both inputs are , so for any A.
- M2: both inputs are , so for any B.
- M3: if , and if .
So only when . A and B can be anything: combinations.
Answer: 4
Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is _____
Answer: 6
The datagram carries bytes of data. Every fragment except the last must carry data in a multiple of 8.
Link 1 (MTU 542): Largest data size take 520. The fragments are 520, 520, 360.
Link 2 (MTU 360): Largest data size take 336.
- 520 336 + 184
- 520 336 + 184
- 360 336 + 24
The fragments are put back together only at the receiver. So the receiver gets fragments.
Answer: 6
Link 1 (MTU 542): Largest data size take 520. The fragments are 520, 520, 360.
Link 2 (MTU 360): Largest data size take 336.
- 520 336 + 184
- 520 336 + 184
- 360 336 + 24
The fragments are put back together only at the receiver. So the receiver gets fragments.
Answer: 6