Updated: Apr 2026
First Chapter - 100% FREE

GATE CS Chapter-wise PYQs

Practice GATE CS previous year questions organized by chapter. 428+ PYQs from 8 years with detailed solutions. First chapter FREE!

428+
Total PYQs
8
Years
62
Chapters
FREE
First Chapter
Start Free Test →

Year-wise PYQ Distribution

2025.2
54
2025.1
55
2024.2
29
2024.1
77
2023.1
54
2022.1
49
2021.2
55
2021.1
55

All Chapters

Graph Theory

FREE

Engineering Mathematics • 11 PYQs

Start Free

Combinatorics

Engineering Mathematics • 12 PYQs

Unlock

Propositional and First-Order Logic

Engineering Mathematics • 6 PYQs

Unlock

Algebraic Structures

Engineering Mathematics • 6 PYQs

Unlock

Set Theory, Relations, and Functions

Engineering Mathematics • 5 PYQs

Unlock

LU Decomposition

Engineering Mathematics • 2 PYQs

Unlock

Eigenvalues and Eigenvectors

Engineering Mathematics • 5 PYQs

Unlock

Matrices and Determinants

Engineering Mathematics • 6 PYQs

Unlock

System of Linear Equations

Engineering Mathematics • 3 PYQs

Unlock

Limits, Continuity, and Differentiability

Engineering Mathematics • 3 PYQs

Unlock

Integration

Engineering Mathematics • 3 PYQs

Unlock

Applications of Differentiation

Engineering Mathematics • 2 PYQs

Unlock

Probability Distributions

Engineering Mathematics • 5 PYQs

Unlock

Probability Theory

Engineering Mathematics • 10 PYQs

Unlock

Boolean Algebra and Minimization

Digital Logic • 11 PYQs

Unlock

Combinational Circuits

Digital Logic • 5 PYQs

Unlock

Sequential Circuits

Digital Logic • 6 PYQs

Unlock

Computer Arithmetic

Digital Logic • 3 PYQs

Unlock

Number Representations

Digital Logic • 12 PYQs

Unlock

CPU Components

Computer Organization and Architecture • 1 PYQs

Unlock

Graph Theory - PYQs

Free sample questions from Engineering Mathematics

