assignment
assignment
1. Draw the following graphs and determine how many edges each has. (2 X 4)
(a) K4
(b) K3,2
(c) K1,5
(d) Km,n (where, m and n are positive integers)
2. If a graph has five vertices of degree 4 and four vertices of degree 3, how many edges does
it have?
3. Draw the following graphs, or explain they cannot exist. (2 X 2)
(a) A graph with an isolated vertex and a universal vertex.
(b) A cubic graph of order 5.
4. What is the maximum number of vertices on a graph that has 35 edges and every vertex
has degree 3?
5. What does it mean for two graphs to be isomorphic?
6. Define a walk in a graph.
7. Differentiate between a trail and a path in a graph.
8. What is the key characteristic of a trail in a graph?
9. Can a path contain repeated vertices? Justify your answer.
10. Give an example of a situation where a walk is not a path.
11. What is the union of two graphs?
12. Define the Cartesian product of two graphs.
13. What happens when you take the complement of a complete graph?
14. Explain the difference between graph union and graph intersection.
15. Define a cut vertex in a graph.
16. What is a cut edge in a graph?
17. How does removing a cut vertex affect a connected graph?
18. Give an example of a graph with at least one cut vertex.
19. Explain the impact of removing a cut edge from a connected graph.
20. Differentiate between a cut vertex and a cut edge.
21. Define connectivity in a graph.
22. What is the difference between vertex connectivity and edge connectivity?
23. What is the minimum number of edges needed to make a disconnected graph connected?
24. What are the real-world applications of Dijkstra’s algorithm?
25. What is the Floyd-Warshall algorithm used for?
26. What is the time complexity of the Floyd-Warshall algorithm?
27. Does the Floyd-Warshall algorithm work with negative edge weights?
28. How does the Floyd-Warshall algorithm differ from Dijkstra’s algorithm?
29. What is the significance of the adjacency matrix in the Floyd-Warshall algorithm?
MODULE 1 (5 marks):
1. A graph has 26 vertices and 58 edges. There are five vertices of degree 4, six vertices of
degree 5, and seven vertices of degree 6. If the remaining vertices all have the same degree,
what is this degree?
2. A graph has 24 vertices and 30 edges. It has five vertices of degree 4, seven pendant
vertices, and seven vertices of degree 2. All other vertices have degree 3 or 4. How many
vertices of degree 4 are there?
3. Use graph theory to explain why at any party an even number of people speak to an odd
number of people.
4. Can there exist a graph on 13 vertices and 31 edges, with three vertices of degree 1, and
seven vertices of degree 4? Explain.
5. If a graph G has 15 edges and all vertices of the same degree d, what are the possible
values of d? Describe briefly each graph.
6. Given the following degree sequences either construct a graph with such a degree
sequence, or explain why this would be impossible. (5 X 3)
(a) 1; 1; 1; 1; 1; 1
(b) 5; 4; 3; 2; 1
(c) 6; 6; 4; 2; 2; 2; 2; 1
8. Suppose all vertices in a graph, G, have an odd degree, k. Prove k divides E(G).
9. Does there exist a graph where the degree of each vertex is even? Explain.
10. Prove that it is impossible for every vertex of a graph to have a different degree.
13. Determine if each statement is true or false. If true, provide a brief proof. If false, find a
counterexample: (5 X 2)
2. Using graph theory, explain whether or not it is possible for each person, in a group of 15
individuals, to have exactly three friends. (Assume that friendship is a symmetric relation, i.e.
friendship goes both ways.)
3. Prove that if G is a graph with n vertices and n edges with no vertices of degree 0 or 1, then
the degree of every vertex is 2.
4. If G1 and G2 are isomorphic graphs then they have the same number of vertices, the same
number of edges, and the same degree sequence. What is the converse of this statement, and
is it true or false? If true, prove it. If false, find a counterexample. `
5. Show that every graph is isomorphic to the subgraph of some complete graph. What is a
necessary lower bound for the order of these complete graphs?
6. Prove that if two graphs are isomorphic, they must contain the same number of triangles.
7. Let the vertex set of a graph be the set of binary strings of length three. Edges occur
between vertices whose binary strings differ by exactly one digit. Show that this graph is
isomorphic to the graph formed by the corners and edges of a cube.
8. Explain Dijkstra’s Shortest Path Algorithm with an example. Discuss its time complexity.
10. Derive the recurrence relation used in the Floyd-Warshall algorithm and explain how it
ensures the shortest path calculation.
11.
12.
13.
14.
15.
(10+10+10)
16. Use Floyd-Warshall algorithm to calculate the shortest path between any two vertices of
the following graph:
17. Use Floyd-Warshall algorithm to calculate the shortest path between any two vertices of
the following graph:
MODULE 2 (2 marks):
14. Show that every connected graph has at least one spanning tree.
15. What happens to a spanning tree if one of its edges is removed?
16. What is the difference between a spanning tree and a minimum spanning tree?
17. Define the weight of a spanning tree in a weighted graph.
18. Explain why a minimum spanning tree of a graph is unique if all edge weights are
distinct.
19. Give an example where a graph has multiple minimum spanning trees.
20. Show that the minimum spanning tree of a connected graph is always a subgraph of
the graph.
MODULE 2 (5 marks):
1. Prove that a connected graph is a tree if and only if it has exactly one spanning tree.
2. Show that a tree with n vertices has exactly n - 1 edges using induction.
3. Prove that removing any edge from a tree makes it disconnected.
4. Show that adding an edge to a tree creates exactly one cycle.
5. Prove that a tree with maximum degree Δ has at least Δ leaves.
6. Prove that a full binary tree with n internal nodes has exactly 2n+1 total nodes.
7. Show that the number of leaves in a full binary tree is one more than the number of
internal nodes.
8. Prove that the height h of a perfect binary tree with n nodes is h=(n+ 1)−1.
9. Show that the number of nodes in a complete binary tree is at most 2h +1−1, where h is
the height.
10. Prove that a binary tree with n leaves has at least n height.
11. Prove that every connected graph has at least one spanning tree.
12. Show that a complete graph K n has exactly n n−2 spanning trees.
13. Prove that the number of spanning trees of a cycle graph C nis exactly n.
14. Show that a spanning tree of a connected graph always has n - 1 edges, where n is the
number of vertices.
15. Prove that any connected graph with n vertices and mmm edges has at least m−n+1
cycles.
25. True or false: The subgraph of a tree is always a tree. Justify your answer. (5)
26. A tree has 100 leaves, 20 vertices of degree 6, and half of the remaining vertices have
degree 4. The leftover vertices are degree 2, how many vertices are of degree 2?
27. A tree, T, with 35 vertices has 25 leaves, two vertices of degree 2, three vertices of
degree 4, two vertices of degree 6 and three vertices of degree x. Solve for x.
28. Prove, by induction, that if a connected graph has n vertices and n-1 edges, then it is
a tree.
29. Let T be a tree. Suppose deg(v) belongs to {1,5} for all vertices of T. If T has 25
vertices of degree 5, how many vertices does T have?
30. Explain why any tree with two vertices of degree 3 has at least four leaves.
31. Determine a formula for the number of edges in a forest with order n and c
components.
32. Find a graph with five vertices and four edges that is not a tree. What specific
property of a tree fails?
33. Construct a tree with the following properties or explain why such a tree cannot exist.
(a) 10 vertices and the sum of degrees of vertices is 24. (5 X 4)
(b) 12 vertices and 15 edges.
(c) 8 vertices and 7 edges.
(d) 4 vertices and the sum of degrees of vertices is 3.
MODULE 2 (10 marks):
1. Let T be a tree with 21 vertices such that deg(v) belongs to {1, 3, 5, 6} for every
vertex of T. If T has 15 leaves and one vertex of degree 6, how many vertices with
degree 5 are in T?
2. Prove that the deletion of any edge of a tree result in a disconnected graph. What can
we say about the components of this new graph?
4. Describe Kruskal’s algorithm for finding a Minimum Spanning Tree (MST) with a
step-by-step example.
5. Explain Prim’s algorithm for finding a Minimum Spanning Tree (MST) with an
example.
7.
Prove that a connected graph with n vertices must have at least n1 edges to be a spanning tree.
8.
9. Use Prim’s algorithm to derive the minimum spanning tree of the following graph:
10. Use Prim’s algorithm to derive the minimum spanning tree of the following graph:
11. Use Prim’s algorithm to derive the minimum spanning tree of the following graph:
12. Use Kruskal’s algorithm to derive the minimum spanning tree of the following graph:
13. Use Kruskal’s algorithm to derive the minimum spanning tree of the following graph:
14. Use Kruskal’s algorithm to derive the minimum spanning tree of the following graph:
15. Use Kruskal’s algorithm to derive the minimum spanning tree of the following graph:
16. Use Dijkstra’s algorithm to derive the shortest path between any two vertices of the
following graph ( A is the starting vertex):
17. Use Dijkstra’s algorithm to derive the shortest path between any two vertices of the
following graph (s is the starting vertex):
MODULE 3 (2 marks):
1. State the relationship between the chromatic number and the maximum degree of a
graph.
2. Define the chromatic polynomial of a graph.
3. State Hall’s Marriage Theorem.
4. Define a perfect matching in a bipartite graph with an example.
5. What is the condition for a bipartite graph to have a perfect matching?
7. Define vertex coloring and give an example.
8. What is the significance of the chromatic number in a graph?
9. Give an example of a graph with chromatic number 2.
10. Explain the relationship between the chromatic number and the size of the largest
clique in a graph.
11. What is the chromatic number of a complete graph Kn?
12. Explain why the greedy coloring algorithm does not always give the optimal coloring.
13. What is the worst-case time complexity of the greedy coloring algorithm?
14. Define a chordal graph with an example.
15. State one property of a chordal graph related to coloring.
16. What is the maximum chromatic number of a chordal graph in terms of its maximum
clique size?
17. State Brook’s Theorem.
18. Give an example of a graph where Brook’s Theorem does not hold.
19. Define edge coloring in a graph.
20. What is Vizing’s Theorem?
MODULE 3 (5 marks):
1. Prove that the chromatic number of a cycle graph Cn is 2 if n is even and 3 if n is odd.
2. Show that any tree with at least two vertices has a chromatic number of at most 2.
3. Prove that every k-regular bipartite graph has a perfect matching.
4. Show that a bipartite graph with a perfect matching must have an even number of
vertices.
5. Consider a bipartite graph with partite sets U and V such that ∣U∣=∣V∣. Show that if
every vertex has a degree at least ∣U∣/2, then the graph has a perfect matching.
6. Show that if a graph G contains a subgraph H, then χ(H)≤χ(G).
8. Show that for any graph G, the inequality ω(G)≤χ(G) holds, where ω(G) is the clique
number.
9. Construct a graph with chromatic number 4 that does not contain a clique of size 4.
10. Give an example of a graph where the greedy coloring algorithm gives a suboptimal
coloring.
11. Prove that the greedy algorithm never requires more than Δ(G)+1 colors, where Δ(G)
is the maximum degree of G.
12. Prove that every chordal graph has a perfect elimination ordering.
13. Show that the chromatic number of a chordal graph equals the size of its largest
clique.
14. Prove that if G is a connected graph that is neither a complete graph nor an odd cycle,
then χ(G)≤Δ(G).
15. Construct a graph where the bound given by Brook’s theorem is tight.
16. Prove that every bipartite graph satisfies χ′(G)=Δ(G), where χ′(G) is the edge
chromatic number.
17. Show that any simple graph satisfies Δ(G)≤χ′(G)≤Δ(G)+1.
18. Give an example of a graph where χ′(G)=Δ(G)+1.
19. Prove that the chromatic index of a complete graph Kn is ⌈n/2⌉ when n is odd.
20. Show that if a graph has a Eulerian circuit, then it has an edge coloring with at most
Δ(G) colors.
4. Find the chromatic polynomial of a wheel graph W 4(a cycle C_4 with an extra central
vertex connected to all others).
8.
9.
10.
11.
12.
MODULE 4 (2 marks):
1. Prove that a connected planar graph with n vertices and m edges satisfies m≤3n−6.
2. Show that a simple graph with more than 4n−8 edges cannot be planar.
3. Prove that any planar graph must contain a vertex of degree at most 5.
4. Show that a connected planar graph with n vertices, m edges, and f faces satisfies
n−m+f=2.
5. Prove that every planar bipartite graph satisfies m≤2n−4.
6. A planar graph has 10 vertices and 20 edges. Prove that it must contain at least one
cycle.
9. Suppose a graph G is planar. Show that if we remove any edge, the remaining graph
must also be planar.
10. Show that a planar graph with no triangular faces has an average degree of at most 4.
15. Prove that the sum of all in-degrees in a directed graph equals the sum of all out-
degrees.
16. Show that any tournament graph has at least one Hamiltonian path.
17. Prove that a strongly connected directed graph has a Eulerian circuit if and only if
every vertex has equal in-degree and out-degree.
18. Show that in any tournament graph, there is a vertex that can reach every other vertex.
19. Prove that every tournament graph with an odd number of vertices has a Hamiltonian
cycle.
20. Let G be a directed graph where every vertex has an out-degree of at least n/2. Show
that G contains a Hamiltonian path.
MODULE 4 (10 MARKS)
1.
2.
(10 + 10)
3. Prove that a directed graph is Eulerian if and only if it is strongly connected and every
vertex has equal in-degree and out-degree.
4. Given a directed graph with 10 vertices and 16 edges, explain how to determine
whether it contains a Eulerian circuit.
5. Prove that every tournament with more than two vertices contains a Hamiltonian path.
6. Define a tournament and prove that every tournament has at least one Hamiltonian
path.
7. Show that in every strongly connected tournament, there exists a Hamiltonian cycle.
8. Construct a tournament with 6 vertices and determine whether it contains a
Hamiltonian cycle.
Module 1:
(1) 5 marks
(2) 10 marks
(3)
(4) 5 marks
(2 + 2 + 2)
(5)
(2+2+2+2)
Module 2:
(1)
5 marks
(2)
5 marks
Module 3:
(1)
5 marks
(2)
5 marks
(3) (10+ 10)
(4)
(10+ 10)
Module 4:
(1) (5+5)
(2)
10 marks