Updated: Mar 2026
First Chapter - 100% FREE

GATE CS Chapter Practice

Practice GATE CS questions chapter-wise. 1000+ practice questions across 60 topics with detailed solutions. First chapter FREE!

1000+
Questions
60
Chapters
~34h
Total Time
72%
Avg Score
Start Free Test →

Question Type Distribution

407
MCQ
Single Choice
193
MSQ
Multiple Select
400
NAT
Numerical

All Chapters

Graph Theory

FREE

Engineering Mathematics

27
Questions
54m
Est. Time
Start Free

Combinatorics

Engineering Mathematics

36
Questions
72m
Est. Time
Unlock

Propositional and First-Order Logic

Engineering Mathematics

23
Questions
46m
Est. Time
Unlock

Algebraic Structures

Engineering Mathematics

15
Questions
30m
Est. Time
Unlock

Set Theory, Relations, and Functions

Engineering Mathematics

19
Questions
38m
Est. Time
Unlock

LU Decomposition

Engineering Mathematics

10
Questions
20m
Est. Time
Unlock

Eigenvalues and Eigenvectors

Engineering Mathematics

10
Questions
20m
Est. Time
Unlock

Matrices and Determinants

Engineering Mathematics

21
Questions
42m
Est. Time
Unlock

System of Linear Equations

Engineering Mathematics

13
Questions
26m
Est. Time
Unlock

Limits, Continuity, and Differentiability

Engineering Mathematics

12
Questions
24m
Est. Time
Unlock

Integration

Engineering Mathematics

4
Questions
8m
Est. Time
Unlock

Applications of Differentiation

Engineering Mathematics

5
Questions
10m
Est. Time
Unlock

Boolean Algebra and Minimization

Digital Logic

25
Questions
50m
Est. Time
Unlock

Combinational Circuits

Digital Logic

12
Questions
24m
Est. Time
Unlock

Sequential Circuits

Digital Logic

17
Questions
34m
Est. Time
Unlock

Computer Arithmetic

Digital Logic

5
Questions
10m
Est. Time
Unlock

Number Representations

Digital Logic

31
Questions
62m
Est. Time
Unlock

CPU Components

Computer Organization and Architecture

11
Questions
22m
Est. Time
Unlock

Instruction Set Architecture (ISA)

Computer Organization and Architecture

25
Questions
50m
Est. Time
Unlock

Memory Hierarchy

Computer Organization and Architecture

33
Questions
66m
Est. Time
Unlock

Graph Theory - Practice

Free sample questions from Engineering Mathematics

