BCS303 · Discrete Structures & Theory of Logic · Unit 5
Graphs
Unit Scope & Exam Weightage: This unit covers Definition and terminology, Representation of graphs, Multigraphs, Bipartite graphs, Planar graphs, Isomorphism and Homeomorphism of graphs, Euler and Hamiltonian paths, Graph coloring, Combinatorics: Introduction, Counting Techniques and Pigeonhole Principle. The corpus records 14 PYQ clusters worth about 73 marks, the largest BCS303 unit. Handshaking, 3-regular graphs, pigeonhole proofs and planarity inequalities account for most 7-mark questions, while counting and representation supply reliable 2-mark marks.
Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)
| Priority | Topic (Exact Syllabus) | PYQs Asked | Marks Weightage | Tag |
|---|---|---|---|---|
| 1 | Pigeonhole Principle | 3 (2023-24, 2024-25, 2025-26) |
7m × 3 | Survival Mode Proof |
| 2 | Definition and terminology | 3 (2025-26 ×3) |
7m × 3 | Survival Mode Proof |
| 3 | Planar graphs | 2 (2023-24 ×2) |
7m + 7m | Diagram Proof |
| 4 | Counting Techniques | 2 (2024-25, 2025-26) |
2m + 2m | Numerical |
| 5 | Representation of graphs | 1 (2024-25) |
2m | Numerical |
| 6 | Euler and Hamiltonian paths | 2 (2023-24, 2025-26) |
2m + 2m | Diagram |
| 7 | Isomorphism and Homeomorphism of graphs | 1 (2024-25) |
7m | Comparison |
| 8 | Graph coloring | integrated in Definition & terminology PYQ | 7m (shared) | Supporting Concept |
| 9 | Bipartite graphs | integrated in Planar graphs PYQ | 7m (shared) | Supporting Concept |
| 10 | Multigraphs | 0 direct | — | Predicted |
| 11 | Combinatorics: Introduction | 0 direct | — | Predicted |
2-Hour Last-Night Survival Checklist:
- Handshake theorem (#2): . Possible degrees are , but degree 0 and degree cannot coexist, so people have at most distinct degree values — two must match.
- 3-regular and decomposition (#2): sum of degrees , hence is even; if a connected graph splits into two subgraphs with disjoint vertex sets, a crossing edge/path contradicts connectedness.
- Pigeonhole (#1): if objects go into boxes, some box has at least . Hence 13 people / 12 months → 2, and 37 homes / 6 colours → .
- Planarity (#3): : ; satisfies but violates the bipartite bound ; contains .
- Fast 2-marks (#4/#5/#6): 4 digits with repetition → ; DISCRETE → ; cycle adjacency rows ; subdividing an edge of gives a homeomorphic, non-isomorphic graph.
1. Definition and Terminology
Graph: consists of a finite non-empty vertex set and an edge set of unordered pairs (undirected graph) or ordered pairs (directed graph). The degree is the number of edges incident with (a loop counts twice).
1.1 Core Terms
| Term | Meaning |
|---|---|
| Adjacent vertices | joined by an edge |
| Incident edge | has the vertex as an endpoint |
| Degree / valency | number of incident edges |
| Regular graph | every vertex has the same degree |
| Complete graph | every pair of vertices is joined |
| Path | walk with no repeated vertices |
| Circuit / cycle | closed path with no repeated vertex except start = end |
| Connected graph | a path exists between every pair of vertices |
1.2 Handshaking Theorem
Every edge contributes exactly 1 to the degree of each of its two endpoints, so the degree sum counts every edge twice. Consequently the number of odd-degree vertices is always even.
Application — equal handshake counts: in a room of people, degrees lie in . A person with degree shook everyone's hand, so nobody can have degree 0; thus either 0 or is missing. At most different degree values are available for people, so two degrees coincide by the pigeonhole principle.
1.3 Regular Graphs and Decomposition
For a -regular graph on vertices, . A 3-regular graph therefore satisfies ; since is even and 3 is odd, must be even.
If a connected is decomposed into subgraphs whose vertex sets are disjoint, take . A – path must cross from to ; the crossing edge has an endpoint in each set and cannot belong wholly to either subgraph. This contradicts the decomposition covering , so must share a vertex.
Examiner Tip: Use the four-beat proof for graph statements: name the formula, apply the given degree condition, derive the parity/count, then state the conclusion. For decomposition, the crossing-edge contradiction is the scored sentence.
After-Topic PYQ (
2025-26— 7 Marks |Survival Mode): Show that in any room of people who have been doing handshaking there will always be at least two people who have shaken hands the same number of times.
After-Topic PYQ (
2025-26— 7 Marks |Survival Mode): Let be a 3‑regular graph with vertices. What is the sum of the degrees of the vertices? Show that in such a graph must be even.
After-Topic PYQ (
2025-26— 7 Marks |Survival Mode): Prove that if a connected graph is decomposed into two subgraphs and , there must be at least one vertex common between and .
After-Topic PYQ (
2024-25— 7 Marks): Express the following (i) Euler graph and Hamiltonian graph (ii) Chromatic number of a graph (iii) Walk and path (iv) Bipartite graph
2. Representation of Graphs
Adjacency matrix: for a simple graph with vertices , the matrix has when , else 0. For an undirected graph is symmetric and its diagonal is 0 (no loops).
2.1 Worked — Cycle on Four Vertices
For and :
Each row has two 1s because every vertex of the cycle has degree 2. Other representations are the adjacency list , , , and the incidence matrix (rows = vertices, columns = edges).
Examiner Tip: State the row/column order before writing the matrix. Check symmetry and row sums: for an undirected graph the matrix must be symmetric and each row sum must equal that vertex's degree.
After-Topic PYQ (
2024-25— 2 Marks): Illustrate the following graph using an adjacency matrix: A graph with vertices and edges .
3. Multigraphs Predicted
Multigraph: a graph in which more than one edge may join the same pair of vertices (parallel edges). A pseudograph additionally allows loops, edges from a vertex to itself.
| Graph type | Parallel edges? | Loops? | Degree effect |
|---|---|---|---|
| Simple graph | No | No | degree = number of neighbours |
| Multigraph | Yes | No | parallel edges each add 1 |
| Pseudograph | Yes | Yes | a loop adds 2 to the degree |
The adjacency matrix of a multigraph stores the number of parallel edges rather than just 0/1; the handshaking theorem still holds. This topic has no PYQ yet, so a short definition plus the loop-counting rule is enough for a predicted 2-mark answer.
Examiner Tip: For a predicted multigraph question, define parallel edges, state that a loop contributes 2 to degree, and verify on a tiny example with two parallel edges and one loop.
4. Bipartite Graphs
Bipartite graph: where and every edge has one endpoint in and one in . Equivalently, contains no odd cycle.
4.1 Complete vs Bipartite
| Feature | Complete graph | Complete bipartite graph |
|---|---|---|
| Edges | every pair of vertices | only across the two parts |
| Edge count | ||
| Degrees | for every vertex | in part 1, in part 2 |
| Triangles | present for | none |
| Example | has 10 edges | has 12 edges |
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
L1 --- R1
L1 --- R2
L1 --- R3
L1 --- R4
L2 --- R1
L2 --- R2
L2 --- R3
L2 --- R4
L3 --- R1
L3 --- R2
L3 --- R3
L3 --- R4
has , and contains as the subgraph induced by any three of the four right-hand vertices. Because is non-planar, is non-planar.
Examiner Tip: The comparison question wants one structural difference and one count: joins all pairs, joins only across parts; then use the subgraph for non-planarity.
5. Planar Graphs
Planar graph: a graph drawable in the plane with no edge crossings. A drawing without crossings divides the plane into regions (faces); Euler's formula for a connected planar graph is .
5.1 Necessary Inequalities
The first follows because every face has at least 3 edges, so with Euler's formula. In a bipartite planar graph there are no triangles, so every face has at least 4 edges and , giving the stronger second bound.
5.2 and
| Graph | Test | Verdict | ||
|---|---|---|---|---|
| 5 | 10 | non-planar | ||
| 6 | 9 | passes, but | non-planar | |
| 7 | 12 | contains ; also | non-planar |
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
A --- B
A --- C
A --- D
A --- E
B --- C
B --- D
B --- E
C --- D
C --- E
D --- E
The drawing is shown with all ten pairwise edges; any attempt to redraw it without crossings fails by the inequality above.
Examiner Tip: When a graph passes , do not declare it planar — that test is only necessary. For bipartite graphs use , and for cite the subgraph.
After-Topic PYQ (
2023-24— 7 Marks): Compare bipartite and complete graph with example. Draw and . Explain why these two graphs are not planar.
After-Topic PYQ (
2023-24— 7 Marks): Show that satisfies the inequality , but it is non‑planar. ( = number of vertices, = number of edges, = number of regions)
6. Isomorphism and Homeomorphism of Graphs
Isomorphic: if a bijection preserves adjacency. Necessary checks include equal , equal and the same degree sequence. Homeomorphic: two graphs become isomorphic after replacing edges by paths (subdivision) — i.e. one is obtained from the other by inserting degree-2 vertices on edges.
6.1 Worked — and Its Subdivided Edge
Let have vertices and edges . Insert a new vertex in the middle of , giving edges .
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
A --- S
S --- B
B --- C
C --- A
- Not isomorphic: has 3 vertices and 3 edges; the subdivided graph has 4 vertices and 4 edges. A bijection of vertex sets is impossible.
- Homeomorphic: the subdivided graph is obtained from by subdividing edge exactly once, which is the defining operation of homeomorphism. Both reduce to when degree-2 subdivision vertices are suppressed.
Examiner Tip: Give both verdicts explicitly: "not isomorphic" with the vertex-count invariant, and "homeomorphic" with the subdivision construction. Writing only one of the two loses half the marks.
After-Topic PYQ (
2024-25— 7 Marks): Examine whether the graphs and a graph formed by adding a single vertex in the middle of one edge of are homeomorphic or not.
7. Euler and Hamiltonian Paths
Euler path/circuit: a trail using every edge exactly once; if it starts and ends at the same vertex it is an Euler circuit. Hamiltonian path/circuit: a path/cycle visiting every vertex exactly once.
7.1 Conditions
| Concept | Condition |
|---|---|
| Euler circuit | connected and every vertex has even degree |
| Euler path (not circuit) | connected and exactly two vertices have odd degree |
| Hamiltonian circuit | no simple necessary-and-sufficient condition; Dirac: $\deg(v)\ge |
7.2 Path Graph
%%{init: {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'fontFamily': "'Nunito', sans-serif", 'fontSize': '17px', 'primaryColor': '#EFEAD6', 'primaryBorderColor': '#0F766E', 'lineColor': '#23211C'}}}%%
flowchart LR
A --- B
B --- C
C --- D
The sequence is a Hamiltonian path because it visits every vertex once. It has no Hamiltonian circuit: the endpoints have degree 1, so any cycle returning to would have to reuse edge .
Examiner Tip: Contrast edge-coverage (Euler) with vertex-coverage (Hamiltonian). For "path but no circuit", a simple path is the cleanest drawing: degree-1 endpoints make a cycle impossible.
After-Topic PYQ (
2025-26— 2 Marks): Draw a graph that has a Hamiltonian path but does not have a Hamiltonian circuit.
After-Topic PYQ (
2023-24— 2 Marks): Compare Euler circuit and Hamiltonian circuit.
8. Graph Coloring
Proper vertex coloring: assigning colors to vertices so adjacent vertices receive different colors. The chromatic number is the minimum number of colors needed.
| Graph | Reason | |
|---|---|---|
| Bipartite graph with at least one edge | 2 | color the two parts differently |
| Cycle | 2 if even, 3 if odd | odd cycles need a third color |
| Complete graph | every pair is adjacent | |
| Empty graph on vertices | 1 | no edges to conflict |
A greedy algorithm using at most colors always works: color vertices one by one, avoiding the colors of already-colored neighbours. The 37-homes/6-colours question in Section 11 is a pigeonhole count, not a proper-coloring constraint.
Examiner Tip: Define proper coloring, give with one example each for bipartite, odd cycle and complete graph, and mention the bound. That is a complete predicted answer.
9. Combinatorics: Introduction Predicted
Combinatorics: the mathematics of counting discrete arrangements. The two basic rules are the product rule (independent stages multiply) and the sum rule (mutually exclusive cases add).
counts ordered selections (permutations); counts unordered selections (combinations). Repetition allowed means each position independently has all choices, giving .
This topic has no direct PYQ. A predicted question should state product/sum rules and solve one small arrangement, such as forming 3-letter codes from 5 distinct letters: without repetition and with repetition.
Examiner Tip: Before computing, decide whether order matters and whether repetition is allowed. Write that sentence; it earns the reasoning mark even if the arithmetic is small.
10. Counting Techniques
Repeated-letter arrangement: for a multiset of objects with identical of each kind, the number of distinct arrangements is .
10.1 Worked — Four-Digit Numbers
Digits , repetition allowed, four positions: each position has 4 independent choices. Hence numbers. No leading-zero adjustment is needed because 0 is not among the digits.
10.2 Worked — Arranging DISCRETE
DISCRETE has 8 letters: D,I,S,C,R,E,T,E. Only E repeats, twice. Distinct arrangements .
Examiner Tip: For repetition-allowed digits write , not . For repeated-letter words, divide by the factorial of each multiplicity — here just for the two E's.
After-Topic PYQ (
2025-26— 2 Marks): How many 4‑digit numbers can be formed by using the digits 2, 4, 6, 8 when the repetition of digits is allowed?
After-Topic PYQ (
2024-25— 2 Marks): Solve in how many ways can you arrange the letters in the word "DISCRETE"?
11. Pigeonhole Principle
Pigeonhole principle: if objects are placed into boxes and , some box contains at least two objects. Generalized form: some box contains at least objects.
11.1 Proof of the Generalized Form
Suppose every box held at most objects. Then the total would be at most , a contradiction. Hence some box holds at least objects.
11.2 Applications
- 13 people, 12 months: , so at least two people share a birth month.
- 37 homes, 6 colours: homes share a colour.
- Handshake degrees: people but at most usable degree values (0 and cannot both occur), so two people have equal handshake counts.
Examiner Tip: Identify pigeons and holes in the first line of every solution: people→months, homes→colours, people→possible degree values. Then cite or as the final step.
After-Topic PYQ (
2024-25— 7 Marks): Prove that in any group of 13 people, at least two must have their birthdays in the same month.
After-Topic PYQ (
2023-24— 7 Marks): Explain the Pigeonhole principle. Describe its generalized form. If 6 colors are to paint 37 homes, show that at least 7 of them will be of the same color.
Solved Exam-Ready Questions
Solved Q1 (2025-26 — 7 Marks | Survival Mode)
Q: Show that in any room of people who have been doing handshaking there will always be at least two people who have shaken hands the same number of times.
Solution:
- Let there be people; represent them by vertices and handshakes by edges.
- A person's handshake count is a degree in — at most candidate values.
- Degrees 0 and cannot both occur: if someone shook every other person's hand, nobody can have shaken 0 hands.
- Therefore the actual degree values lie in either or — at most distinct values.
- The people are pigeons and the at-most degree values are holes.
- Since , the pigeonhole principle forces two people into the same degree value.
- Conclusion: at least two people have shaken hands the same number of times.
Solved Q2 (2025-26 — 7 Marks | Survival Mode)
Q: Let be a 3‑regular graph with vertices. What is the sum of the degrees of the vertices? Show that in such a graph must be even.
Solution:
- Every vertex has degree 3, so .
- By the handshaking theorem, , where is the number of edges.
- Hence .
- The right side is even, so is even.
- Since 3 is odd, must be even.
- Equivalently must be an integer, which again requires even .
- Conclusion: degree sum is , and must be even.
Solved Q3 (2025-26 — 7 Marks | Survival Mode)
Q: Prove that if a connected graph is decomposed into two subgraphs and , there must be at least one vertex common between and .
Solution:
- Assume for contradiction that .
- Pick and . Since is connected, some path exists.
- Along this path there is a first index with ; the edge leaves .
- That edge cannot belong to , because .
- It cannot belong to either, because under the disjointness assumption.
- Hence the edge is in but in neither subgraph, contradicting that decompose .
- Conclusion: the assumption is false; and share at least one vertex.
Solved Q4 (2024-25 — 7 Marks)
Q: Express the following (i) Euler graph and Hamiltonian graph (ii) Chromatic number of a graph (iii) Walk and path (iv) Bipartite graph
Solution:
- Euler graph: a connected graph with a closed trail that uses every edge exactly once; equivalently every vertex has even degree. Example: .
- Hamiltonian graph: a graph with a cycle that visits every vertex exactly once. Example: . is both Eulerian and Hamiltonian.
- Chromatic number : the minimum number of colours needed so adjacent vertices get different colours; , , .
- Walk: an alternating sequence of vertices and edges. Path: a walk with no repeated vertex.
- Bipartite graph: with and every edge joining to ; equivalently no odd cycle. Example: .
- Contrast: Euler concerns edges, Hamiltonian concerns vertices, colouring concerns conflicts, bipartiteness concerns vertex partition.
- Conclusion: these four notions are independent; a graph may have any combination of them.
Solved Q5 (2024-25 — 7 Marks)
Q: Prove that in any group of 13 people, at least two must have their birthdays in the same month.
Solution:
- Treat the 13 people as objects (pigeons).
- Treat the 12 calendar months as boxes (holes).
- .
- If each month contained at most one birthday, the total would be at most 12 people.
- But there are 13 people, so at least one month contains two or more birthdays.
- This is exactly the pigeonhole principle.
- Conclusion: at least two people share a birth month.
Solved Q6 (2023-24 — 7 Marks)
Q: Explain the Pigeonhole principle. Describe its generalized form. If 6 colors are to paint 37 homes, show that at least 7 of them will be of the same color.
Solution:
- Basic principle: if objects are placed into boxes, some box contains at least 2 objects.
- Generalized form: some box contains at least objects.
- Proof: if every box had at most objects, the total would be at most , impossible.
- Here homes and colours.
- .
- Therefore at least one colour is used on at least 7 homes.
- Conclusion: the generalized pigeonhole principle guarantees 7 same-coloured homes.
Solved Q7 (2023-24 — 7 Marks)
Q: Compare bipartite and complete graph with example. Draw and . Explain why these two graphs are not planar.
Solution:
- Complete graph : every two vertices are joined; has vertices and edges.
- Complete bipartite : vertices split into parts of sizes 3 and 4; every left vertex joins every right vertex, no edges inside a part; .
- Drawings: use the two Mermaid sketches in Sections 4 and 5 — has rows L1–L3 and columns R1–R4; joins all five vertices pairwise.
- test: a simple planar graph with satisfies . Here , so is non-planar.
- test: it contains by taking any three of the four right vertices; since is non-planar, any graph containing it is non-planar. Additionally, bipartite planarity requires , but .
- Conclusion: both graphs fail the necessary planarity tests, hence cannot be drawn without crossings.
Solved Q8 (2023-24 — 7 Marks)
Q: Show that satisfies the inequality , but it is non‑planar. ( = number of vertices, = number of edges, = number of regions)
Solution:
- is bipartite with and .
- , and ; the general planar inequality is satisfied.
- Therefore is only a necessary condition, not sufficient.
- is bipartite, so it has no triangles. In any planar bipartite embedding every face has at least 4 boundary edges, so , i.e. .
- Euler's formula gives . Substituting : , so .
- For : , but , contradiction.
- Conclusion: passes the weak test yet is non‑planar; the bipartite bound proves it.
Solved Q9 (2024-25 — 7 Marks)
Q: Examine whether the graphs and a graph formed by adding a single vertex in the middle of one edge of are homeomorphic or not.
Solution:
- has vertices and edges ; , .
- Inserting into edge gives edges ; , .
- Isomorphism test: isomorphic graphs need the same number of vertices; , so they are not isomorphic.
- Homeomorphism test: the second graph is obtained from the first by subdividing one edge once.
- Suppressing the degree-2 vertex merges back into , recovering .
- Graphs related by edge subdivision are homeomorphic by definition.
- Conclusion: the graphs are homeomorphic but not isomorphic.
Solved Q10 (2025-26 — 2 Marks)
Q: How many 4‑digit numbers can be formed by using the digits 2, 4, 6, 8 when the repetition of digits is allowed?
Solution: Four positions, each with 4 independent digit choices because repetition is allowed: . There is no leading-zero restriction since 0 is not among the given digits.
Solved Q11 (2025-26 — 2 Marks)
Q: Draw a graph that has a Hamiltonian path but does not have a Hamiltonian circuit.
Solution: Take the path graph : . The sequence visits every vertex exactly once, so a Hamiltonian path exists. Vertices and have degree 1; any circuit through would need to enter and leave using the same edge , which is not allowed. Hence no Hamiltonian circuit exists.
Solved Q12 (2024-25 — 2 Marks)
Q: Solve in how many ways can you arrange the letters in the word "DISCRETE"?
Solution: DISCRETE has 8 letters, with E occurring twice and all other letters distinct. The number of distinct arrangements is .
Solved Q13 (2023-24 — 2 Marks)
Q: Compare Euler circuit and Hamiltonian circuit.
Solution: An Euler circuit traverses every edge exactly once and returns to the start; it exists iff the graph is connected and every vertex has even degree. A Hamiltonian circuit visits every vertex exactly once and returns to the start; no comparable simple criterion exists (Dirac's is sufficient only). Example: has both; the path has neither circuit.
Solved Q14 (2024-25 — 2 Marks)
Q: Illustrate the following graph using an adjacency matrix: A graph with vertices and edges .
Solution: With rows and columns ordered , place 1 where an edge joins the pair and 0 otherwise:
The matrix is symmetric and every row sums to 2, matching the degree of each vertex in the 4-cycle.
Practice Questions (Self-Test)
- (2 Marks) State the handshaking theorem and one consequence about odd-degree vertices.
- (7 Marks) Prove that a simple graph with vertices cannot have two vertices of degrees 0 and simultaneously.
- (7 Marks) For a 4-regular graph with 18 vertices, find the number of edges.
- (7 Marks) Prove that a connected graph decomposed into three subgraphs must have at least two subgraphs sharing a vertex.
- (2 Marks) Write the adjacency matrix of the complete graph .
- (7 Marks) Draw and state its degree sequence and edge count.
- (7 Marks) Use Euler's formula to prove for simple bipartite planar graphs.
- (7 Marks) Show that is not planar even though .
- (7 Marks) Give an example of two graphs that are homeomorphic but not isomorphic, and justify both parts.
- (7 Marks) In how many ways can the letters of SUCCESS be arranged? State whether any pair of these graphs has the same chromatic number as .