100% FREE
1 Numerical
2024.2
The chromatic number of a graph is the minimum number of colours used in a \textit{proper colouring} of the graph. The chromatic number of the following graph is __________
Correct Answer: 8
View Solution
1. **Identify the graph:** The provided SVG diagram illustrates a graph with 8 vertices. Upon inspection of the edges, it is clear that every vertex is connected to every other vertex. This type of graph is known as a complete graph with nn vertices, denoted as KnK_n. In this case, since there are 8 vertices, the graph is K8K_8. 2. **Define chromatic number:** The chromatic number of a graph GG, denoted as χ(G)\chi(G), is the minimum number of colors required to color the vertices of GG such that no two adjacent vertices share the same color. This is referred to as a proper coloring. 3. **Determine the chromatic number for a complete graph:** In a complete graph KnK_n, every vertex is adjacent to every other vertex. Therefore, to satisfy the condition of a proper coloring (i.e., no two adjacent vertices having the same color), each of the nn vertices must be assigned a unique color. Thus, the chromatic number of a complete graph KnK_n is nn. For the given graph, which is K8K_8, the chromatic number is 8. Answer: 8\boxed{8}
2 Single Choice
2024.1
The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let GG be any graph with nn vertices and chromatic number kk. Which of the following statements is/are always TRUE?
A
GG contains a complete subgraph with kk vertices
B
GG contains an independent set of size at least n/kn/k
C
GG contains at least k(k1)/2k(k-1)/2 edges
D
GG contains a vertex of degree at least kk
3 Single Choice
2024.1
Let AA be the adjacency matrix of a simple undirected graph GG. Suppose AA is its own inverse. Which one of the following statements is \textit{always} TRUE?
A
GG is a cycle
B
GG is a perfect matching
C
GG is a complete graph
D
There is no such graph GG
View Solution
The problem states that AA is the adjacency matrix of a simple undirected graph GG, and AA is its own inverse, meaning A=A1A = A^{-1}. This implies A2=IA^2 = I, where II is the identity matrix. Let AA be an n×nn \times n adjacency matrix. For a simple undirected graph: 1. Aii=0A_{ii} = 0 for all ii (no self-loops). 2. Aij=AjiA_{ij} = A_{ji} for all i,ji, j (symmetric matrix). 3. Aij{0,1}A_{ij} \in \{0, 1\}. We are given A2=IA^2 = I. Let's analyze the elements of A2A^2. The element in the ii-th row and jj-th column of A2A^2 is given by:
(A2)ij=k=1nAikAkj(A^2)_{ij} = \sum_{k=1}^{n} A_{ik} A_{kj}
**Step 1: Analyze the diagonal elements of A2A^2.** Since A2=IA^2 = I, the diagonal elements must be 1. So, (A2)ii=1(A^2)_{ii} = 1 for all i=1,,ni = 1, \dots, n.
(A2)ii=k=1nAikAki(A^2)_{ii} = \sum_{k=1}^{n} A_{ik} A_{ki}
Since AA is symmetric, Aki=AikA_{ki} = A_{ik}.
(A2)ii=k=1nAik2(A^2)_{ii} = \sum_{k=1}^{n} A_{ik}^2
Since Aii=0A_{ii} = 0 (no self-loops), the term Aii2A_{ii}^2 is 0.
(A2)ii=kiAik2(A^2)_{ii} = \sum_{k \neq i} A_{ik}^2
Since AikA_{ik} can only be 0 or 1, Aik2A_{ik}^2 is also 0 or 1. The sum kiAik2\sum_{k \neq i} A_{ik}^2 counts the number of neighbors of vertex ii, which is its degree, deg(i)\deg(i). Therefore, we have:
deg(i)=(A2)ii=1\deg(i) = (A^2)_{ii} = 1
This means every vertex in the graph GG has a degree of exactly 1. **Step 2: Analyze the off-diagonal elements of A2A^2.** Since A2=IA^2 = I, the off-diagonal elements must be 0. So, (A2)ij=0(A^2)_{ij} = 0 for all iji \neq j.
(A2)ij=k=1nAikAkj=0for ij(A^2)_{ij} = \sum_{k=1}^{n} A_{ik} A_{kj} = 0 \quad \text{for } i \neq j
The term AikAkjA_{ik} A_{kj} is 1 if there is an edge between ii and kk (Aik=1A_{ik}=1) AND an edge between kk and jj (Akj=1A_{kj}=1). This means there is a path of length 2 from ii to jj via vertex kk. The sum k=1nAikAkj\sum_{k=1}^{n} A_{ik} A_{kj} represents the total number of paths of length 2 between vertex ii and vertex jj. Since this sum must be 0 for all iji \neq j, it implies that there are no paths of length 2 between any two distinct vertices ii and jj. **Step 3: Combine the findings.** From Step 1, we know that every vertex in GG has a degree of 1. This means each vertex is connected to exactly one other vertex. Let's consider an arbitrary vertex vv. Since deg(v)=1\deg(v) = 1, vv is connected to exactly one other vertex, say uu. So, there is an edge (v,u)(v, u). Now, consider any two distinct vertices ii and jj. From Step 2, there are no paths of length 2 between ii and jj. If ii is connected to uu, then uu is its only neighbor. If uu were connected to any other vertex jj (where jij \neq i), then there would be a path iuji-u-j of length 2 between ii and jj. But this contradicts our finding from Step 2. Therefore, if ii is connected to uu, then uu cannot be connected to any vertex other than ii. Since deg(u)=1\deg(u)=1, uu must be connected only to ii. This means that the graph GG consists of a collection of disjoint edges. Each vertex is part of exactly one edge. This is the definition of a perfect matching. **Step 4: Evaluate the given options.** * **"GG is a cycle"**: A cycle graph CnC_n (for n3n \ge 3) has all vertices with degree 2. This contradicts our finding that every vertex has degree 1. * **"GG is a perfect matching"**: This perfectly matches our derivation. A perfect matching is a set of edges such that every vertex in the graph is incident to exactly one edge in the set. This implies every vertex has degree 1. * **"GG is a complete graph"**: A complete graph KnK_n has all vertices with degree n1n-1. For n1=1n-1=1, n=2n=2. K2K_2 is a single edge, which is a perfect matching. However, for n>2n > 2, KnK_n is not a perfect matching (e.g., K3K_3 has degree 2 for all vertices). So, this is not *always* true. * **"There is no such graph GG"**: Such graphs exist. For example, a graph with two vertices and one edge (K2K_2) has A=(0110)A = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}. Then A2=(0110)(0110)=(1001)=IA^2 = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I. This is a perfect matching. Another example is two disjoint edges (a graph with 4 vertices and 2 edges). So, this statement is false. Based on the analysis, the only statement that is always true is that GG is a perfect matching. The final answer is G is a perfect matching\boxed{\text{G is a perfect matching}}.
4 Numerical
2024.1
The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________
Correct Answer: 16
View Solution
Here's a step-by-step solution: 1. The given graph is a complete graph with 4 vertices, labelled A, B, C, and D. 2. For a complete graph with nn vertices, the number of spanning trees can be found using Cayley's Formula. 3. Cayley's Formula states that the number of spanning trees in a complete graph KnK_n is nn2n^{n-2}. 4. In this case, the number of vertices is n=4n=4. 5. Substitute n=4n=4 into Cayley's Formula:
N=nn2N = n^{n-2}
N=442N = 4^{4-2}
N=42N = 4^2
N=16N = 16
Answer: 16\boxed{16}
5 Single Choice
2023.1
**Q.55** Let GG be a simple, finite, undirected graph with vertex set {v1,,vn}\{v_1, \dots, v_n\}. Let Δ(G)\Delta(G) denote the maximum degree of GG and let N={1,2,}\mathbb{N} = \{1, 2, \dots\} denote the set of all possible colors. Color the vertices of GG using the following greedy strategy: for i=1,,ni = 1, \dots, n
color(vi)min{jN: no neighbour of vi is colored j}\operatorname{color}(v_i) \leftarrow \min\{j \in \mathbb{N} : \text{ no neighbour of } v_i \text{ is colored } j\}
Which of the following statements is/are TRUE? This procedure results in a proper vertex coloring of GG. The number of colors used is at most Δ(G)+1\Delta(G) + 1. The number of colors used is at most Δ(G)\Delta(G). The number of colors used is equal to the chromatic number of GG.
View Solution
The problem describes a greedy vertex coloring algorithm and asks us to identify the true statements regarding its properties. Let's analyze each statement. The greedy coloring algorithm processes vertices in a given order v1,v2,,vnv_1, v_2, \dots, v_n. For each vertex viv_i, it assigns the smallest positive integer color jj that has not been used by any of its already-colored neighbors.
color(vi)min{jN: no neighbour of vi is colored j}\operatorname{color}(v_i) \leftarrow \min\{j \in \mathbb{N} : \text{ no neighbour of } v_i \text{ is colored } j\}
**1. This procedure results in a proper vertex coloring of GG.** A proper vertex coloring requires that no two adjacent vertices have the same color. When `color(viv_i)` is assigned, the algorithm explicitly chooses the smallest color jj such that no *already-colored* neighbor of viv_i has color jj. This ensures that viv_i does not share a color with any of its neighbors vkv_k where k<ik < i. For any neighbor vkv_k where k>ik > i, when vkv_k is processed, it will similarly choose a color different from its already-colored neighbors, including viv_i. Therefore, for any edge (vi,vk)(v_i, v_k) in GG, `color(viv_i)` will be different from `color(vkv_k)`. This statement is **TRUE**. **2. The number of colors used is at most Δ(G)+1\Delta(G) + 1.** Let viv_i be any vertex in GG. When viv_i is being colored, it has at most deg(vi)\deg(v_i) neighbors. Let NiN_i^- be the set of neighbors of viv_i that have already been colored (i.e., Ni={vkN(vi):k<i}N_i^- = \{v_k \in N(v_i) : k < i\}). The algorithm assigns `color(viv_i)` to be the smallest positive integer not present in the set of colors used by NiN_i^-. The number of distinct colors used by vertices in NiN_i^- is at most Ni|N_i^-|. Since Nideg(vi)|N_i^-| \le \deg(v_i) and deg(vi)Δ(G)\deg(v_i) \le \Delta(G), the number of distinct colors used by NiN_i^- is at most Δ(G)\Delta(G). If kk distinct colors are used by NiN_i^-, then the smallest available color will be at most k+1k+1. Thus, `color(viv_i)` will be at most deg(vi)+1\deg(v_i) + 1, which is at most Δ(G)+1\Delta(G) + 1. Since this holds for every vertex viv_i, the total number of colors used in the graph is at most Δ(G)+1\Delta(G) + 1. This statement is **TRUE**. **3. The number of colors used is at most Δ(G)\Delta(G).** Consider a complete graph KnK_n with nn vertices. For KnK_n, Δ(Kn)=n1\Delta(K_n) = n-1. Let the vertex ordering be v1,v2,,vnv_1, v_2, \dots, v_n. - `color(v1v_1)` = 1. - `color(v2v_2)`: v2v_2 is adjacent to v1v_1 (color 1). So `color(v2v_2)` = 2. - `color(v3v_3)`: v3v_3 is adjacent to v1v_1 (color 1) and v2v_2 (color 2). So `color(v3v_3)` = 3. - ... - `color(vnv_n)`: vnv_n is adjacent to v1,,vn1v_1, \dots, v_{n-1} (colors 1,,n11, \dots, n-1). So `color(vnv_n)` = nn. The number of colors used is nn. Since n=Δ(Kn)+1n = \Delta(K_n) + 1, the number of colors used is not at most Δ(Kn)\Delta(K_n) for n>1n > 1. For example, for K2K_2, Δ(K2)=1\Delta(K_2)=1, but 2 colors are used. 2≰12 \not\le 1. This statement is **FALSE**. **4. The number of colors used is equal to the chromatic number of GG.** The chromatic number χ(G)\chi(G) is the minimum number of colors required for a proper vertex coloring. The greedy algorithm does not always produce an optimal coloring. The number of colors used by the greedy algorithm depends on the chosen vertex ordering. Consider the following graph GG with vertices v1,v2,v3,v4,v5v_1, v_2, v_3, v_4, v_5 and edges (v1,v2),(v1,v3),(v2,v4),(v3,v4),(v4,v5)(v_1, v_2), (v_1, v_3), (v_2, v_4), (v_3, v_4), (v_4, v_5). This graph is bipartite, so its chromatic number χ(G)=2\chi(G) = 2. Let's apply the greedy algorithm with the vertex ordering v1,v5,v2,v3,v4v_1, v_5, v_2, v_3, v_4. 1. `color(v1v_1)` = 1. 2. `color(v5v_5)` = 1 (since v5v_5 is not adjacent to v1v_1). 3. `color(v2v_2)`: Neighbor v1v_1 has color 1. So `color(v2v_2)` = 2. 4. `color(v3v_3)`: Neighbor v1v_1 has color 1. So `color(v3v_3)` = 2. 5. `color(v4v_4)`: Neighbors are v2v_2 (color 2), v3v_3 (color 2), and v5v_5 (color 1). The set of colors used by its neighbors is {1,2}\{1, 2\}. The smallest available color is 3. So `color(v4v_4)` = 3. In this case, the greedy algorithm used 3 colors, but χ(G)=2\chi(G) = 2. Since 323 \ne 2, the number of colors used is not always equal to the chromatic number of GG. This statement is **FALSE**. Based on the analysis, statements 1 and 2 are TRUE. The final answer is Statements 1 and 2 are TRUE\boxed{\text{Statements 1 and 2 are TRUE}}.
6 Numerical
2022.1
Consider a simple undirected graph of 1010 vertices. If the graph is disconnected, then the maximum number of edges it can have is ________.
Correct Answer: 36
View Solution
Solution: To find the maximum number of edges in a disconnected undirected graph with n=10n=10 vertices, we consider the structure of such a graph. 1. **Understanding Disconnected Graphs:** A graph is disconnected if it can be partitioned into two or more non-empty sets of vertices such that there are no edges connecting vertices from different sets. To maximize the number of edges, we want to minimize the number of components, ideally having exactly two components, and make these components as dense as possible (i.e., complete graphs). 2. **Partitioning Vertices:** Let the nn vertices be partitioned into two non-empty sets, V1V_1 and V2V_2, with V1=k|V_1| = k and V2=nk|V_2| = n-k. For the graph to be disconnected, there must be no edges between V1V_1 and V2V_2. To maximize the total number of edges, we assume that the subgraphs induced by V1V_1 and V2V_2 are complete graphs, KkK_k and KnkK_{n-k} respectively. 3. **Number of Edges:** The number of edges in a complete graph KmK_m is (m2)=m(m1)2\binom{m}{2} = \frac{m(m-1)}{2}. Thus, the total number of edges in our disconnected graph, with components KkK_k and KnkK_{n-k}, would be:
E(k)=(k2)+(nk2)E(k) = \binom{k}{2} + \binom{n-k}{2}
For n=10n=10, this becomes:
E(k)=(k2)+(10k2)E(k) = \binom{k}{2} + \binom{10-k}{2}
We need to maximize this value for 1k91 \le k \le 9 (since both components must be non-empty). 4. **Evaluating for different values of kk:** * For k=1k=1: One component is K1K_1 (an isolated vertex), and the other is K9K_9.
E(1)=(12)+(1012)=(12)+(92)=0+9×82=0+36=36E(1) = \binom{1}{2} + \binom{10-1}{2} = \binom{1}{2} + \binom{9}{2} = 0 + \frac{9 \times 8}{2} = 0 + 36 = 36
* For k=2k=2: One component is K2K_2, and the other is K8K_8.
E(2)=(22)+(1022)=(22)+(82)=1+8×72=1+28=29E(2) = \binom{2}{2} + \binom{10-2}{2} = \binom{2}{2} + \binom{8}{2} = 1 + \frac{8 \times 7}{2} = 1 + 28 = 29
* For k=3k=3: One component is K3K_3, and the other is K7K_7.
E(3)=(32)+(1032)=(32)+(72)=3+7×62=3+21=24E(3) = \binom{3}{2} + \binom{10-3}{2} = \binom{3}{2} + \binom{7}{2} = 3 + \frac{7 \times 6}{2} = 3 + 21 = 24
* For k=4k=4: One component is K4K_4, and the other is K6K_6.
E(4)=(42)+(1042)=(42)+(62)=6+6×52=6+15=21E(4) = \binom{4}{2} + \binom{10-4}{2} = \binom{4}{2} + \binom{6}{2} = 6 + \frac{6 \times 5}{2} = 6 + 15 = 21
* For k=5k=5: One component is K5K_5, and the other is K5K_5.
E(5)=(52)+(1052)=(52)+(52)=10+10=20E(5) = \binom{5}{2} + \binom{10-5}{2} = \binom{5}{2} + \binom{5}{2} = 10 + 10 = 20
5. **Conclusion:** The function E(k)E(k) is maximized when kk is as far from n/2n/2 as possible, i.e., when k=1k=1 (or k=n1=9k=n-1=9 by symmetry). The maximum number of edges is 3636. This configuration corresponds to a graph where one component is a complete graph on 99 vertices (K9K_9) and the other component is a single isolated vertex (K1K_1). The maximum number of edges a disconnected graph of 1010 vertices can have is 3636. Answer: 36\boxed{36}
7 Single Choice
2022.1
Which of the properties hold for the adjacency matrix A\mathbf{A} of a simple undirected unweighted graph having nn vertices?
A
The diagonal entries of A2\mathbf{A}^2 are the degrees of the vertices of the graph.
B
If the graph is connected, then none of the entries of An1+In\mathbf{A}^{n-1}+\mathbf{I}_n can be zero.
C
If the sum of all the elements of A\mathbf{A} is at most 2(n1)2(n-1), then the graph must be acyclic.
D
If there is at least a 11 in each of A\mathbf{A}'s rows and columns, then the graph must be connected.
View Solution
**Solution:** Let A\mathbf{A} be the adjacency matrix of a simple undirected unweighted graph with nn vertices. 1. **Analyze Option 1:** "The diagonal entries of A2\mathbf{A}^2 are the degrees of the vertices of the graph." Let Aij\mathbf{A}_{ij} be the entry in the ii-th row and jj-th column of A\mathbf{A}. For a simple undirected graph, Aii=0\mathbf{A}_{ii} = 0 (no self-loops) and Aij=Aji\mathbf{A}_{ij} = \mathbf{A}_{ji} (undirected). Also, Aij{0,1}\mathbf{A}_{ij} \in \{0, 1\}. The (i,i)(i, i)-th entry of A2\mathbf{A}^2 is given by the sum of products of entries from the ii-th row of A\mathbf{A} and the ii-th column of A\mathbf{A}:
(A2)ii=k=1nAikAki(\mathbf{A}^2)_{ii} = \sum_{k=1}^{n} \mathbf{A}_{ik} \mathbf{A}_{ki}
Since A\mathbf{A} is symmetric for an undirected graph, Aki=Aik\mathbf{A}_{ki} = \mathbf{A}_{ik}. Substituting this into the equation:
(A2)ii=k=1nAikAik=k=1n(Aik)2(\mathbf{A}^2)_{ii} = \sum_{k=1}^{n} \mathbf{A}_{ik} \mathbf{A}_{ik} = \sum_{k=1}^{n} (\mathbf{A}_{ik})^2
Since Aik\mathbf{A}_{ik} can only be 00 or 11, (Aik)2=Aik(\mathbf{A}_{ik})^2 = \mathbf{A}_{ik}.
(A2)ii=k=1nAik(\mathbf{A}^2)_{ii} = \sum_{k=1}^{n} \mathbf{A}_{ik}
The sum k=1nAik\sum_{k=1}^{n} \mathbf{A}_{ik} represents the number of edges incident to vertex ii, which is the definition of the degree of vertex ii, deg(vi)\operatorname{deg}(v_i). Thus, the diagonal entries of A2\mathbf{A}^2 are indeed the degrees of the vertices of the graph. This statement is **TRUE**. 2. **Analyze Option 2:** "If the graph is connected, then none of the entries of An1+In\mathbf{A}^{n-1}+\mathbf{I}_n can be zero." The (i,j)(i, j)-th entry of Ak\mathbf{A}^k represents the number of walks of length kk from vertex ii to vertex jj. Consider a path graph PnP_n with nn vertices, v1v2vnv_1 - v_2 - \dots - v_n. This graph is connected. Let's take n=3n=3. The graph is v1v2v3v_1 - v_2 - v_3. The adjacency matrix A\mathbf{A} is:
A=(010101010)\mathbf{A} = \begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix}
We need to compute An1\mathbf{A}^{n-1}, which is A2\mathbf{A}^2 for n=3n=3:
A2=(010101010)(010101010)=(101020101)\mathbf{A}^2 = \begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix} \begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 2 & 0 \\ 1 & 0 & 1 \end{pmatrix}
Now, let's compute An1+In=A2+I3\mathbf{A}^{n-1} + \mathbf{I}_n = \mathbf{A}^2 + \mathbf{I}_3:
A2+I3=(101020101)+(100010001)=(201030102)\mathbf{A}^2 + \mathbf{I}_3 = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 2 & 0 \\ 1 & 0 & 1 \end{pmatrix} + \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 0 & 1 \\ 0 & 3 & 0 \\ 1 & 0 & 2 \end{pmatrix}
The entry at position (1,2)(1, 2) is 00. This contradicts the statement that "none of the entries of An1+In\mathbf{A}^{n-1}+\mathbf{I}_n can be zero." This statement is **FALSE**. 3. **Analyze Option 3:** "If the sum of all the elements of A\mathbf{A} is at most 2(n1)2(n-1), then the graph must be acyclic." The sum of all elements of A\mathbf{A} is 2m2m, where mm is the number of edges in the graph (since A\mathbf{A} is symmetric and has 00s on the diagonal for a simple graph). The given condition is 2m2(n1)2m \le 2(n-1), which simplifies to mn1m \le n-1. A graph with nn vertices and mm edges is acyclic if and only if it is a forest (a collection of trees). If m<n1m < n-1, the graph must be disconnected and is a forest, hence acyclic. If m=n1m = n-1: - If the graph is connected, it is a tree, which is acyclic. - If the graph is disconnected, it must contain a cycle. For example, consider n=4n=4 vertices and m=3m=3 edges. A graph consisting of a C3C_3 (cycle of length 3) and an isolated vertex is disconnected and has 33 edges. Let the vertices be v1,v2,v3,v4v_1, v_2, v_3, v_4. Edges are (v1,v2),(v2,v3),(v3,v1)(v_1, v_2), (v_2, v_3), (v_3, v_1). Vertex v4v_4 is isolated. This graph has n=4n=4 vertices and m=3m=3 edges, so m=n1m=n-1. However, it contains a cycle (v1v2v3v1v_1-v_2-v_3-v_1). Since a graph with m=n1m=n-1 edges can be disconnected and contain a cycle, the statement "the graph must be acyclic" is not always true. This statement is **FALSE**. 4. **Analyze Option 4:** "If there is at least a 11 in each of A\mathbf{A}'s rows and columns, then the graph must be connected." Having at least a 11 in each row (and column, due to symmetry) means that every vertex has a degree of at least 11. In other words, there are no isolated vertices. Consider a graph with n=4n=4 vertices and two disjoint edges: v1v2v_1-v_2 and v3v4v_3-v_4. The adjacency matrix A\mathbf{A} is:
A=(0100100000010010)\mathbf{A} = \begin{pmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}
Each row and column of A\mathbf{A} contains at least one 11. For example, row 1 has A12=1\mathbf{A}_{12}=1, row 2 has A21=1\mathbf{A}_{21}=1, row 3 has A34=1\mathbf{A}_{34}=1, and row 4 has A43=1\mathbf{A}_{43}=1. However, this graph is disconnected (it has two connected components: {v1,v2}\{v_1, v_2\} and {v3,v4}\{v_3, v_4\}). Therefore, having no isolated vertices does not guarantee that the graph is connected. This statement is **FALSE**. Based on the analysis, only Option 1 is true. Answer: \boxed{The diagonal entries of A2\mathbf{A}^2 are the degrees of the vertices of the graph.}
8 Multiple Select
2022.1
The following simple undirected graph is referred to as the Peterson graph. Which of the following statements is/are TRUE?
A
The chromatic number of the graph is 3.
B
The graph has a Hamiltonian path.
C
The following graph is isomorphic to the Peterson graph.
D
The size of the largest independent set of the given graph is 3. (A subset of vertices of a graph form an independent set if no two vertices of the subset are adjacent.)
View Solution
**Step 1: Analyze the Peterson Graph.** The Peterson graph is a 3-regular graph with 10 vertices and 15 edges. It consists of an outer 5-cycle (C5C_5) and an inner 5-cycle (often drawn as a 5-pointed star), with corresponding vertices connected by "spokes". Let the outer vertices be v0,v1,v2,v3,v4v_0, v_1, v_2, v_3, v_4 and the inner vertices be u0,u1,u2,u3,u4u_0, u_1, u_2, u_3, u_4. The edges are: 1. Outer cycle edges: (vi,vi+1(mod5))(v_i, v_{i+1 \pmod 5}) for i{0,1,2,3,4}i \in \{0, 1, 2, 3, 4\}. 2. Spoke edges: (vi,ui)(v_i, u_i) for i{0,1,2,3,4}i \in \{0, 1, 2, 3, 4\}. 3. Inner star edges: (ui,ui+2(mod5))(u_i, u_{i+2 \pmod 5}) for i{0,1,2,3,4}i \in \{0, 1, 2, 3, 4\}. **Step 2: Evaluate Option 1 - The chromatic number of the graph is 3.** The Peterson graph contains a C5C_5 (e.g., the outer pentagon v0v1v2v3v4v0v_0-v_1-v_2-v_3-v_4-v_0). Since C5C_5 is an odd cycle, the graph is not bipartite, and its chromatic number χ(G)\chi(G) must be at least 3. To show χ(G)=3\chi(G)=3, we need to find a valid 3-coloring. Let's assign colors (1, 2, 3) to the vertices: 1. Color the outer pentagon: c(v0)=1c(v_0)=1 c(v1)=2c(v_1)=2 c(v2)=3c(v_2)=3 c(v3)=1c(v_3)=1 c(v4)=2c(v_4)=2 (This ensures no adjacent outer vertices have the same color). 2. Color the inner pentagon, respecting connections to outer vertices and inner star edges: * c(u0)c(u_0) must be c(v0)=1\ne c(v_0)=1. Let c(u0)=2c(u_0)=2. * c(u1)c(u_1) must be c(v1)=2\ne c(v_1)=2. * c(u2)c(u_2) must be c(v2)=3\ne c(v_2)=3. * c(u3)c(u_3) must be c(v3)=1\ne c(v_3)=1. * c(u4)c(u_4) must be c(v4)=2\ne c(v_4)=2. Now consider the inner star edges (ui,ui+2(mod5))(u_i, u_{i+2 \pmod 5}): * Since u0u_0 is adjacent to u2u_2 and u3u_3, and c(u0)=2c(u_0)=2: * c(u2)2c(u_2) \ne 2. From c(u2)3c(u_2) \ne 3, we must have c(u2)=1c(u_2)=1. * c(u3)2c(u_3) \ne 2. From c(u3)1c(u_3) \ne 1, we must have c(u3)=3c(u_3)=3. * Now we have c(u0)=2,c(u2)=1,c(u3)=3c(u_0)=2, c(u_2)=1, c(u_3)=3. * Consider u4u_4: It is adjacent to u1u_1 and u2u_2. Since c(u2)=1c(u_2)=1, c(u4)1c(u_4) \ne 1. From c(u4)2c(u_4) \ne 2, we must have c(u4)=3c(u_4)=3. * Consider u1u_1: It is adjacent to u3u_3 and u4u_4. Since c(u3)=3c(u_3)=3 and c(u4)=3c(u_4)=3, c(u1)c(u_1) must be 3\ne 3. From c(u1)2c(u_1) \ne 2, we must have c(u1)=1c(u_1)=1. Let's verify the complete coloring: * Outer: c(v0)=1,c(v1)=2,c(v2)=3,c(v3)=1,c(v4)=2c(v_0)=1, c(v_1)=2, c(v_2)=3, c(v_3)=1, c(v_4)=2. * Inner: c(u0)=2,c(u1)=1,c(u2)=1,c(u3)=3,c(u4)=3c(u_0)=2, c(u_1)=1, c(u_2)=1, c(u_3)=3, c(u_4)=3. Check all adjacencies: * Outer edges: (v0,v1):(1,2)(v_0,v_1): (1,2), (v1,v2):(2,3)(v_1,v_2): (2,3), (v2,v3):(3,1)(v_2,v_3): (3,1), (v3,v4):(1,2)(v_3,v_4): (1,2), (v4,v0):(2,1)(v_4,v_0): (2,1). All OK. * Spoke edges: (v0,u0):(1,2)(v_0,u_0): (1,2), (v1,u1):(2,1)(v_1,u_1): (2,1), (v2,u2):(3,1)(v_2,u_2): (3,1), (v3,u3):(1,3)(v_3,u_3): (1,3), (v4,u4):(2,3)(v_4,u_4): (2,3). All OK. * Inner star edges: (u0,u2):(2,1)(u_0,u_2): (2,1), (u1,u3):(1,3)(u_1,u_3): (1,3), (u2,u4):(1,3)(u_2,u_4): (1,3), (u3,u0):(3,2)(u_3,u_0): (3,2), (u4,u1):(3,1)(u_4,u_1): (3,1). All OK. Since a 3-coloring exists, and χ(G)3\chi(G) \ge 3, the chromatic number of the Peterson graph is 3. This statement is **TRUE**. **Step 3: Evaluate Option 2 - The graph has a Hamiltonian path.** A Hamiltonian path is a path that visits every vertex exactly once. The Peterson graph is known to not have a Hamiltonian cycle, but it does have a Hamiltonian path. One example of a Hamiltonian path is: v0v1v2v3v4u4u1u3u0u2v_0 - v_1 - v_2 - v_3 - v_4 - u_4 - u_1 - u_3 - u_0 - u_2 Let's verify this path: * v0v1v_0 \to v_1 (outer edge) * v1v2v_1 \to v_2 (outer edge) * v2v3v_2 \to v_3 (outer edge) * v3v4v_3 \to v_4 (outer edge) * v4u4v_4 \to u_4 (spoke edge) * u4u1u_4 \to u_1 (inner star edge, u4u_4 is adjacent to u4+2(mod5)=u1u_{4+2 \pmod 5} = u_1) * u1u3u_1 \to u_3 (inner star edge, u1u_1 is adjacent to u1+2(mod5)=u3u_{1+2 \pmod 5} = u_3) * u3u0u_3 \to u_0 (inner star edge, u3u_3 is adjacent to u3+2(mod5)=u0u_{3+2 \pmod 5} = u_0) * u0u2u_0 \to u_2 (inner star edge, u0u_0 is adjacent to u0+2(mod5)=u2u_{0+2 \pmod 5} = u_2) This path visits all 10 vertices exactly once. This statement is **TRUE**. **Step 4: Evaluate Option 3 - The following graph is isomorphic to the Peterson graph.** Isomorphic graphs must have the same number of vertices and edges. * The Peterson graph has 10 vertices and 15 edges. * The graph provided in the option has: * 8 outer vertices (forming an octagon). * 2 inner vertices. * Total vertices = 8+2=108 + 2 = 10. (Matches Peterson graph) * Edges: * 8 edges for the outer octagon. * 4 edges connecting the top inner vertex to outer vertices. * 4 edges connecting the bottom inner vertex to outer vertices. * 1 edge connecting the two inner vertices. * Total edges = 8+4+4+1=178 + 4 + 4 + 1 = 17. Since the number of edges (17) in the given graph is different from the number of edges in the Peterson graph (15), the two graphs are not isomorphic. This statement is **FALSE**. **Step 5: Evaluate Option 4 - The size of the largest independent set of the given graph is 3.** An independent set is a set of vertices where no two vertices are adjacent. The size of the largest independent set is denoted by α(G)\alpha(G). Let's try to find an independent set of size 4 in the Peterson graph. Consider the set S={v0,v2,v4,u1}S = \{v_0, v_2, v_4, u_1\}. * v0,v2,v4v_0, v_2, v_4 are non-adjacent (they are vertices of the outer C5C_5 separated by one vertex). * Check adjacencies between u1u_1 and {v0,v2,v4}\{v_0, v_2, v_4\}: * u1u_1 is adjacent to v1v_1, u3u_3, u4u_4. * u1u_1 is not adjacent to v0v_0. * u1u_1 is not adjacent to v2v_2. * u1u_1 is not adjacent to v4v_4. * Therefore, the set S={v0,v2,v4,u1}S = \{v_0, v_2, v_4, u_1\} is an independent set of size 4. Since we found an independent set of size 4, the largest independent set must be at least 4. It is a known property that the independence number of the Peterson graph is 4. Therefore, the statement that the size of the largest independent set is 3 is incorrect. This statement is **FALSE**. **Conclusion:** Statements 1 and 2 are TRUE. The final answer is The chromatic number of the graph is 3., The graph has a Hamiltonian path.\boxed{\text{The chromatic number of the graph is 3., The graph has a Hamiltonian path.}}

Why Practice PYQs?

📈

Understand Pattern

Know what to expect in the actual exam

🎯

Topic Weightage

Focus on high-yield topics

Build Confidence

Practice with real exam questions

Frequently Asked Questions

How are GATE PYQs organized?

PYQs are organized chapter-wise across 62 topics, making it easy to practice specific areas. Each question shows its year and slot.

How many years of PYQs are available?

We have 8 years of GATE CS PYQs from 2021.1 to 2025.2, totaling 428+ questions.

Is the first chapter free?

Yes! The first chapter's PYQs are completely FREE with full solutions. Practice and evaluate before upgrading.

Do PYQs have detailed solutions?

Every PYQ comes with step-by-step solutions and explanations to help you understand the concepts thoroughly.

More GATECS Resources

Why Choose MastersUp?

🎯

AI-Powered Plans

Personalized study schedules based on your exam date and learning pace

📚

15,000+ Questions

Verified questions with detailed solutions from past papers

📊

Smart Analytics

Track your progress with subject-wise performance insights

🔖

Bookmark & Revise

Save important questions for quick revision before exams

Start Your Free Preparation →

No credit card required • Free forever for basic features