GATE 2021 (Session 1)
65 questions
MCQ 34 · MSQ 13 · NAT 181-mark 30 · 2-mark 35
Questions 51–55 of 65
An articulation point in a connected graph is a vertex such that removing the vertex and its incident edges disconnects the graph into two or more connected components.
Let T be a DFS tree obtained by doing DFS in a connected undirected graph G.
Which of the following options is/are correct?
Let T be a DFS tree obtained by doing DFS in a connected undirected graph G.
Which of the following options is/are correct?
One or more options are correct.
Answer: (B)
(A) False, see (B).
(B) True. An undirected DFS has only tree edges and back edges, with no cross edges. So the subtrees of different children of the root have no edge between them, and they are joined only through the root. If the root has 2 or more children, removing it splits these subtrees apart, so it is an articulation point. If it has only 1 child, all other vertices lie in that child's subtree, which stays connected through its tree edges, so the root is not an articulation point.
(C) False. If a leaf of T is removed, the rest of T is still a tree that connects all the other vertices, so a leaf is never an articulation point.
(D) False. Take edges , , , and run DFS from (the tree is and , with a back edge). Here is an articulation point, because removing it cuts off . But the path does not pass through .
Answer: (B)
(B) True. An undirected DFS has only tree edges and back edges, with no cross edges. So the subtrees of different children of the root have no edge between them, and they are joined only through the root. If the root has 2 or more children, removing it splits these subtrees apart, so it is an articulation point. If it has only 1 child, all other vertices lie in that child's subtree, which stays connected through its tree edges, so the root is not an articulation point.
(C) False. If a leaf of T is removed, the rest of T is still a tree that connects all the other vertices, so a leaf is never an articulation point.
(D) False. Take edges , , , and run DFS from (the tree is and , with a back edge). Here is an articulation point, because removing it cuts off . But the path does not pass through .
Answer: (B)
Consider the following Boolean expression.
Which of the following Boolean expressions is/are equivalent to (complement of )?
Which of the following Boolean expressions is/are equivalent to (complement of )?
One or more options are correct.
Answer: (B), (C), (D)
Find where is 1, with the input order XYZ.
000 makes the first factor 0. Any input with X=1 and Y=0 (100, 101) makes the second factor 0. Any input with Y=1 and Z=0 (010, 110) makes the third factor 0. The rest give 1, so and .
(A) : the first factor is 0 only at 111, the second only at 010 and 011, the third only at 001 and 101. So (A) is 1 at {0, 4, 6}. It lacks 2 and 5, so it is not . False.
(B) is {4, 5} and is {0, 2, 4, 6}. The union is {0, 2, 4, 5, 6}. True.
(C) , which is the same as (B). Also is {0, 2, 4, 5, 6, 7} and is {0, 1, 2, 4, 5, 6}; their common part is {0, 2, 4, 5, 6}. True.
(D) is {4, 5}, is {2, 6}, is {0}. The union is {0, 2, 4, 5, 6}. True.
Answer: (B), (C), (D)
000 makes the first factor 0. Any input with X=1 and Y=0 (100, 101) makes the second factor 0. Any input with Y=1 and Z=0 (010, 110) makes the third factor 0. The rest give 1, so and .
(A) : the first factor is 0 only at 111, the second only at 010 and 011, the third only at 001 and 101. So (A) is 1 at {0, 4, 6}. It lacks 2 and 5, so it is not . False.
(B) is {4, 5} and is {0, 2, 4, 6}. The union is {0, 2, 4, 5, 6}. True.
(C) , which is the same as (B). Also is {0, 2, 4, 5, 6, 7} and is {0, 1, 2, 4, 5, 6}; their common part is {0, 2, 4, 5, 6}. True.
(D) is {4, 5}, is {2, 6}, is {0}. The union is {0, 2, 4, 5, 6}. True.
Answer: (B), (C), (D)
A relation is said to be circular if and together imply .
Which of the following options is/are correct?
Which of the following options is/are correct?
One or more options are correct.
Answer: (C)
(C) Reflexive and circular gives an equivalence relation.
- Symmetric: let . By reflexivity . Circular on and gives .
- Transitive: let and . Circular gives , and symmetry gives .
(A) On , let . It is reflexive and symmetric. But and while , so it is not transitive.
(B) and (D) The empty relation on a non-empty set is circular, symmetric and transitive (all vacuously), but it is not reflexive.
Answer: (C)
- Symmetric: let . By reflexivity . Circular on and gives .
- Transitive: let and . Circular gives , and symmetry gives .
(A) On , let . It is reflexive and symmetric. But and while , so it is not transitive.
(B) and (D) The empty relation on a non-empty set is circular, symmetric and transitive (all vacuously), but it is not reflexive.
Answer: (C)
A TCP server application is programmed to listen on port number P on host S. A TCP client is connected to the TCP server over the network.
Consider that while the TCP connection was active, the server machine S crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the following behaviors is/are possible?
Consider that while the TCP connection was active, the server machine S crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the following behaviors is/are possible?
One or more options are correct.
Answer: (A), (B), (C)
Let us check every option one by one:
- (A) The client is not told about the crash. If keepalive is not used, a client that waits to receive data may wait forever: possible.
- (B) After the reboot, the application can bind to port P and listen on it again: possible.
- (C) The rebooted server has no record of the old connection. So the client's segment gets a RST in reply: possible.
- (D) A FIN is sent only when a known connection is closed in the normal way: not possible.
Answer: (A), (B), (C)
- (A) The client is not told about the crash. If keepalive is not used, a client that waits to receive data may wait forever: possible.
- (B) After the reboot, the application can bind to port P and listen on it again: possible.
- (C) The rebooted server has no record of the old connection. So the client's segment gets a RST in reply: possible.
- (D) A FIN is sent only when a known connection is closed in the normal way: not possible.
Answer: (A), (B), (C)
Consider two hosts P and Q connected through a router R. The maximum transfer unit (MTU) value of the link between P and R is 1500 bytes, and between R and Q is 820 bytes.
A TCP segment of size 1400 bytes was transferred from P to Q through R, with IP identification value as 0x1234. Assume that the IP header size is 20 bytes. Further, the packet is allowed to be fragmented, i.e., Don't Fragment (DF) flag in the IP header is not set by P.
Which of the following statements is/are correct?
A TCP segment of size 1400 bytes was transferred from P to Q through R, with IP identification value as 0x1234. Assume that the IP header size is 20 bytes. Further, the packet is allowed to be fragmented, i.e., Don't Fragment (DF) flag in the IP header is not set by P.
Which of the following statements is/are correct?
One or more options are correct.
Answer: (A), (C)
Link P R: the datagram is 1400 + 20 = 1420 bytes, which is 1500, so there is no fragmentation. Link R Q (MTU 820): the largest data part is 820 - 20 = 800 bytes, which is a multiple of 8, so it is allowed.
- (A) The 1400 data bytes split into 800 and 600 bytes, giving datagrams of 820 and 620 bytes: TRUE.
- (B) Routers do not store or resend fragments: FALSE.
- (C) IP at Q cannot rebuild the datagram without the lost piece, so the segment is discarded and TCP at P resends the whole segment: TRUE.
- (D) Only the first fragment has the TCP header with the ports: FALSE.
Answer: (A), (C)
- (A) The 1400 data bytes split into 800 and 600 bytes, giving datagrams of 820 and 620 bytes: TRUE.
- (B) Routers do not store or resend fragments: FALSE.
- (C) IP at Q cannot rebuild the datagram without the lost piece, so the segment is discarded and TCP at P resends the whole segment: TRUE.
- (D) Only the first fragment has the TCP header with the ports: FALSE.
Answer: (A), (C)