Graph Theory · Discrete Mathematics
86 questions · asked in 25 of 27 years (2000–2026)
MCQ 59 · MSQ 9 · NAT 181-mark 55 · 2-mark 31
Questions 51–55 of 86
Answer: (C)
The set is a maximal independent set. No two of its nodes are adjacent, and every other node is next to a chosen node, so adding any other node would make the set no longer independent. So an MIS of size exists.
Size is not possible. In a maximal independent set, every node is either in the set or next to a node in it. In a chain, one chosen node covers at most nodes (itself and its two neighbours). So chosen nodes cover at most nodes, and covering all nodes needs , so .
Answer: (C)
Answer: (B)
The chromatic number of a graph is the least number of colors that can color its vertices so that no two adjacent vertices get the same color.
At least colors. The curved edge joins the top-left and bottom-right corners. A path of edges along the grid joins the same two corners (along the top row, then down the right column). Together with the curved edge this gives a cycle of edges. With colors, the colors would have to alternate all the way round the cycle, which an odd cycle cannot do. So an odd cycle needs at least colors (an even cycle needs only ).
colors are enough. The colored figure above uses shades, and no edge joins two vertices of the same shade.
So the chromatic number is .
Answer: (B)
Answer: (C)
- BFS starts at . Its neighbours must all be visited before , which is two steps away. Here comes before and , so this is wrong.
- BFS starts at . Its neighbours are , but is not one of them. So must come before . Here it does not, so this is wrong.
- Start at . Its neighbours go into the queue. Visit : joins the queue. Visit : joins the queue. Visit : nothing new. The queue now gives and then . The order is , which is a valid BFS order.
- Here is visited before , so 's new neighbour is queued before 's new neighbour . So must be visited before , and this order is wrong.
Answer: (C)
Answer: (C)
With adjacency lists, each vertex is visited once, which costs . Each edge is looked at from both of its ends, which costs . So the total time is .
No algorithm can do better in general. It must look at every vertex (for example, isolated vertices give components) and every edge (a single unread edge can join two components). So (A) and (B) are too small, and (D) is larger than needed.
Answer: (C)
Answer: (D)
For an edge in a DAG, always finishes before . When DFS explores the edge from , there are three cases:
- is not yet visited: it becomes a descendant of , so it finishes before .
- is already finished: then directly.
- is still being explored: this would be a back edge, which means a cycle, and a DAG has none.
So always holds.
The other options fail on the graph in the figure with edges . Start DFS at first, then call DFS on , which visits . The times are:
.
For the edge :
- is false, since is false.
- is false, since is false.
- is false, since is false.
Answer: (D)
Keep practising