GATE 2023
65 questions
MCQ 34 · MSQ 15 · NAT 161-mark 30 · 2-mark 35
Questions 51–55 of 65
Let be a set and denote the powerset of .
Define a binary operation on as follows:
Let . Which of the following statements about is/are correct?
Define a binary operation on as follows:
Let . Which of the following statements about is/are correct?
One or more options are correct.
Answer: (A), (D)
Test the group properties for the symmetric difference on :
- Closure:
- Associativity: yes (it works like XOR on membership)
- Identity: , because
- Inverse: , so every A is its own inverse (it is not the complement: )
Answer: H is a group; the inverse of A is A
- Closure:
- Associativity: yes (it works like XOR on membership)
- Identity: , because
- Inverse: , so every A is its own inverse (it is not the complement: )
Answer: H is a group; the inverse of A is A
Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local host, so a DNS lookup is triggered (by the local DNS server deployed on your local host) over the 3-tier DNS hierarchy in an iterative mode. No resource records are cached anywhere across all DNS servers.
Let RTT denote the round trip time between your local host and DNS servers in the DNS hierarchy. The round trip time between the local host and the web server hosting www.gate-2023.in is also equal to RTT. The HTML file associated with the URL is small enough to have negligible transmission time and negligible rendering time by your web browser, which references 10 equally small objects on the same web server.
Which of the following statements is/are CORRECT about the minimum elapsed time between clicking on the URL and your browser fully rendering it?
Let RTT denote the round trip time between your local host and DNS servers in the DNS hierarchy. The round trip time between the local host and the web server hosting www.gate-2023.in is also equal to RTT. The HTML file associated with the URL is small enough to have negligible transmission time and negligible rendering time by your web browser, which references 10 equally small objects on the same web server.
Which of the following statements is/are CORRECT about the minimum elapsed time between clicking on the URL and your browser fully rendering it?
One or more options are correct.
Answer: (C), (D)
The DNS lookup is iterative over 3 tiers (root, TLD, authoritative). It takes 3 RTT.
Non-persistent HTTP with 5 parallel connections: The base HTML file needs TCP setup plus the request. This is 2 RTT. The 10 objects are fetched in 2 batches of 5. Each batch opens new connections and takes 2 RTT, so the batches take 4 RTT.
Total = 3 + 2 + 4 = 9 RTT.
Persistent HTTP with pipelining: TCP setup takes 1 RTT. The HTML file takes 1 RTT. All 10 objects are pipelined and take 1 RTT together.
Total = 3 + 1 + 1 + 1 = 6 RTT.
Answer: 9 RTTs (non-persistent, 5 parallel) and 6 RTTs (persistent with pipelining)
Non-persistent HTTP with 5 parallel connections: The base HTML file needs TCP setup plus the request. This is 2 RTT. The 10 objects are fetched in 2 batches of 5. Each batch opens new connections and takes 2 RTT, so the batches take 4 RTT.
Total = 3 + 2 + 4 = 9 RTT.
Persistent HTTP with pipelining: TCP setup takes 1 RTT. The HTML file takes 1 RTT. All 10 objects are pipelined and take 1 RTT together.
Total = 3 + 1 + 1 + 1 = 6 RTT.
Answer: 9 RTTs (non-persistent, 5 parallel) and 6 RTTs (persistent with pipelining)
Consider a random experiment where two fair coins are tossed. Let A be the event that denotes HEAD on both the throws, B be the event that denotes HEAD on the first throw, and C be the event that denotes HEAD on the second throw. Which of the following statements is/are TRUE?
One or more options are correct.
Answer: (C), (D)
Probabilities of the events: .
- A and B: they are not independent. The same is true for A and C.
- B and C: they are independent.
- So is TRUE.
Answer: B and C are independent; Prob(B|C) = Prob(B)
- A and B: they are not independent. The same is true for A and C.
- B and C: they are independent.
- So is TRUE.
Answer: B and C are independent; Prob(B|C) = Prob(B)
Consider functions Function 1 and Function 2 expressed in pseudocode as follows:
Let and denote the number of times the statement is executed in Function 1 and Function 2, respectively.
Which of the following statements is/are TRUE?
Let and denote the number of times the statement is executed in Function 1 and Function 2, respectively.
Which of the following statements is/are TRUE?
One or more options are correct.
Answer: (A), (D)
Count the number of times x = x + 1 is executed in each function:
- Function 1: the inner loop runs n times, then n/2, then n/4, times. So .
- Function 2: .
Both counts grow in a linear way: and . Neither is strictly smaller or strictly larger than the other, so o and are false.
Answer: and
- Function 1: the inner loop runs n times, then n/2, then n/4, times. So .
- Function 2: .
Both counts grow in a linear way: and . Neither is strictly smaller or strictly larger than the other, so o and are false.
Answer: and
Let be a simple, finite, undirected graph with vertex set . Let denote the maximum degree of and let denote the set of all possible colors. Color the vertices of using the following greedy strategy:
for
Which of the following statements is/are TRUE?
Which of the following statements is/are TRUE?
One or more options are correct.
Answer: (A), (B)
(A) True. Each vertex takes a colour that none of its already-coloured neighbours has, so no edge gets the same colour at both ends.
(B) True. A vertex has at most neighbours, so at most colours are blocked. At least one of the colours is free, so no colour above is ever used.
(C) False. has but needs colours.
(D) False. Take the path and colour in the order . Then , , (its neighbour has 1), and (neighbours and have 2 and 1). This uses 3 colours, but the path is bipartite with .
Answer: (A), (B)
(B) True. A vertex has at most neighbours, so at most colours are blocked. At least one of the colours is free, so no colour above is ever used.
(C) False. has but needs colours.
(D) False. Take the path and colour in the order . Then , , (its neighbour has 1), and (neighbours and have 2 and 1). This uses 3 colours, but the path is bipartite with .
Answer: (A), (B)