100% FREE
1 Numerical
A simple undirected graph GG has 9 vertices. The degree of each vertex in GG is either 3 or 4. There are twice as many vertices of degree 3 as there are vertices of degree 4. The number of edges in the complement graph Gˉ\bar{G} is _________.
Correct Answer: 21
View Solution
**Step 1: Determine the number of vertices for each degree in GG.** Let nn be the total number of vertices, so n=9n=9. Let n3n_3 be the number of vertices with degree 3. Let n4n_4 be the number of vertices with degree 4. From the problem statement, we know that: 1. n3+n4=n=9n_3 + n_4 = n = 9 2. There are twice as many vertices of degree 3 as there are vertices of degree 4, so n3=2n4n_3 = 2n_4. Substitute the second equation into the first:
2n4+n4=92n_4 + n_4 = 9
3n4=93n_4 = 9
n4=3n_4 = 3
Now, find n3n_3:
n3=2×3=6n_3 = 2 \times 3 = 6
So, graph GG has 6 vertices of degree 3 and 3 vertices of degree 4. **Step 2: Calculate the total number of edges in GG.** Using the Handshaking Lemma, the sum of the degrees of all vertices is equal to twice the number of edges (2E2|E|).
vVdeg(v)=2E\sum_{v \in V} \operatorname{deg}(v) = 2|E|
Substitute the calculated number of vertices for each degree:
(6×3)+(3×4)=2E(6 \times 3) + (3 \times 4) = 2|E|
18+12=2E18 + 12 = 2|E|
30=2E30 = 2|E|
E=15|E| = 15
Thus, the graph GG has 15 edges. **Step 3: Calculate the total possible number of edges in a simple graph with nn vertices.** The maximum number of edges in a simple undirected graph with nn vertices (a complete graph KnK_n) is given by the formula n(n1)2\frac{n(n-1)}{2}. For n=9n=9:
Total possible edges=9(91)2=9×82=722=36\text{Total possible edges} = \frac{9(9-1)}{2} = \frac{9 \times 8}{2} = \frac{72}{2} = 36
**Step 4: Calculate the number of edges in the complement graph Gˉ\bar{G}.** The complement graph Gˉ\bar{G} contains all the edges that are NOT present in GG, from the set of all possible edges. Therefore, the number of edges in Gˉ\bar{G}, denoted as Eˉ|\bar{E}|, is:
Eˉ=(Total possible edges)E|\bar{E}| = (\text{Total possible edges}) - |E|
Eˉ=3615|\bar{E}| = 36 - 15
Eˉ=21|\bar{E}| = 21
The number of edges in the complement graph Gˉ\bar{G} is 21. **Answer:** 21\boxed{21}
2 Numerical
Let GG be a simple undirected graph with nn vertices. Let SG=vVdeg(v)2S_G = \sum_{v \in V} \operatorname{deg}(v)^2 be the sum of the squares of the degrees of its vertices. Let Gˉ\bar{G} be the complement graph of GG, and let SGˉ=vVdegGˉ(v)2S_{\bar{G}} = \sum_{v \in V} \operatorname{deg}_{\bar{G}}(v)^2 be the sum of the squares of the degrees of its vertices. If n=8n = 8, SG=72S_G = 72, and SGˉ=128S_{\bar{G}} = 128, then the number of edges in GG is _________.
Correct Answer: 12
View Solution
**Step 1: Understand the relationship between degrees in a graph and its complement.** For any simple undirected graph GG with nn vertices, and its complement graph Gˉ\bar{G}, the degree of any vertex vv in GG and Gˉ\bar{G} are related by the formula:
degGˉ(v)=(n1)degG(v)\operatorname{deg}_{\bar{G}}(v) = (n-1) - \operatorname{deg}_G(v)
This is because a vertex vv is connected to all other n1n-1 vertices in the complete graph KnK_n. In GG, it is connected to degG(v)\operatorname{deg}_G(v) vertices. In Gˉ\bar{G}, it is connected to the remaining (n1)degG(v)(n-1) - \operatorname{deg}_G(v) vertices. In this problem, n=8n=8, so degGˉ(v)=7degG(v)\operatorname{deg}_{\bar{G}}(v) = 7 - \operatorname{deg}_G(v). **Step 2: Express SGˉS_{\bar{G}} in terms of SGS_G and other graph parameters.** The sum of the squares of the degrees in Gˉ\bar{G} is SGˉ=vVdegGˉ(v)2S_{\bar{G}} = \sum_{v \in V} \operatorname{deg}_{\bar{G}}(v)^2. Substituting the relationship from Step 1:
SGˉ=vV((n1)degG(v))2S_{\bar{G}} = \sum_{v \in V} ((n-1) - \operatorname{deg}_G(v))^2
Expand the square term:
SGˉ=vV((n1)22(n1)degG(v)+degG(v)2)S_{\bar{G}} = \sum_{v \in V} ((n-1)^2 - 2(n-1)\operatorname{deg}_G(v) + \operatorname{deg}_G(v)^2)
Separate the summation:
SGˉ=vV(n1)22(n1)vVdegG(v)+vVdegG(v)2S_{\bar{G}} = \sum_{v \in V} (n-1)^2 - 2(n-1)\sum_{v \in V}\operatorname{deg}_G(v) + \sum_{v \in V}\operatorname{deg}_G(v)^2
We know that vV(n1)2=n(n1)2\sum_{v \in V} (n-1)^2 = n(n-1)^2 (since (n1)2(n-1)^2 is a constant for the summation). Also, vVdegG(v)2=SG\sum_{v \in V}\operatorname{deg}_G(v)^2 = S_G. From the Handshaking Lemma, vVdegG(v)=2E\sum_{v \in V}\operatorname{deg}_G(v) = 2|E|, where E|E| is the number of edges in GG. Substitute these into the equation for SGˉS_{\bar{G}}:
SGˉ=n(n1)22(n1)(2E)+SGS_{\bar{G}} = n(n-1)^2 - 2(n-1)(2|E|) + S_G
SGˉ=n(n1)24E(n1)+SGS_{\bar{G}} = n(n-1)^2 - 4|E|(n-1) + S_G
**Step 3: Substitute the given values and solve for E|E|.** Given values are: n=8n=8, SG=72S_G = 72, SGˉ=128S_{\bar{G}} = 128. Substitute these into the derived formula:
128=8(81)24E(81)+72128 = 8(8-1)^2 - 4|E|(8-1) + 72
128=8(7)24E(7)+72128 = 8(7)^2 - 4|E|(7) + 72
128=8(49)28E+72128 = 8(49) - 28|E| + 72
128=39228E+72128 = 392 - 28|E| + 72
Combine the constant terms:
128=46428E128 = 464 - 28|E|
Rearrange the equation to solve for E|E|:
28E=46412828|E| = 464 - 128
28E=33628|E| = 336
E=33628|E| = \frac{336}{28}
E=12|E| = 12
**Answer:** The number of edges in GG is 12\boxed{12}.
3 Numerical
Consider a simple undirected graph GG with NN vertices and KK connected components. Let EminE_{\text{min}} be the minimum possible number of edges GG can have, and EmaxE_{\text{max}} be the maximum possible number of edges GG can have. If N=12N=12 and K=4K=4, what is the value of EmaxEminE_{\text{max}} - E_{\text{min}}?
Correct Answer: 28
View Solution
**Step 1: Determine the minimum number of edges (EminE_{\text{min}}).** For a simple undirected graph with NN vertices and KK connected components, the minimum number of edges required to ensure connectivity within each component is NKN-K. This occurs when each connected component is a tree (a connected graph with no cycles, having vi1v_i-1 edges for viv_i vertices). Given N=12N=12 and K=4K=4:
Emin=NK=124=8E_{\text{min}} = N - K = 12 - 4 = 8
**Step 2: Determine the maximum number of edges (EmaxE_{\text{max}}).** To maximize the number of edges while maintaining KK connected components, we should make K1K-1 components as small as possible (i.e., isolated vertices, each contributing 0 edges), and consolidate the remaining vertices into a single large component that is a complete graph. A complete graph has the maximum possible number of edges for its given number of vertices. Number of isolated vertex components = K1=41=3K-1 = 4-1 = 3. These 3 components contribute 3×1=33 \times 1 = 3 vertices and 3×0=03 \times 0 = 0 edges. Number of vertices in the largest component = N(K1)=123=9N - (K-1) = 12 - 3 = 9. This largest component, being a complete graph K9K_9, will have the maximum number of edges possible for 9 vertices. The number of edges in a complete graph with vv vertices is v(v1)2\frac{v(v-1)}{2}. Number of edges in the largest component:
9(91)2=9×82=722=36\frac{9(9-1)}{2} = \frac{9 \times 8}{2} = \frac{72}{2} = 36
Therefore, the maximum number of edges EmaxE_{\text{max}} is the sum of edges from all components:
Emax=(edges from largest component)+(edges from isolated vertices)E_{\text{max}} = (\text{edges from largest component}) + (\text{edges from isolated vertices})
Emax=36+0=36E_{\text{max}} = 36 + 0 = 36
**Step 3: Calculate the difference EmaxEminE_{\text{max}} - E_{\text{min}}.**
EmaxEmin=368=28E_{\text{max}} - E_{\text{min}} = 36 - 8 = 28
The difference between the maximum and minimum possible number of edges is 28. **Answer:** 28\boxed{28}
4 Single Choice
Let GG be a graph whose vertices are the cells (i,j)(i,j) of an m×nm \times n chessboard, where 1im1 \le i \le m and 1jn1 \le j \le n. Two distinct vertices (i1,j1)(i_1, j_1) and (i2,j2)(i_2, j_2) are adjacent if a king can move from (i1,j1)(i_1, j_1) to (i2,j2)(i_2, j_2) in a single move. This means i1i21|i_1 - i_2| \le 1 and j1j21|j_1 - j_2| \le 1. What is the chromatic number of GG when m2m \ge 2 and n2n \ge 2?
A
2
B
3
C
4
D
5
View Solution
**Step 1: Understand the graph structure (King's Graph).** The graph described is commonly known as a King's graph. In this graph, each vertex (i,j)(i,j) is adjacent to all its 8 neighbors (including diagonals) on the chessboard, provided they are within the m×nm \times n grid. Specifically, a vertex (i,j)(i,j) is adjacent to (i,j)(i',j') if i{i1,i,i+1}i' \in \{i-1, i, i+1\}, j{j1,j,j+1}j' \in \{j-1, j, j+1\}, and (i,j)(i,j)(i,j) \neq (i',j'). **Step 2: Determine a lower bound for the chromatic number.** Since m2m \ge 2 and n2n \ge 2, we can always find a 2×22 \times 2 subgrid within the m×nm \times n chessboard. Consider the four vertices (i,j)(i,j), (i+1,j)(i+1,j), (i,j+1)(i,j+1), (i+1,j+1)(i+1,j+1) for any 1i<m1 \le i < m and 1j<n1 \le j < n. Each of these four vertices is adjacent to every other vertex in this set. For example, (i,j)(i,j) is adjacent to (i+1,j)(i+1,j) because i(i+1)=11|i-(i+1)|=1 \le 1 and jj=01|j-j|=0 \le 1. Similarly, (i,j)(i,j) is adjacent to (i,j+1)(i,j+1) and (i+1,j+1)(i+1,j+1). All pairs of these four vertices satisfy the adjacency condition. Thus, these four vertices form a complete graph K4K_4 as a subgraph. Since GG contains K4K_4 as a subgraph, any proper coloring of GG must assign distinct colors to the vertices of this K4K_4. Therefore, the chromatic number χ(G)\chi(G) must be at least 4.
χ(G)χ(K4)=4\chi(G) \ge \chi(K_4) = 4
**Step 3: Determine an upper bound for the chromatic number (provide a 4-coloring).** We need to demonstrate that GG can be properly colored using at most 4 colors. Consider the following coloring scheme for each vertex (i,j)(i,j) using colors from the set {1,2,3,4}\{1, 2, 3, 4\}:
c(i,j)=((i1)(mod2))×2+((j1)(mod2))+1c(i,j) = ((i-1) \pmod 2) \times 2 + ((j-1) \pmod 2) + 1
Let's analyze this coloring: * If i1i-1 is even and j1j-1 is even, c(i,j)=0×2+0+1=1c(i,j) = 0 \times 2 + 0 + 1 = 1. * If i1i-1 is even and j1j-1 is odd, c(i,j)=0×2+1+1=2c(i,j) = 0 \times 2 + 1 + 1 = 2. * If i1i-1 is odd and j1j-1 is even, c(i,j)=1×2+0+1=3c(i,j) = 1 \times 2 + 0 + 1 = 3. * If i1i-1 is odd and j1j-1 is odd, c(i,j)=1×2+1+1=4c(i,j) = 1 \times 2 + 1 + 1 = 4. This scheme creates a repeating 2×22 \times 2 pattern of colors across the grid:
(1212343412123434)\begin{pmatrix}1 & 2 & 1 & 2 & \dots \\ 3 & 4 & 3 & 4 & \dots \\ 1 & 2 & 1 & 2 & \dots \\ 3 & 4 & 3 & 4 & \dots \\ \vdots & \vdots & \vdots & \vdots & \ddots\end{pmatrix}
Now, let's verify if this is a proper coloring. Consider any vertex (i,j)(i,j) with color C=c(i,j)C = c(i,j). Its neighbors (i,j)(i',j') satisfy i{i1,i,i+1}i' \in \{i-1, i, i+1\} and j{j1,j,j+1}j' \in \{j-1, j, j+1\}, excluding (i,j)(i,j) itself. The parities of (i1)(i'-1) and (j1)(j'-1) will cover all four combinations of (even/odd, even/odd) values relative to (i1)(i-1) and (j1)(j-1). For example, if (i1)(i-1) is even, then (i1)1(i-1)-1 is odd, (i1)(i-1) is even, and (i+1)1(i+1)-1 is odd. Similarly for jj. This implies that for any vertex (i,j)(i,j), its neighbors (i,j)(i',j') will have ((i1)(mod2),(j1)(mod2))( (i'-1) \pmod 2, (j'-1) \pmod 2 ) values that correspond to all four possible combinations of (0,0)(0,0), (0,1)(0,1), (1,0)(1,0), (1,1)(1,1). Consequently, a vertex (i,j)(i,j) with color CC will have neighbors of all colors other than CC. For instance, if c(i,j)=1c(i,j)=1 (meaning (i1)(mod2)=0(i-1) \pmod 2 = 0 and (j1)(mod2)=0(j-1) \pmod 2 = 0), its neighbors will include vertices with colors 2,3,42,3,4. No neighbor will have color 1. This holds for any color C{1,2,3,4}C \in \{1,2,3,4\}. Therefore, this 4-coloring is a proper vertex coloring, which means χ(G)4\chi(G) \le 4. **Step 4: Conclude the chromatic number.** From Step 2, we established that χ(G)4\chi(G) \ge 4. From Step 3, we showed that χ(G)4\chi(G) \le 4. Combining these two bounds, we conclude that the chromatic number of the King's graph for m2m \ge 2 and n2n \ge 2 is exactly 4. The final answer is 4\boxed{4}.
5 Single Choice
A simple undirected graph GG has nn vertices. It is known that GG contains at least one vertex of degree 5, at least one vertex of degree 7, and all other vertices have a degree of 2. What is the minimum possible value of nn?
A
7
B
8
C
9
D
10
View Solution
Let nn be the total number of vertices in the graph GG. **Step 1: Analyze the given degree constraints and apply the Handshaking Lemma.** The problem states that GG has at least one vertex of degree 5 and at least one vertex of degree 7. All other n2n-2 vertices have a degree of 2. The sum of degrees of all vertices in GG can be expressed as:
vVdeg(v)=5+7+(n2)×2\sum_{v \in V} \deg(v) = 5 + 7 + (n-2) \times 2
vVdeg(v)=12+2n4\sum_{v \in V} \deg(v) = 12 + 2n - 4
vVdeg(v)=2n+8\sum_{v \in V} \deg(v) = 2n + 8
According to the Handshaking Lemma, the sum of degrees in any graph must be an even number. In this case, 2n+82n+8 is always an even number for any integer nn, so this condition is satisfied for any n2n \ge 2. **Step 2: Apply the property of maximum degree in a simple graph.** For a simple undirected graph with nn vertices, the degree of any vertex cannot exceed n1n-1. That is, deg(v)n1\deg(v) \le n-1 for all vVv \in V. In the given graph, the highest degree specified is 7 (from the vertex of degree 7). Therefore, we must have:
7n17 \le n-1
**Step 3: Determine the minimum value of nn.** From the inequality 7n17 \le n-1, we can deduce:
n7+1n \ge 7 + 1
n8n \ge 8
This means that the minimum possible number of vertices nn must be 8. To confirm, if n=8n=8, the degree sequence would include one vertex of degree 7, one of degree 5, and 82=68-2=6 vertices of degree 2. The sequence would be (7,5,2,2,2,2,2,2)(7, 5, 2, 2, 2, 2, 2, 2). The sum of degrees is 7+5+6×2=12+12=247+5+6 \times 2 = 12+12 = 24, which is even. The maximum degree is 7, and n1=81=7n-1 = 8-1=7, so dmaxn1d_{max} \le n-1 is satisfied. Such a graph can exist (e.g., by using the Havel-Hakimi theorem, though explicit construction is not required for this problem). Thus, the minimum possible value of nn is 8. The final answer is 8\boxed{8}
6 Multiple Select
Let G=(V,E)G = (V, E) be a simple undirected graph with n=Vn = |V| vertices and m=Em = |E| edges. Which of the following statements is/are necessarily true?
A
The number of vertices with an odd degree is always even.
B
The maximum possible value of mm is n(n1)2\frac{n(n-1)}{2}.
C
If GG is a 3-regular graph, then nn must be an even number.
D
If n>1n > 1, then m1m \ge 1.
View Solution
**Step 1: Analyze Option 1** According to the Handshaking Lemma, the sum of the degrees of all vertices in a graph is equal to twice the number of edges:
vVdeg(v)=2E\sum_{v \in V} \operatorname{deg}(v) = 2|E|
This implies that the sum of degrees is always an even number. Let VoddV_{odd} be the set of vertices with an odd degree, and VevenV_{even} be the set of vertices with an even degree. The sum of degrees can be written as:
vVdeg(v)=vVodddeg(v)+vVevendeg(v)\sum_{v \in V} \operatorname{deg}(v) = \sum_{v \in V_{odd}} \operatorname{deg}(v) + \sum_{v \in V_{even}} \operatorname{deg}(v)
Since each deg(v)\operatorname{deg}(v) for vVevenv \in V_{even} is an even number, their sum vVevendeg(v)\sum_{v \in V_{even}} \operatorname{deg}(v) is also an even number. As the total sum vVdeg(v)\sum_{v \in V} \operatorname{deg}(v) is even, it follows that vVodddeg(v)\sum_{v \in V_{odd}} \operatorname{deg}(v) must also be an even number. The sum of an odd number of odd integers is odd, while the sum of an even number of odd integers is even. Since vVodddeg(v)\sum_{v \in V_{odd}} \operatorname{deg}(v) is an even number, the number of terms in this sum, which is Vodd|V_{odd}|, must be even. Therefore, the number of vertices with an odd degree is always even. Option 1 is TRUE. **Step 2: Analyze Option 2** A simple undirected graph has no self-loops and no multiple edges between the same pair of vertices. The maximum number of edges in such a graph occurs when every distinct pair of vertices is connected by exactly one edge. Such a graph is called a complete graph, denoted KnK_n. The number of edges in a complete graph KnK_n is the number of ways to choose 2 vertices from nn vertices, which is given by the binomial coefficient (n2)\binom{n}{2}.
(n2)=n(n1)2\binom{n}{2} = \frac{n(n-1)}{2}
Thus, the maximum possible value of mm (the number of edges) in a simple undirected graph with nn vertices is n(n1)2\frac{n(n-1)}{2}. Option 2 is TRUE. **Step 3: Analyze Option 3** A graph is kk-regular if every vertex has a degree of kk. For a 3-regular graph, deg(v)=3\operatorname{deg}(v) = 3 for all vVv \in V. Applying the Handshaking Lemma:
vVdeg(v)=2E\sum_{v \in V} \operatorname{deg}(v) = 2|E|
Since every vertex has a degree of 3, the sum of degrees is n×3n \times 3.
3n=2m3n = 2m
Since 2m2m is an even number, 3n3n must also be an even number. For the product 3n3n to be even, and knowing that 3 is an odd number, nn must necessarily be an even number. Option 3 is TRUE. **Step 4: Analyze Option 4** This statement claims that if a graph has more than one vertex (n>1n > 1), it must have at least one edge (m1m \ge 1). Consider a graph with n=2n=2 vertices, say V={v1,v2}V = \{v_1, v_2\}. It is possible for this graph to have no edges, i.e., E=E = \emptyset. In this case, m=0m=0. Such a graph is a simple undirected graph with n=2n=2 and m=0m=0. This serves as a counterexample. Therefore, the statement is not necessarily true. Option 4 is FALSE. **Answer:** The correct options are: * \boxed{The number of vertices with an odd degree is always even.} * \boxed{The maximum possible value of mm is n(n1)2\frac{n(n-1)}{2}.} * \boxed{If GG is a 3-regular graph, then nn must be an even number.}
7 Multiple Select
Let G=(V,E)G = (V, E) be a simple undirected graph with n=Vn = |V| vertices and m=Em = |E| edges, where n1n \ge 1. Which of the following statements is/are necessarily true?
A
The number of vertices with odd degrees in GG is always an even number.
B
If GG has kk connected components, then mnkm \ge n-k.
C
If every vertex in GG has degree at least 2, then GG must contain a cycle.
D
If m>(n1)(n2)2m > \frac{(n-1)(n-2)}{2}, then GG must be connected.
View Solution
**Option 1: The number of vertices with odd degrees in GG is always an even number.** **Step 1:** Apply the Handshaking Lemma. The Handshaking Lemma states that the sum of the degrees of all vertices in a graph is equal to twice the number of edges:
vVdeg(v)=2E=2m\sum_{v \in V} \operatorname{deg}(v) = 2|E| = 2m
Since 2m2m is always an even number, the sum of degrees must be even. **Step 2:** Analyze the sum of degrees based on parity. Let VoddV_{odd} be the set of vertices with odd degrees and VevenV_{even} be the set of vertices with even degrees.
vVdeg(v)=vVodddeg(v)+vVevendeg(v)\sum_{v \in V} \operatorname{deg}(v) = \sum_{v \in V_{odd}} \operatorname{deg}(v) + \sum_{v \in V_{even}} \operatorname{deg}(v)
The sum of even numbers is always even. Thus, vVevendeg(v)\sum_{v \in V_{even}} \operatorname{deg}(v) is even. Since vVdeg(v)\sum_{v \in V} \operatorname{deg}(v) is even, it implies that vVodddeg(v)\sum_{v \in V_{odd}} \operatorname{deg}(v) must also be even. For a sum of odd numbers to be even, the number of terms in the sum must be even. Therefore, the number of vertices with odd degrees (Vodd|V_{odd}|) must be an even number. **Conclusion:** Statement 1 is necessarily true. **Option 2: If GG has kk connected components, then mnkm \ge n-k.** **Step 1:** Consider the properties of connected components. Let G1,G2,,GkG_1, G_2, \dots, G_k be the kk connected components of GG. Let nin_i be the number of vertices in component GiG_i and mim_i be the number of edges in component GiG_i. We know that i=1kni=n\sum_{i=1}^k n_i = n and i=1kmi=m\sum_{i=1}^k m_i = m. **Step 2:** Apply the minimum edge property for connected graphs. For any connected graph with nin_i vertices, it must have at least ni1n_i - 1 edges. This is because a tree on nin_i vertices has ni1n_i - 1 edges, and a connected graph must contain a spanning tree. So, for each component GiG_i, we have mini1m_i \ge n_i - 1. **Step 3:** Sum the inequalities over all components.
i=1kmii=1k(ni1)\sum_{i=1}^k m_i \ge \sum_{i=1}^k (n_i - 1)
m(i=1kni)(i=1k1)m \ge \left(\sum_{i=1}^k n_i\right) - \left(\sum_{i=1}^k 1\right)
mnkm \ge n - k
**Conclusion:** Statement 2 is necessarily true. **Option 3: If every vertex in GG has degree at least 2, then GG must contain a cycle.** **Step 1:** Assume the contrapositive. Suppose GG does not contain a cycle. Then GG must be a forest (a collection of disjoint trees). **Step 2:** Analyze properties of trees/forests. Every tree with at least two vertices has at least two leaves (vertices of degree 1). If a component of GG is a single vertex (K1K_1), its degree is 0. If n=1n=1, deg(v)=0\operatorname{deg}(v)=0, which violates the condition deg(v)2\operatorname{deg}(v) \ge 2. If GG is a forest and every vertex has degree at least 2, this means no component can be K1K_1 (since deg(K1)=0\operatorname{deg}(K_1) = 0). Also, no component can be a tree with at least 2 vertices, because such a tree would have at least two leaves (vertices of degree 1), which contradicts the condition that every vertex has degree at least 2. **Step 3:** Conclude by contradiction. Since GG cannot be a forest if all vertices have degree at least 2, our initial assumption must be false. Therefore, GG must contain a cycle. **Conclusion:** Statement 3 is necessarily true. **Option 4: If m>(n1)(n2)2m > \frac{(n-1)(n-2)}{2}, then GG must be connected.** **Step 1:** Determine the maximum number of edges in a disconnected graph. A simple undirected graph on nn vertices is disconnected if and only if it can be partitioned into at least two non-empty sets of vertices such that there are no edges between these sets. The maximum number of edges a disconnected graph on nn vertices can have occurs when it consists of two complete components, one being Kn1K_{n-1} and the other being K1K_1 (an isolated vertex). **Step 2:** Calculate the number of edges for this maximum disconnected case. The number of edges in Kn1K_{n-1} is (n12)=(n1)(n2)2\binom{n-1}{2} = \frac{(n-1)(n-2)}{2}. The number of edges in K1K_1 is 00. So, the maximum number of edges in a disconnected graph on nn vertices is (n1)(n2)2\frac{(n-1)(n-2)}{2}. **Step 3:** Apply the condition. If GG has mm edges and m>(n1)(n2)2m > \frac{(n-1)(n-2)}{2}, then GG must have more edges than any disconnected graph on nn vertices can possibly have. Therefore, GG cannot be disconnected; it must be connected. **Conclusion:** Statement 4 is necessarily true. All four statements are necessarily true. Answer: All four statements are necessarily true.\boxed{\text{All four statements are necessarily true.}}
8 Single Choice
Consider a graph GG where the vertex set V(G)={(i,j)1i,j3}V(G) = \{ (i, j) \mid 1 \le i, j \le 3 \}. Two distinct vertices (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) are adjacent in GG if and only if max(x1x2,y1y2)=1\max(|x_1 - x_2|, |y_1 - y_2|) = 1. This graph is commonly known as the King's graph on a 3×33 \times 3 board. What is the chromatic number, χ(G)\chi(G), of this graph?
A
3
B
4
C
5
D
6
View Solution
**Step 1: Understand the graph structure and identify potential cliques.** The graph GG has 9 vertices, representing the squares of a 3×33 \times 3 chessboard. An edge exists between two squares if a king can move between them in a single move. Let the vertices be denoted by their coordinates (i,j)(i, j) where i,j{1,2,3}i, j \in \{1, 2, 3\}. First, let's identify the maximum clique size (ω(G)\omega(G)), as χ(G)ω(G)\chi(G) \ge \omega(G). Consider the central vertex v22v_{22}

Practice Features

📚 Topic-wise

Organized by chapters

⏱️ Timed Mode

Build exam speed

📝 Solutions

Detailed explanations

🔖 Bookmarks

Save for revision

Frequently Asked Questions

How many practice questions are available?

We have 1000+ practice questions across 60 chapters for GATE CS, all with detailed solutions.

Is the first chapter free?

Yes! The first chapter is completely FREE. Practice all questions with solutions to evaluate before upgrading.

What types of questions are included?

Practice includes MCQ (407), MSQ (193), and NAT (400) questions - same as the actual GATE exam format.

How long does it take to complete all chapters?

At ~2 minutes per question, completing all 1000+ questions takes approximately 34 hours of focused practice.

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