Got it, ! I will collect all graph theory-related questions—including topics like trees, connectivity, and coloring—from Chennai Mathematical Institute (CMI) postgraduate (master's) Computer Science entrance exams, organized year-wise. I’ll include full question texts where possible, with proper citations to the exam source.
I’ll get started and update you soon!
<DATE_TIME>
Part A, Q6:“A simple graph is one with no self-loops or multiple edges. Among the simple graphs with n vertices and at most 20n−3 edges: (a) There is always a graph with all vertices connected to at least 42 other vertices. (b) For all such graphs the number of vertices connected to at least 42 other vertices is at most cn for some constant c<1. (c) There are no graphs with each vertex connected to at most 38 other vertices. (d) None of the above.”(Multiple choice – correct answer is (b)).
Part B, Q1:“An international cellphone company provides service on 7 different frequencies. They have fixed the locations of 100 towers. Any two towers using the same frequency must be at least 100 km apart (to avoid signal interference). (i) Model this problem using graphs. (ii) Describe an algorithm to answer: ‘Is it feasible to set up towers at the given locations and provide service on 7 frequencies?’ The algorithm should output “feasible” if yes, otherwise output the minimum number of frequencies needed to use all 100 towers.”(Graph coloring problem – towers as vertices, edges between towers <100 km apart; ask if graph is 7-colorable, or find the chromatic number if >7).
Part B, Q2:“Let G be a graph in which each vertex has degree at least k. Show that there is a path of length k in G – that is, a sequence of k+1 distinct vertices such that for , is connected to in $ question on long paths in high-degree graphs).
Part B, Q5:“Every employee in a company has one immediate boss (forming a hierarchy tree). For legal reasons, if an employee’s contract isnotterminated, then his boss’s contractcannotbe terminated. How many different sets of employees can be fired? (Count also the case that no one is fired.) Example: for 4 employees arranged with boss relations 1←{2,3}, 2←{4} (see diagram), there are 7 possible firing scribe an efficient algorithmto solve this problem.”(Dynamic programming on a tree – essentially count subsets of a rooted tree respecting the rule).
Part A, Q6:“A simple graph is one with no self-loops or multiple edges. Among the simple graphs with n vertices and at most 20n−3 edges: (a) There is always a graph with all vertices connected to at least 42 other vertices. (b) For all such graphs the number of vertices connected to at least 42 other vertices is at most cn for some constant c<1. (c) There are no graphs with each vertex connected to at most 38 other vertices. (d) None of the above.”(Multiple choice – correct answer is (b)).
Part B, Q1:“An international cellphone company provides service on 7 different frequencies. They have fixed the locations of 100 towers. Any two towers using the same frequency must be at least 100 km apart (to avoid signal interference). (i) Model this problem using graphs. (ii) Describe an algorithm to answer: ‘Is it feasible to set up towers at the given locations and provide service on 7 frequencies?’ The algorithm should output “feasible” if yes, otherwise output the minimum number of frequencies needed to use all 100 towers.”(Graph coloring problem – towers as vertices, edges between towers <100 km apart; ask if graph is 7-colorable, or find the chromatic number if >7).
Part B, Q2:“Let G be a graph in which each vertex has degree at least k. Show that there is a path of length k in G – that is, a sequence of k+1 distinct vertices such that for , is connected to in $ question on long paths in high-degree graphs).
Part B, Q5:“Every employee in a company has one immediate boss (forming a hierarchy tree). For legal reasons, if an employee’s contract isnotterminated, then his boss’s contractcannotbe terminated. How many different sets of employees can be fired? (Count also the case that no one is fired.) Example: for 4 employees arranged with boss relations 1←{2,3}, 2←{4} (see diagram), there are 7 possible firing scribe an efficient algorithmto solve this problem.”(Dynamic programming on a tree – essentially count subsets of a rooted tree respecting the rule).
<DATE_TIME>
Part A, Q7:“Let G=(V,E) be a graph. Define Gˉ to be (V,, where for all , iff . Then, which of the following is true: (a) is always connected. (b) is connected if and only if is not connected. (c) At least one of and is connected. (d) is not connected or is not connected.”(Correct answer is (c), since either a graph or its complement must be connected for any nontrivial ).
Part B, Q1:“You have a set of buildings and roads connecting them (forming a graph with vertices = buildings, edges = roads). (i) Is it always possible to 2-color the buildings (red/blue) so that every road connects a red and a blue building? (ii) Is it always possible to find apreferred set of roads– a set of edges with no two sharing a building, such that each building is incident to at least one chosen road? (iii) Can there be two different preferred sets of roads? Justify with proofs or counterexamples.”(Graph interpretation: (i) asks if every connected road network is bipartite –No, counterexample if it contains an odd cycle; (ii) asks if a perfect matching always exists –No, not for every graph; (iii) asks about uniqueness of perfect matchings – can have multiple matchings).
Part B, Q2:“Let G be aconnectedgraph. We call Ggoodif there exist two distinct vertices x,y such that removing x (or y) keeps G connected. (i) Show that any subgraph of a good graph is itself good iff is good. (ii) Given a good graph, devise a linear-time algorithm to find two such vertices HH$ connected.”(Graph theory on “good” graphs – (i) hereditary property of 2-noncutvertices, (ii) find two non-cut-vertices in O(n+m), (iii) existence of graphs with at most two such vertices).
Part B, Q5:“Let G=(V,E) be an undirected graph. We say S⊆V is acliqueiff for all u,v∈S, the edge . Now, let be a graph in which each vertex has degree at most ve an algorithmto find the largest clique in . What is the complexity of your algorithm?”(Because , a brute-force clique search is feasible; one can try all subsets of bounded size. Expected answer: find maximum clique by checking all neighborhoods – since degree ≤5, cliques are at most size 6, so etc).
Part A, Q7:“Let G=(V,E) be a graph. Define Gˉ to be (V,, where for all , iff . Then, which of the following is true: (a) is always connected. (b) is connected if and only if is not connected. (c) At least one of and is connected. (d) is not connected or is not connected.”(Correct answer is (c), since either a graph or its complement must be connected for any nontrivial ).
Part B, Q1:“You have a set of buildings and roads connecting them (forming a graph with vertices = buildings, edges = roads). (i) Is it always possible to 2-color the buildings (red/blue) so that every road connects a red and a blue building? (ii) Is it always possible to find apreferred set of roads– a set of edges with no two sharing a building, such that each building is incident to at least one chosen road? (iii) Can there be two different preferred sets of roads? Justify with proofs or counterexamples.”(Graph interpretation: (i) asks if every connected road network is bipartite –No, counterexample if it contains an odd cycle; (ii) asks if a perfect matching always exists –No, not for every graph; (iii) asks about uniqueness of perfect matchings – can have multiple matchings).
Part B, Q2:“Let G be aconnectedgraph. We call Ggoodif there exist two distinct vertices x,y such that removing x (or y) keeps G connected. (i) Show that any subgraph of a good graph is itself good iff is good. (ii) Given a good graph, devise a linear-time algorithm to find two such vertices HH$ connected.”(Graph theory on “good” graphs – (i) hereditary property of 2-noncutvertices, (ii) find two non-cut-vertices in O(n+m), (iii) existence of graphs with at most two such vertices).
Part B, Q5:“Let G=(V,E) be an undirected graph. We say S⊆V is acliqueiff for all u,v∈S, the edge . Now, let be a graph in which each vertex has degree at most ve an algorithmto find the largest clique in . What is the complexity of your algorithm?”(Because , a brute-force clique search is feasible; one can try all subsets of bounded size. Expected answer: find maximum clique by checking all neighborhoods – since degree ≤5, cliques are at most size 6, so etc).
<DATE_TIME>
Part A, Q2:“Let T be a tree on 100 vertices. Let ni be the number of vertices in T which have exactly i neighbors. Let . Which of the following is true? (a) (b) (c) (d) None of the above.”(In any tree with 100 vertices, , the sum of degrees, equals , so (b) is correct).
Part B, Q1:“Let G=(V,E) be a graph on n vertices where ∣V∣=n and every vertex’s degree is > .Provethat has a path.(Hint: consider a longest path in .)”(Dirac’s theorem style: a graph with minimum degree > n/2 is – here they only asked to show existence of a ).
Part B, Q5:“Given an undirected weighted graph G=(V,E) with non-negative edge weights, we can compute a minimum cost spanning tree T=(V,E0) and also compute, for a given source , the shortest path distances from to every other vertex. Now weincrease every edge weight by 1. Decide the truth of: (i) is still a minimum spanning tree of the new graph. (ii) All the shortest paths from to other vertices remain unchanged. Provide a proof if true, or a counterexample if false.”(MST claim (i) istrue– adding a constant to all weights doesn’t change the , shortest-path claim (ii) isfalse– counterexample: adding a constant can alter shortest paths even though relative weights shift uniformly).
Part A, Q2:“Let T be a tree on 100 vertices. Let ni be the number of vertices in T which have exactly i neighbors. Let . Which of the following is true? (a) (b) (c) (d) None of the above.”(In any tree with 100 vertices, , the sum of degrees, equals , so (b) is correct).
Part B, Q1:“Let G=(V,E) be a graph on n vertices where ∣V∣=n and every vertex’s degree is > .Provethat has a path.(Hint: consider a longest path in .)”(Dirac’s theorem style: a graph with minimum degree > n/2 is – here they only asked to show existence of a ).
Part B, Q5:“Given an undirected weighted graph G=(V,E) with non-negative edge weights, we can compute a minimum cost spanning tree T=(V,E0) and also compute, for a given source , the shortest path distances from to every other vertex. Now weincrease every edge weight by 1. Decide the truth of: (i) is still a minimum spanning tree of the new graph. (ii) All the shortest paths from to other vertices remain unchanged. Provide a proof if true, or a counterexample if false.”(MST claim (i) istrue– adding a constant to all weights doesn’t change the , shortest-path claim (ii) isfalse– counterexample: adding a constant can alter shortest paths even though relative weights shift uniformly).
<DATE_TIME>
Part A, Q6:“A simple graph is one with no self-loops and each pair of distinct vertices is connected by at most one edge. Let G be a simple graph on 8 vertices such that there is a vertex of degree 1, degree 2, …, up to degree 7. What can be the degree of the last vertex? (a) 3 (b) 0 (c) 5 (d) 4.”(By the Handshaking Lemma the degree sum must be even; degrees 1+2+3+4+5+6+7 = 28, so the last degree must make total even. 28 + d even ⇒ d even. Also, a degree 7 vertex precludes a degree 0 vertex (they’d be connected). The only even option left is <DATE_TIME>, so (d) 4 is .)
Part B, Q2:“A complete graph on n vertices is a graph in which every pair of distinct vertices is connected by an edge. A simple path in a graph is one in which no vertex is repeated. Let G be a complete graph on 10 vertices. Let u,v,w be three distinct vertices in G.How many simple paths are there from u to going through ?(Answer: There are such paths – since aside from fixed start and end and mandatory intermediate , the other 7 vertices can be in any order on the path.)
Part B, Q3:“Show that any finite simple graph has at least two vertices with the same degree.”(Pigeonhole principle: in an n-vertex graph, degrees range from 0 to n!−!1, but it’s impossible to have one of each degree – you can’t have both a 0-degree and an (n!−!1)-degree vertex simultaneously – so by the Pigeonhole Principle two vertices share a .)
Part B, Q5:“You have n tasks, each with certain other tasks as prerequisites (no circular dependencies). The goal is to compute the minimum number of <DATE_TIME> needed to complete all tasks, given that each day you can finish all tasks that have no pending prerequisites. (i) Model this problem using graphs. (ii) Describe an efficient algorithm to find the minimum number of <DATE_TIME> and analyze its complexity.”(Model: a DAG where vertices are tasks and edges represent prerequisites; then the answer is the length of the longest path (the partial order height) – which can be found via topological sort or DP on the DAG. Complexity: O(n+m)).
Part A, Q6:“A simple graph is one with no self-loops and each pair of distinct vertices is connected by at most one edge. Let G be a simple graph on 8 vertices such that there is a vertex of degree 1, degree 2, …, up to degree 7. What can be the degree of the last vertex? (a) 3 (b) 0 (c) 5 (d) 4.”(By the Handshaking Lemma the degree sum must be even; degrees 1+2+3+4+5+6+7 = 28, so the last degree must make total even. 28 + d even ⇒ d even. Also, a degree 7 vertex precludes a degree 0 vertex (they’d be connected). The only even option left is <DATE_TIME>, so (d) 4 is .)
Part B, Q2:“A complete graph on n vertices is a graph in which every pair of distinct vertices is connected by an edge. A simple path in a graph is one in which no vertex is repeated. Let G be a complete graph on 10 vertices. Let u,v,w be three distinct vertices in G.How many simple paths are there from u to going through ?(Answer: There are such paths – since aside from fixed start and end and mandatory intermediate , the other 7 vertices can be in any order on the path.)
Part B, Q3:“Show that any finite simple graph has at least two vertices with the same degree.”(Pigeonhole principle: in an n-vertex graph, degrees range from 0 to n!−!1, but it’s impossible to have one of each degree – you can’t have both a 0-degree and an (n!−!1)-degree vertex simultaneously – so by the Pigeonhole Principle two vertices share a .)
Part B, Q5:“You have n tasks, each with certain other tasks as prerequisites (no circular dependencies). The goal is to compute the minimum number of <DATE_TIME> needed to complete all tasks, given that each day you can finish all tasks that have no pending prerequisites. (i) Model this problem using graphs. (ii) Describe an efficient algorithm to find the minimum number of <DATE_TIME> and analyze its complexity.”(Model: a DAG where vertices are tasks and edges represent prerequisites; then the answer is the length of the longest path (the partial order height) – which can be found via topological sort or DP on the DAG. Complexity: O(n+m)).
<DATE_TIME>
Part B, Q3:“Air CMI operates direct flights between different cities. From the table of all direct flights (edges in a directed graph), FakeTrip wants to list all pairs of cities connected bysomesequence of scribe an algorithmto compute all such city-pairs (i.e. compute reachability in this directed graph) and analyze its complexity.(b)CheapTricks further imposes that any connection (A→B→C) is only valid if the arrival time into B is <DATE_TIME> before the departure from B to . Given flight schedules with times,give an algorithmfor CheapTricks to list all feasible city-pairs reachable within <DATE_TIME>.”(Answer: (a) run DFS/BFS from each city, or compute transitive closure – e.g. –Warshall or repeated DFS . (b) Model flights as time-annotated edges and perform a BFS in anexpanded time-state graph; essentially a variant of ’s algorithm for time-schedule .)
Part B, Q3:“Air CMI operates direct flights between different cities. From the table of all direct flights (edges in a directed graph), FakeTrip wants to list all pairs of cities connected bysomesequence of scribe an algorithmto compute all such city-pairs (i.e. compute reachability in this directed graph) and analyze its complexity.(b)CheapTricks further imposes that any connection (A→B→C) is only valid if the arrival time into B is <DATE_TIME> before the departure from B to . Given flight schedules with times,give an algorithmfor CheapTricks to list all feasible city-pairs reachable within <DATE_TIME>.”(Answer: (a) run DFS/BFS from each city, or compute transitive closure – e.g. –Warshall or repeated DFS . (b) Model flights as time-annotated edges and perform a BFS in anexpanded time-state graph; essentially a variant of ’s algorithm for time-schedule .)
<DATE_TIME>
Part A, Q3:“Suppose each edge of an undirected graph is colored red, blue or green. The graph has the property thatifa vertex is incident to a red edge,thenit iseitherincident to a blue edgeornot incident to any green edge. If graph G does not satisfy this property, which of the following must be true about G? (a) There is a red edge. (b) Every vertex with a red edge is also incident to a green edge. (c) There exists a vertex that has no blue edge but has both a green and a red edge. (d) (a) and (c).”(Logical negation of the property leads to answer (d): there is some vertex with a red and green edge but no blue .)
Part A, Q4:“A college prepares its timetable by grouping courses in slots $A, B, (all courses in one slot run simultaneously). If a student is registered for two courses, those two courses must be in different slots. The administration models this as a graph where nodes are courses and an edge connects any two courses with overlapping audience. They want the minimum number of slots. In graph terms, the question to be answered is: (a) Find a spanning tree with minimum edges. (b) Find a minimal coloring. (c) Find a minimum-size vertex cover. (d) Find a maximum-size independent set.”(This is a graph coloring problem on the course-conflict graph – answer (b) minimal coloring is the correct formulation of minimizing .)
Part A, Q5:“An undirected graph has 10 vertices labeled 1,…,10 and 37 edges. Vertices 1,3,5,7,9 have degree 8 and vertices 2,4,6 have degree 7. What is the degree of vertex 10? (a) 5 (b) 6 (c) 7 (d) 8.”(Sum of degrees = . Known degrees sum to . Vertex 10’s degree = , so (b) 6 is the .)
Part B, Q4:“Design a greedy algorithm to test whether a given non-decreasing sequence d1≤d2≤⋯≤d of positive integers isgraphic(i.e., is there a simple undirected graph with that degree sequence?).”(Essentially the –Hakimi algorithm: repeatedly remove the largest degree and reduce the next entries by 1, checking for .)
Part B, Q5:“An airline runs flights between several cities. A millionaire wants to travel from to with at most k−1 layovers (i.e., using at most k flights). He doesn’t mind revisiting cities or scribe an algorithmto compute the number of ways he can make his journey, and analyze its running time given n cities.”(We can model as a directed graph and countwalksof length ≤ k: use dynamic programming or fast exponentiation of the adjacency matrix. The number of distinct walks of length is given by the -entry of . So one solution: compute in time via repeated squaring.)
Part A, Q3:“Suppose each edge of an undirected graph is colored red, blue or green. The graph has the property thatifa vertex is incident to a red edge,thenit iseitherincident to a blue edgeornot incident to any green edge. If graph G does not satisfy this property, which of the following must be true about G? (a) There is a red edge. (b) Every vertex with a red edge is also incident to a green edge. (c) There exists a vertex that has no blue edge but has both a green and a red edge. (d) (a) and (c).”(Logical negation of the property leads to answer (d): there is some vertex with a red and green edge but no blue .)
Part A, Q4:“A college prepares its timetable by grouping courses in slots $A, B, (all courses in one slot run simultaneously). If a student is registered for two courses, those two courses must be in different slots. The administration models this as a graph where nodes are courses and an edge connects any two courses with overlapping audience. They want the minimum number of slots. In graph terms, the question to be answered is: (a) Find a spanning tree with minimum edges. (b) Find a minimal coloring. (c) Find a minimum-size vertex cover. (d) Find a maximum-size independent set.”(This is a graph coloring problem on the course-conflict graph – answer (b) minimal coloring is the correct formulation of minimizing .)
Part A, Q5:“An undirected graph has 10 vertices labeled 1,…,10 and 37 edges. Vertices 1,3,5,7,9 have degree 8 and vertices 2,4,6 have degree 7. What is the degree of vertex 10? (a) 5 (b) 6 (c) 7 (d) 8.”(Sum of degrees = . Known degrees sum to . Vertex 10’s degree = , so (b) 6 is the .)
Part B, Q4:“Design a greedy algorithm to test whether a given non-decreasing sequence d1≤d2≤⋯≤d of positive integers isgraphic(i.e., is there a simple undirected graph with that degree sequence?).”(Essentially the –Hakimi algorithm: repeatedly remove the largest degree and reduce the next entries by 1, checking for .)
Part B, Q5:“An airline runs flights between several cities. A millionaire wants to travel from to with at most k−1 layovers (i.e., using at most k flights). He doesn’t mind revisiting cities or scribe an algorithmto compute the number of ways he can make his journey, and analyze its running time given n cities.”(We can model as a directed graph and countwalksof length ≤ k: use dynamic programming or fast exponentiation of the adjacency matrix. The number of distinct walks of length is given by the -entry of . So one solution: compute in time via repeated squaring.)
<DATE_TIME>
Part A, Q1:“In a connected undirected graph, the distance between two vertices is the number of edges in a shortest path between them. Let P be the property: ‘there exists a vertex that is a neighbor of all other vertices.’ Consider the statements: (i)If P is false, then there is a pair of vertices at distance <DATE_TIME>. (ii)If P is true, then the distance between any pair of vertices is at most 2. Which is correct? (a) Only (i). (b) Only (ii). (c) Both (i) and (ii). (d) Neither.”(Statement (i) is false; a counterexample is a cycle where P fails but diameter 3. Statement (ii) is true: if a “universal neighbor” exists, every other pair of vertices is at worst connected through that . Answer: (b) only (ii) is true.)
Part A, Q4:“Consider a weighted undirected graph G with positive edge weights. Let (u,v) be an edge in G. We know the shortest path from s to u has weight 53 and from to has weight 65. Which of the following is always true about the weight of ? (a) ≤12 (b) =12 (c) ≥12 (d) Nothing can be said.”(By triangle inequality, , so , hence . Option (c) is correct.)
Part B, Q1:“War prisoners are escaping a prison at location A, heading to safety at village B across a canyon patrolled by stationary guards (at fixed coordinates). Each guard has a circular view range of 100 m radius. Is there a path from A to B that stays more than 100 m away from every guard? (Assume the canyon width/length and guard coordinates are given.)Provide an algorithmto determine if the prisoners can pass unnoticed.(Hint: model this as a graph with soldiers as vertices.)”(Model each guard’s territory as a node; connect two guard-nodes if their 100 m circlesoverlapso you cannot slip between them. Then a safe route exists from A to B iff in the geometric planar region the “guard barrier” is not continuous – equivalently, nodes representing guards donotform a connecting chain separating A from B. The algorithm: construct the guard interference graph and check connectivity between appropriate subsets or use union-find to see if guards form a wall blocking A–B.)
Part B, Q2:“A simple path (resp. cycle) is one with no vertex repeated. Let G be an undirected graph with minimum degree k≥2. (a) Show that G contains a simple path of length ≥ k. (b) Show that G contains a simple cycle of length ≥ .”(Part (a) is by repeatedly extending a path since every vertex has ≥2 neighbors. Part (b) follows by considering the endvertices of a longest path – each has ≥2 neighbors, so at least one neighbor is on that path, creating a cycle.)
Part B, Q3:“An undirected graph can be converted into a directed graph by choosing a direction for every edge. Example: (drawing of an undirected triangle turned into a directed 3-cycle). Show that foreveryundirected graph, we can assign directions to edges so that the resulting directed graph hasnodirected cycles.”(This statement isfalse– a counterexample is any odd cycle graph, which cannot be acyclically oriented. The task expects a counterexample and reasoning that an odd cycle forces a directed cycle in any orientation.)
Part A, Q1:“In a connected undirected graph, the distance between two vertices is the number of edges in a shortest path between them. Let P be the property: ‘there exists a vertex that is a neighbor of all other vertices.’ Consider the statements: (i)If P is false, then there is a pair of vertices at distance <DATE_TIME>. (ii)If P is true, then the distance between any pair of vertices is at most 2. Which is correct? (a) Only (i). (b) Only (ii). (c) Both (i) and (ii). (d) Neither.”(Statement (i) is false; a counterexample is a cycle where P fails but diameter 3. Statement (ii) is true: if a “universal neighbor” exists, every other pair of vertices is at worst connected through that . Answer: (b) only (ii) is true.)
Part A, Q4:“Consider a weighted undirected graph G with positive edge weights. Let (u,v) be an edge in G. We know the shortest path from s to u has weight 53 and from to has weight 65. Which of the following is always true about the weight of ? (a) ≤12 (b) =12 (c) ≥12 (d) Nothing can be said.”(By triangle inequality, , so , hence . Option (c) is correct.)
Part B, Q1:“War prisoners are escaping a prison at location A, heading to safety at village B across a canyon patrolled by stationary guards (at fixed coordinates). Each guard has a circular view range of 100 m radius. Is there a path from A to B that stays more than 100 m away from every guard? (Assume the canyon width/length and guard coordinates are given.)Provide an algorithmto determine if the prisoners can pass unnoticed.(Hint: model this as a graph with soldiers as vertices.)”(Model each guard’s territory as a node; connect two guard-nodes if their 100 m circlesoverlapso you cannot slip between them. Then a safe route exists from A to B iff in the geometric planar region the “guard barrier” is not continuous – equivalently, nodes representing guards donotform a connecting chain separating A from B. The algorithm: construct the guard interference graph and check connectivity between appropriate subsets or use union-find to see if guards form a wall blocking A–B.)
Part B, Q2:“A simple path (resp. cycle) is one with no vertex repeated. Let G be an undirected graph with minimum degree k≥2. (a) Show that G contains a simple path of length ≥ k. (b) Show that G contains a simple cycle of length ≥ .”(Part (a) is by repeatedly extending a path since every vertex has ≥2 neighbors. Part (b) follows by considering the endvertices of a longest path – each has ≥2 neighbors, so at least one neighbor is on that path, creating a cycle.)
Part B, Q3:“An undirected graph can be converted into a directed graph by choosing a direction for every edge. Example: (drawing of an undirected triangle turned into a directed 3-cycle). Show that foreveryundirected graph, we can assign directions to edges so that the resulting directed graph hasnodirected cycles.”(This statement isfalse– a counterexample is any odd cycle graph, which cannot be acyclically oriented. The task expects a counterexample and reasoning that an odd cycle forces a directed cycle in any orientation.)
<DATE_TIME>
Part A, Q4:“City authorities want to station ambulances at road intersections such that any road segment can be reached by at least one ambulance without passing through a traffic light. Modeling the road network as a graph with traffic-light intersections as vertices and road segments as edges, the graph-theoretic question is: (a) Find a spanning tree with minimum edges. (b) Find a spanning tree with minimum cost. (c) Find a minimal coloring. (d) Find a minimum size vertex cover.”(This describes placing ambulances at intersections so that each edge is incident to at least one chosen vertex – precisely the Minimum Vertex Cover problem. So (d) is .)
Part A, Q5:“Let G be an arbitrary graph on n vertices with 4n−16 edges. Consider the statements: I. There is a vertex of degree < 8 in G. II. There is a vertex such that there are < 16 vertices at distance exactly 2 from it. Which is true? (a) I only (b) II only (c) Both I and II (d) Neither I nor II.”(By pigeonhole, if 4n edges, average degree < 8 (since edges yields average degree ). So I is true. Statement II is also true – if every vertex had ≥16 distinct distance-2 neighbors, there would be > two-hop connections, impossible with only edges. Thus both hold, answer (c).)
Part B, Q4:“In a party of n participants, no three people are mutually acquainted (no triangle in the acquaintance graph).Provethat the total number of handshakes is at most 4n2.”(This is ’s theorem for -free graphs: a complete bipartite splitting – maximizes edges, yielding at most .)
Part B, Q5:“(a) Prove that any tree G (connected acyclic graph) with at least 2 vertices has at least two leaves (vertices of degree 1). (b) Prove that any tree G is bipartite (its vertex set can be partitioned into V1,V2 such that every edge connects a vertex in to one in ).”(Fundamental properties of trees – part (a) by induction or considering a longest path’s , part (b) by 2-coloring along any spanning tree, which is straightforward since trees contain no odd cycle.)
Part A, Q4:“City authorities want to station ambulances at road intersections such that any road segment can be reached by at least one ambulance without passing through a traffic light. Modeling the road network as a graph with traffic-light intersections as vertices and road segments as edges, the graph-theoretic question is: (a) Find a spanning tree with minimum edges. (b) Find a spanning tree with minimum cost. (c) Find a minimal coloring. (d) Find a minimum size vertex cover.”(This describes placing ambulances at intersections so that each edge is incident to at least one chosen vertex – precisely the Minimum Vertex Cover problem. So (d) is .)
Part A, Q5:“Let G be an arbitrary graph on n vertices with 4n−16 edges. Consider the statements: I. There is a vertex of degree < 8 in G. II. There is a vertex such that there are < 16 vertices at distance exactly 2 from it. Which is true? (a) I only (b) II only (c) Both I and II (d) Neither I nor II.”(By pigeonhole, if 4n edges, average degree < 8 (since edges yields average degree ). So I is true. Statement II is also true – if every vertex had ≥16 distinct distance-2 neighbors, there would be > two-hop connections, impossible with only edges. Thus both hold, answer (c).)
Part B, Q4:“In a party of n participants, no three people are mutually acquainted (no triangle in the acquaintance graph).Provethat the total number of handshakes is at most 4n2.”(This is ’s theorem for -free graphs: a complete bipartite splitting – maximizes edges, yielding at most .)
Part B, Q5:“(a) Prove that any tree G (connected acyclic graph) with at least 2 vertices has at least two leaves (vertices of degree 1). (b) Prove that any tree G is bipartite (its vertex set can be partitioned into V1,V2 such that every edge connects a vertex in to one in ).”(Fundamental properties of trees – part (a) by induction or considering a longest path’s , part (b) by 2-coloring along any spanning tree, which is straightforward since trees contain no odd cycle.)
<DATE_TIME>
Part A, Q4:“Let G=(V,E) be an undirected simple graph, and s a designated vertex in G. For each v∈V, let be the length of a shortest path between and . For an edge , whatcannotbe the value of ? (a) 2 (b) –1 (c) 0 (d) 1.”(In any unweighted graph, the difference in BFS levels between two adjacent vertices can only be –1, <DATE_TIME>, or +1. It can never be 2 (or –2) because that would violate shortest-path optimality. So (a) 2 is .)
Part A, Q9:“Your college plans a cultural festival with multiple elimination-round events. Your contingent is multi-talented but no person can be on two teams for events that overlap in schedule. You model the problem as a graph where nodes are events and an edge connects two events if they share a team member. The aim is to create teams for as many events as possible. In this setting, the graph theoretic question to be answered is: (a) Find a maximum length simple cycle. (b) Find a maximum size independent set. (c) Find a maximum matching. (d) Find a maximal connected component.”(We want the largest set of events with no overlapping team members – i.e. no edges among them – which is aMaximum Independent Setproblem. So (b).)
Part B, Q3:“Prove or disprove: There exists a finite, undirected, simple graph with at least two vertices in which each vertex has adifferent degree(no two vertices share the same degree).”(This isimpossiblefor n≥2. By the Graphical Sequence Theorem: if degrees are all distinct for n vertices, the set must be 0,1,…,n−1, which is not realizable because a vertex of degree cannot coexist with a vertex of degree in a simple . Thus one must argue no such graph exists beyond trivial cases.)
Part B, Q5:“The input graph is given by an n×n 0–1 adjacency matrix A. Aconnected componentin G is a subgraph where any two vertices are connected by paths. Give a simple algorithm to find the number of connected components in G, and analyze its runtime.”(Solution: run BFS/DFS from each unvisited vertex to mark its component – O time in the worst case due to matrix input. Or use Union-Find. Either way, cite linear-time in number of edges here since the graph is dense.)
Part A, Q4:“Let G=(V,E) be an undirected simple graph, and s a designated vertex in G. For each v∈V, let be the length of a shortest path between and . For an edge , whatcannotbe the value of ? (a) 2 (b) –1 (c) 0 (d) 1.”(In any unweighted graph, the difference in BFS levels between two adjacent vertices can only be –1, <DATE_TIME>, or +1. It can never be 2 (or –2) because that would violate shortest-path optimality. So (a) 2 is .)
Part A, Q9:“Your college plans a cultural festival with multiple elimination-round events. Your contingent is multi-talented but no person can be on two teams for events that overlap in schedule. You model the problem as a graph where nodes are events and an edge connects two events if they share a team member. The aim is to create teams for as many events as possible. In this setting, the graph theoretic question to be answered is: (a) Find a maximum length simple cycle. (b) Find a maximum size independent set. (c) Find a maximum matching. (d) Find a maximal connected component.”(We want the largest set of events with no overlapping team members – i.e. no edges among them – which is aMaximum Independent Setproblem. So (b).)
Part B, Q3:“Prove or disprove: There exists a finite, undirected, simple graph with at least two vertices in which each vertex has adifferent degree(no two vertices share the same degree).”(This isimpossiblefor n≥2. By the Graphical Sequence Theorem: if degrees are all distinct for n vertices, the set must be 0,1,…,n−1, which is not realizable because a vertex of degree cannot coexist with a vertex of degree in a simple . Thus one must argue no such graph exists beyond trivial cases.)
Part B, Q5:“The input graph is given by an n×n 0–1 adjacency matrix A. Aconnected componentin G is a subgraph where any two vertices are connected by paths. Give a simple algorithm to find the number of connected components in G, and analyze its runtime.”(Solution: run BFS/DFS from each unvisited vertex to mark its component – O time in the worst case due to matrix input. Or use Union-Find. Either way, cite linear-time in number of edges here since the graph is dense.)
<DATE_TIME>
Part A, Q7:“An inter-school basketball tournament is being held on multiple courts. Matches are in parallel, with staggered timings so spectators always have something to watch. Each match needs a team of referees and linesmen. Two matches thatoverlap in timerequire disjoint sets of officials. The organizers want to know the minimum number of referee-line crews needed. Which graph theoretic problem must they solve? (a) Find a minimal coloring. (b) Find a minimal spanning tree. (c) Find a minimal cut. (d) Find a minimal vertex cover.”(We model each match as a vertex, draw an edge between matches that overlap in time. We then seek the chromatic number = minimum crews so that overlapping matches have different colors. Thus (a) find a minimal coloring is .)
Part B, Q4:“Consider the assertion:Any connected undirected graph G with at least two vertices contains a vertex v such that deleting v leaves G connected.Either prove this assertion or give a counterexample.”(The statement is true – in any connected graph there is at least one vertex that is not a cut-vertex. One can prove it by induction or by noting that every tree has two leaves (which are safe to remove) and any cycle has no articulation point, etc. A counterexample does not exist because a graph where every vertex is a cut-vertex cannot be connected unless n= (which trivially has a non-cut-vertex as well).)
Part A, Q7:“An inter-school basketball tournament is being held on multiple courts. Matches are in parallel, with staggered timings so spectators always have something to watch. Each match needs a team of referees and linesmen. Two matches thatoverlap in timerequire disjoint sets of officials. The organizers want to know the minimum number of referee-line crews needed. Which graph theoretic problem must they solve? (a) Find a minimal coloring. (b) Find a minimal spanning tree. (c) Find a minimal cut. (d) Find a minimal vertex cover.”(We model each match as a vertex, draw an edge between matches that overlap in time. We then seek the chromatic number = minimum crews so that overlapping matches have different colors. Thus (a) find a minimal coloring is .)
Part B, Q4:“Consider the assertion:Any connected undirected graph G with at least two vertices contains a vertex v such that deleting v leaves G connected.Either prove this assertion or give a counterexample.”(The statement is true – in any connected graph there is at least one vertex that is not a cut-vertex. One can prove it by induction or by noting that every tree has two leaves (which are safe to remove) and any cycle has no articulation point, etc. A counterexample does not exist because a graph where every vertex is a cut-vertex cannot be connected unless n= (which trivially has a non-cut-vertex as well).)
<DATE_TIME>
Part B, Q2:“(Graph connectivity and complements) Does there exist a graph G (with ≥2 vertices) such thatbothGandits complement Gˉ are disconnected? Justify. (b) Give an example of a graph on four vertices that is isomorphic to its own complement. (c) Does there exist a graph G (≥2 vertices) such thatbothGand are connected? Justify.”(Answers: (a) Yes – e.g. two disjoint edges on 4 vertices yields both and . (b) Example: (4-cycle) is self-complementary. (c) Yes – many graphs (e.g. a 4-vertex cycle again) have both themselves and complements connected. In fact, for one can construct nontrivial examples, but a quick justification suffices.)
Part B, Q3:“Prove or disprove: There exists a finite, undirected, simple graph with ≥2 vertices in whicheach vertex has a different degree.”(As in <DATE_TIME>, the answer is to disprove: such a graph cannot exist for n≥2 – one cannot have all degrees 0,1,…,n−1 present . A formal argument: assume n vertices with distinct degrees . The smallest degree and largest . We must have and to get distinct values, but then the vertex of degree is adjacent to every other vertex, including the one of degree 0 – contradiction.)
Part B, Q2:“(Graph connectivity and complements) Does there exist a graph G (with ≥2 vertices) such thatbothGandits complement Gˉ are disconnected? Justify. (b) Give an example of a graph on four vertices that is isomorphic to its own complement. (c) Does there exist a graph G (≥2 vertices) such thatbothGand are connected? Justify.”(Answers: (a) Yes – e.g. two disjoint edges on 4 vertices yields both and . (b) Example: (4-cycle) is self-complementary. (c) Yes – many graphs (e.g. a 4-vertex cycle again) have both themselves and complements connected. In fact, for one can construct nontrivial examples, but a quick justification suffices.)
Part B, Q3:“Prove or disprove: There exists a finite, undirected, simple graph with ≥2 vertices in whicheach vertex has a different degree.”(As in <DATE_TIME>, the answer is to disprove: such a graph cannot exist for n≥2 – one cannot have all degrees 0,1,…,n−1 present . A formal argument: assume n vertices with distinct degrees . The smallest degree and largest . We must have and to get distinct values, but then the vertex of degree is adjacent to every other vertex, including the one of degree 0 – contradiction.)
<DATE_TIME>
Part A, Q4:“Consider the statements about finite simple graphs G: (i) If each vertex of G has degree ≥2, then G contains a cycle. (ii) If ∣E(G)∣≥∣V(G)∣, then contains a cycle. Which holds for all graphs? (a) (i) only (b) (ii) only (c) both (i) and (ii) (d) neither.”(Both are true for all finite graphs. (i) is true because a graph with minimum degree 2 cannot be acyclic – a tree on ≥3 vertices always has a leaf of degree . (ii) is true because any graph with must have a cycle – a tree has maximum. Thus answer (c) both.)
Part A, is given a ‘Marauder’s Map’ which shows a certain graph of rooms (faces) surrounded by walls. wants to color every wall such that any two walls meeting at a corner have different colors, and also color every room such that any two adjacent rooms (sharing a wall) have different colors. What is the minimum number of colors needed for this? (a) 4 (walls) and 4 (rooms) (b) 3 (walls) and 4 (rooms) (c) 2 (walls) and 3 (rooms) (d) 2 (walls) and 5 (rooms).”(This describes edge-coloring and face-coloring of a planar graph. The graph shown is a planar arrangement (likely a dodecahedral-like graph). The minimum edge-colors needed equals the graph’s maximum degree Δ (by ’s Theorem) and rooms (faces) need planar graph coloring. The correct choice was (b) 3 colors for walls and 4 for rooms, consistent with planar dual graphs – edges meeting at a vertex form at most degree 3, and by Four Color Theorem faces need ≤4.)
Part B, Q3:“Acut edgeof a connected graph G is an edge e=u,v whose removal disconnects G. Now assume G is connected and every vertex has odd degree. Let e be any cut edge, and let be the two components after removing . Prove or disprove:Each of must have anevennumber of odd-degree vertices.”(This is true by : each component inherits all vertices’ degrees except lose one incident edge. In , were odd-degree; after removal, become even in each . All other vertices in were odd in and remain odd in . Since now has an even number of odd-degree vertices (the parity invariant), the statement holds. If one component had odd count of odd-vertices, the other would too, violating the fact that made the total odd count in .)
Part A, Q4:“Consider the statements about finite simple graphs G: (i) If each vertex of G has degree ≥2, then G contains a cycle. (ii) If ∣E(G)∣≥∣V(G)∣, then contains a cycle. Which holds for all graphs? (a) (i) only (b) (ii) only (c) both (i) and (ii) (d) neither.”(Both are true for all finite graphs. (i) is true because a graph with minimum degree 2 cannot be acyclic – a tree on ≥3 vertices always has a leaf of degree . (ii) is true because any graph with must have a cycle – a tree has maximum. Thus answer (c) both.)
Part A, is given a ‘Marauder’s Map’ which shows a certain graph of rooms (faces) surrounded by walls. wants to color every wall such that any two walls meeting at a corner have different colors, and also color every room such that any two adjacent rooms (sharing a wall) have different colors. What is the minimum number of colors needed for this? (a) 4 (walls) and 4 (rooms) (b) 3 (walls) and 4 (rooms) (c) 2 (walls) and 3 (rooms) (d) 2 (walls) and 5 (rooms).”(This describes edge-coloring and face-coloring of a planar graph. The graph shown is a planar arrangement (likely a dodecahedral-like graph). The minimum edge-colors needed equals the graph’s maximum degree Δ (by ’s Theorem) and rooms (faces) need planar graph coloring. The correct choice was (b) 3 colors for walls and 4 for rooms, consistent with planar dual graphs – edges meeting at a vertex form at most degree 3, and by Four Color Theorem faces need ≤4.)
Part B, Q3:“Acut edgeof a connected graph G is an edge e=u,v whose removal disconnects G. Now assume G is connected and every vertex has odd degree. Let e be any cut edge, and let be the two components after removing . Prove or disprove:Each of must have anevennumber of odd-degree vertices.”(This is true by : each component inherits all vertices’ degrees except lose one incident edge. In , were odd-degree; after removal, become even in each . All other vertices in were odd in and remain odd in . Since now has an even number of odd-degree vertices (the parity invariant), the statement holds. If one component had odd count of odd-vertices, the other would too, violating the fact that made the total odd count in .)
2022
Part A, Q7:“Consider a random graph G on n vertices where for each pair of vertices u,v, an edge (u,v) is present with probability p. What is the expected number ofcycles of length 3(triangles) in this graph?”(There are possible triples of vertices, each forms a triangle with probability . So expectation = .)
Part B, Q4:(Paraphrased)“Seven students need to be seated in a row (each has preferences whom they sit next to). The problem is modeled as a graph where vertices are students and edges indicate acceptable adjacencies. The desired seating corresponds to aHamiltonian pathin this graph (visiting all vertices in order).(The problem explicitly said: “Model this situation as an appropriate graph so that the desired seating arrangement is a path.”)” (This is a typical formulation of a seating/ordering constraint as finding a path in a graph.)
Part A, Q7:“Consider a random graph G on n vertices where for each pair of vertices u,v, an edge (u,v) is present with probability p. What is the expected number ofcycles of length 3(triangles) in this graph?”(There are possible triples of vertices, each forms a triangle with probability . So expectation = .)
Part B, Q4:(Paraphrased)“Seven students need to be seated in a row (each has preferences whom they sit next to). The problem is modeled as a graph where vertices are students and edges indicate acceptable adjacencies. The desired seating corresponds to aHamiltonian pathin this graph (visiting all vertices in order).(The problem explicitly said: “Model this situation as an appropriate graph so that the desired seating arrangement is a path.”)” (This is a typical formulation of a seating/ordering constraint as finding a path in a graph.)
2023
Part A, Q4:“A graph isk-regularif all vertices have degree exactly k. What is theminimum number of verticesin a k-regular graph that has no 3-length cycles (no triangles)? (a) k (b) k+1 (c) 2k (d) .”(A -regular, triangle-free graph requires at least vertices. For example, the complete bipartite graph is -regular and has no triangles, and is known to be minimal. So (c) is correct.)
Part A, Q5:“In a connected graph, any twolongest paths: (a) have at least one vertex in common (though not necessarily an edge in common); (b) have at least one edge in common; (c) have at least two common vertices; (d) have at least two edges in common.”(It’s a fact that any two diametral (max-length) paths in a connected graph share at least one . Answer (a) is true – if two longest paths were completely disjoint, we could join them to get an even longer path, contradicting maximality.)
Part B, Q7:(Bus scheduling problem)“There is a set of bus routes and a set of drivers with availability. We need to assign drivers to buses such that each driver is assigned to at most one route and each route has at most one driver. What is the maximum number of buses that can be run?Show how to use graph matchingto solve this problem. (You need not implement a matching algorithm, just reduce the problem to one.)”(This is a bipartite matching problem: create a bipartite graph with drivers on one side, bus routes on the other, connect a driver to a route if the driver can cover that route’s schedule. Then finding the maximum matching on this bipartite graph gives the maximum buses that can be .)
Part A, Q4:“A graph isk-regularif all vertices have degree exactly k. What is theminimum number of verticesin a k-regular graph that has no 3-length cycles (no triangles)? (a) k (b) k+1 (c) 2k (d) .”(A -regular, triangle-free graph requires at least vertices. For example, the complete bipartite graph is -regular and has no triangles, and is known to be minimal. So (c) is correct.)
Part A, Q5:“In a connected graph, any twolongest paths: (a) have at least one vertex in common (though not necessarily an edge in common); (b) have at least one edge in common; (c) have at least two common vertices; (d) have at least two edges in common.”(It’s a fact that any two diametral (max-length) paths in a connected graph share at least one . Answer (a) is true – if two longest paths were completely disjoint, we could join them to get an even longer path, contradicting maximality.)
Part B, Q7:(Bus scheduling problem)“There is a set of bus routes and a set of drivers with availability. We need to assign drivers to buses such that each driver is assigned to at most one route and each route has at most one driver. What is the maximum number of buses that can be run?Show how to use graph matchingto solve this problem. (You need not implement a matching algorithm, just reduce the problem to one.)”(This is a bipartite matching problem: create a bipartite graph with drivers on one side, bus routes on the other, connect a driver to a route if the driver can cover that route’s schedule. Then finding the maximum matching on this bipartite graph gives the maximum buses that can be .)
<DATE_TIME>
Part A, Q3:“You live in , which is a large equilateral triangle partitioned into small triangular blocks (forming a triangular grid graph with corner vertices A,B,C as shown). You walk from home at corner A to office at corner B, taking a different route <DATE_TIME> as long as the total distance ≤ 2.5 km. (Each small block side = 500 m.) How many routes are possible from A to B? (a) 5 (b) 11 (c) 21 (d) 45.”(Within 2.5 km you can take at most 5 edges of the grid. The number of distinct – paths of ≤5 steps in that triangular lattice is11(option (b)). This can be counted by case analysis on path lengths or using combinations – essentially paths of length 4 or 5 on that small triangle graph.)
Part B, Q6:“Atournamentis a directed graph with exactly one directed edge between each pair of vertices (every pair of people has a winner). Akingin a tournament is a vertex v such that every other vertex is reachable from v by a path of length ≤ 2 (in two “hops” at most).Provethat every tournament has a king.”(A classic result: in any round-robin tournament, there is at least one “2-king.” One proof uses induction or the fact that a vertex with maximal out-degree will be a king – if not directly beating someone, it beats an intermediary who beats that person.)
Part B, Q8:“Let G be an undirected connected graph withdistinct edge weights. Let emax be the edge of maximum weight and emin the minimum-weight edge. What can be said about the following statements? (I) is never in the Minimum Spanning Tree of . (II) is always insomeMST of . (III) If is in the MST, then must be in the MST as well.”(Using MST properties: (I) istrue– the maximum-weight edge is never needed because if you consider the cycle it forms when added to an MST, it would be the heaviest and by the Cycle Property it would be dropped. (II) istrue– by the Cut Property, the lightest edge across the cut containing will be in all . (III) is vacuously true given (I) and (II), but if interpreted literally: whenever the heaviest edge somehow sneaks into an MST (which cannot happen except in trivial cases), the lightest must be there too – so (III) holds in the sense that the premise is false, making (III) technically true.)
Part B, Q9:“Let G be a directed graph with distinct nonnegative edge weights. Let s be a starting vertex and t a destination vertex, and assume G has at least one s–t path. (i) Is theshortest – pathnecessarily unique? (ii) Is thelongest – path(finite or infinite weight) necessarily unique? Justify.”(i) Yes – with distinct weights, the shortest path is unique (no two different paths can tie in total weight). (ii) No – if there are cycles of nonnegative weight, infinitely many – paths exist; even with strictly positive weights, the longest simple path problem does not have a well-defined unique longest path in general DAGs because there could be parallel longest paths of equal length. The expected answer: shortest path is unique under distinct weights, longest path may not be unique or even well-defined if cycles exist.)
Part A, Q3:“You live in , which is a large equilateral triangle partitioned into small triangular blocks (forming a triangular grid graph with corner vertices A,B,C as shown). You walk from home at corner A to office at corner B, taking a different route <DATE_TIME> as long as the total distance ≤ 2.5 km. (Each small block side = 500 m.) How many routes are possible from A to B? (a) 5 (b) 11 (c) 21 (d) 45.”(Within 2.5 km you can take at most 5 edges of the grid. The number of distinct – paths of ≤5 steps in that triangular lattice is11(option (b)). This can be counted by case analysis on path lengths or using combinations – essentially paths of length 4 or 5 on that small triangle graph.)
Part B, Q6:“Atournamentis a directed graph with exactly one directed edge between each pair of vertices (every pair of people has a winner). Akingin a tournament is a vertex v such that every other vertex is reachable from v by a path of length ≤ 2 (in two “hops” at most).Provethat every tournament has a king.”(A classic result: in any round-robin tournament, there is at least one “2-king.” One proof uses induction or the fact that a vertex with maximal out-degree will be a king – if not directly beating someone, it beats an intermediary who beats that person.)
Part B, Q8:“Let G be an undirected connected graph withdistinct edge weights. Let emax be the edge of maximum weight and emin the minimum-weight edge. What can be said about the following statements? (I) is never in the Minimum Spanning Tree of . (II) is always insomeMST of . (III) If is in the MST, then must be in the MST as well.”(Using MST properties: (I) istrue– the maximum-weight edge is never needed because if you consider the cycle it forms when added to an MST, it would be the heaviest and by the Cycle Property it would be dropped. (II) istrue– by the Cut Property, the lightest edge across the cut containing will be in all . (III) is vacuously true given (I) and (II), but if interpreted literally: whenever the heaviest edge somehow sneaks into an MST (which cannot happen except in trivial cases), the lightest must be there too – so (III) holds in the sense that the premise is false, making (III) technically true.)
Part B, Q9:“Let G be a directed graph with distinct nonnegative edge weights. Let s be a starting vertex and t a destination vertex, and assume G has at least one s–t path. (i) Is theshortest – pathnecessarily unique? (ii) Is thelongest – path(finite or infinite weight) necessarily unique? Justify.”(i) Yes – with distinct weights, the shortest path is unique (no two different paths can tie in total weight). (ii) No – if there are cycles of nonnegative weight, infinitely many – paths exist; even with strictly positive weights, the longest simple path problem does not have a well-defined unique longest path in general DAGs because there could be parallel longest paths of equal length. The expected answer: shortest path is unique under distinct weights, longest path may not be unique or even well-defined if cycles exist.)
Sources:Official CMI MSc-CS Entrance Exam Papers (2010–2024)et seq. (available via CMI admissions). The questions and solutions above are taken from these past papers. Each cited question is from the corresponding year’s paper as indicated.