Question 1
The question states: "Let G(V,E) be a directed graph, where V={1,2,3,4,5} is the set of vertices and E is the set of directed edges, as defined by the following adjacency matrix A."
The adjacency matrix A is defined as:

It then clarifies: "A[i][j]=1 indicates a directed edge from node i to node j."
A directed spanning tree of G, rooted at rβV, is defined as "a subgraph T of G such that the undirected version of T is a tree, and T contains a directed path from r to every other vertex in V.
The number of such directed spanning trees rooted at vertex 5 is ___.
GATE CSE 2022 - [2Marks] (NAT)
Question 2
Let G be a directed graph and T a depth first search (DFS) spanning tree in G that is rooted at a vertex v. Suppose T is also a breadth first search (BFS) tree in G, rooted at v. Which of the following statements is/are TRUE for every such graph G and tree T?
GATE CSE 2024,SET1 - [2Marks] (MCQ)
The only edges in G are the edges in T
There are no cross-edges in G with respect to the tree T
There are no back-edges in G with respect to the tree T
There are no forward-edges in G with respect to the tree T
Question 3
Consider the following algorithmΒ someAlgoΒ that takes an undirected graphΒ GΒ as input.

someAlgoΒ (G) :
GATE CSE 2025,SET2 - [2Marks] (NAT)
Question 4
ββββWhich of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph G is/are TRUE
GATE CSE 2025,SET2 - [2Marks] (MSQ)
A DFS tree of G is a Shortest Path tree of G
Every non-tree edge of G with respect to a DFS tree is a forward/back edge.
If (u,v) is a non-tree edge of G with respect to a BFS tree, then the distances from the source vertex s to u and v in the BFS tree are within Β±1 of each other.
Both BFS and DFS can be used to find the connected components of G.
Question 5
[Tex]\begin{aligned}
&\textbf{}\quad\text{Consider the following pseudocode for depth-first} \\
&\quad\text{search (DFS) algorithm which takes a directed} \\
&\quad\text{graph } G(V,E) \text{ as input, where } d[v] \text{ and } f[v] \text{ are the} \\
&\quad\text{discovery time and finishing time, respectively, of} \\
&\quad\text{the vertex } v \in V. \\
\\
&\begin{array}{|l|l|}
\hline
\text{DFS}(G) : & \text{Explore } (\, G, v, t \,) : \\
\quad\text{unmark all } v \in V & \quad\text{mark } v \\
\quad t \leftarrow 0 & \quad t \leftarrow t + 1 \\
\quad\text{for each } v \in V & \quad d[v] \leftarrow t \\
\quad\quad\text{if } v \text{ is unmarked} & \quad\text{for each } (v, w) \in E \\
\quad\quad\quad t \leftarrow \text{Explore} & \quad\quad\text{if } w \text{ is unmarked} \\
(\, G, v, t \,) & \quad\quad\quad t \leftarrow \text{Explore } (\, G, w, t \,) \\
\quad\quad\text{end if} & \quad\quad\text{end if} \\
\quad\text{end for} & \quad\text{end for} \\
& \quad t \leftarrow t + 1 \\
& \quad f[v] \leftarrow t \\
& \quad\text{return } t \\
\hline
\end{array} \\
\\
&\quad\text{Suppose that the input directed graph } G(V,E) \text{ is a} \\
&\quad\text{directed acyclic graph (DAG). For an edge} \\
&\quad(u,v) \in E\text{, which of the following options will} \\
&\quad\text{NEVER be correct?}
\end{aligned}[/Tex]
[GATE 2026 || SET-1 MSQ || 2-mark]
π[π’]<π[π£]<π[π£]<π[π’]
π[π£]<π[π’]<π[π’]<π[π£]
π[π£]<π[π£]<π[π’]<π[π’]
π[π’]<π[π£]<π[π’]<π[π£]
Question 6
An undirected, unweighted, simple graph πΊ(π,πΈ) is said to be 2-colorable if there exists a function π:πβ{0,1} such that for everyΒ (u,v)βE, c(u)β c(v)
Which of the following statements about 2-colorable graphs is/are true? [GATE CSE 2026 | Set-1 MSQ | 2 marks]
If πΊ is 2-colorable, then πΊ may contain cycles of odd length
If πΊ is 2-colorable, then πΊ may contain cycles of even length
An optimal algorithm for testing whether πΊ is 2-colorable runs in time Ξ(|π|+|πΈ|), if πΊ is represented as an adjacency list
An optimal algorithm for testing whether πΊ is 2-colorable runs in time Ξ(|πΈ|log|π|), if πΊ is represented as an adjacency list.
There are 6 questions to complete.