1
GATE CSE 2026 Set 1
MCQ (More than One Correct Answer)
+2
-0

An undirected, unweighted, simple graph $G(V, E)$ is said to be 2 -colorable if there exists a function $c: V \rightarrow\{0,1\}$ such that for every $(u, v) \in E, c(u) \neq c(v)$.

Which of the following statements about 2-colorable graphs is/are true?

A

If $G$ is 2-colorable, then $G$ may contain cycles of odd length

B

If $G$ is 2 -colorable, then $G$ may contain cycles of even length

C

An optimal algorithm for testing whether $G$ is 2-colorable runs in time $\theta(|V|+|E|)$, if $G$ is represented as an adjacency list

D

An optimal algorithm for testing whether $G$ is 2-colorable runs in time $\theta(|E| \log |V|)$, if $G$ is represented as an adjacency list

2
GATE CSE 2025 Set 2
Numerical
+2
-0

Consider the following algorithm someAlgo that takes an undirected graph $G$ as input. someAlgo ( $G$ )

1. Let $v$ be any vertex in $G$. Run BFS on $G$ starting at $v$. Let $u$ be a vertex in $G$ at maximum distance from $v$ as given by the BFS.

2. Run BFS on $G$ again with $u$ as the starting vertex. Let $z$ be the vertex at maximum distance from $u$ as given by the BFS.

3. Output the distance between $u$ and $z$ in $G$.

The output of someAlgo( $T$ ) for the tree shown in the given figure is $\qquad$ . (Answer in integer)

GATE CSE 2025 Set 2 Data Structures - Graphs Question 4 English

Your input ____
3
GATE CSE 2025 Set 1
MCQ (Single Correct Answer)
+2
-0

Let $G(V, E)$ be an undirected and unweighted graph with 100 vertices. Let $d(u, v)$ denote the number of edges in a shortest path between vertices $u$ and $v$ in $V$. Let the maximum value of $d(u, v), u, v \in V$ such that $u \neq v$, be 30 . Let $T$ be any breadth-first-search tree of $G$. Which ONE of the given options is CORRECT for every such graph $G$ ?

A
The height of $T$ is exactly 15.
B
The height of $T$ is exactly 30.
C
The height of $T$ is at least 15 .
D
The height of $T$ is at least 30 .
4
GATE CSE 2024 Set 1
MCQ (More than One Correct Answer)
+2
-0

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?

A

There are no back-edges in G with respect to the tree T

B

There are no cross-edges in G with respect to the tree T

C

There are no forward-edges in G with respect to the tree T

D

The only edges in G are the edges in T

GATE CSE Subjects

Browse all chapters by subject

Software Engineering
Web Technologies