Pset 10
Pset 10
jc09631
Problems
In the following problem set assume all the graphs are simple and finite unless specified otherwise.
1. In parkour civilization everything is parkour. For some positive integer m there are at most
2m + 1 houses at the parkour pro level of parkour civilization. From each house you can
parkour to exactly m other houses. Every parkour pro is sleeping inside a house. Tung Tung
Tung Sahur wants to wake up all the parkour pros. For this he wishes to parkour to each of
the houses in parkour civilization. By the help of Agent 5.5 he can teleport to any one house
of his choice by then from there he would have to parkour to every other house he wishes to
visit. Can Tung Tung Tung Sahur visit every house and wake up every parkour pro? Give
a formal proof for your answer.
1
CS/MATH 113 2025 Pset 10: Graph jc09631
Solution:
Model the parkour civilization by an undirected graph G = (V, E) where |V | = n ≤
2m + 1 and each vertex has degree
Since C is its own component, no edges leave C, so each vertex in C has all m neighbors
inside C. But a graph on s vertices can have degree at most s − 1. Hence,
m≤s−1 =⇒ s ≥ m + 1,
2. In this problem we will prove/disprove some basic results regarding existence of cycles and
paths in a graph.
(a) Prove or disprove that a forest with n vertices and m components will always have n−m
edges.
Solution: Show that a forest with n vertices and m components always contains
exactly n − m edges.
[title=Solution] A forest is a collection of disjoint trees. Suppose the components
have sizes n1 , n2 , . . . , nm with n1 + n2 + · · · + nm = n. Each tree with ni vertices
has ni − 1 edges, so the total number of edges is:
m
X
(ni − 1) = (n1 + · · · + nm ) − m = n − m.
i=1
(b) Prove or disprove that every n-vertex graph with at least n edges contains a cycle.
Solution: From part (a), a forest with n vertices has at most n − 1 edges. Thus,
any graph with n or more edges cannot be acyclic — it must contain at least one
cycle.
(c) Prove that every graph G contains a path of length atleast δ(G) where δ(G) represented
the smallest degree of a vertex in G.
Solution:
[title=Solution] Let v0 v1 · · · vk be a longest simple path in G. Because the path is
maximal, all neighbors of v0 must lie within the set {v1 , . . . , vk } — otherwise, the
path could be extended.
Page 2 of 5
CS/MATH 113 2025 Pset 10: Graph jc09631
So,
deg(v0 ) ≤ k.
Since deg(v0 ) ≥ δ(G), it follows that k ≥ δ(G). Thus, the graph has a path of
length at least δ(G).
(d) Prove that every graph G with δ(G) ≥ 2 contains a cycle of length at least δ(G) + 1,
where δ(G) represented the smallest degree of a vertex in G.
Solution: Let G = (V, E) be a finite graph where every vertex has degree 2. Then
the sum of degrees is: X
deg(v) = 2|V |.
v∈V
However, any forest (acyclic graph) on |V | vertices can have at most |V | − 1 edges.
So G cannot be acyclic — it must contain at least one cycle.
3. In this problem we will see how a lot of our theorems and intuition breaks when it comes to
infinite graph. An infinite graph is a graph where the set the vertices is an infinite set.
(a) Show that if G is a finite graph such that every vertex of G has a degree of 2 then G
contains a cycle.
Solution: Let G = (V, E) be a finite graph where every vertex has degree 2. Then
the sum of degrees is: X
deg(v) = 2|V |.
v∈V
However, any forest (acyclic graph) on |V | vertices can have at most |V | − 1 edges.
So G cannot be acyclic — it must contain at least one cycle.
Each vertex has degree 2, yet there are no cycles — any path continues infinitely
in both directions. Thus, while the graph is 2-regular (each vertex has degree 2),
Page 3 of 5
CS/MATH 113 2025 Pset 10: Graph jc09631
(c) Construct an infinite graph G such that every vertex of G has a degree of 2 and G
contains a cycle.
V = {ak , bk , ck | k ∈ Z}.
4. With some stroke of luck you finally were able to take some time out of your Habib schedule
and manage to make it to an Eid dawat. There were n people at the dawat no two people
are of the same age. After 4 years of missing every event due to some assignment being
due, you were shocked to see people giving each other Eidi. But sadly discrete maths made
a permanent damage to your brain, instead of enjoying the event you were wondering how
many times Eidi was given. You notices that every one gave Eidi to everyone who is younger
than them but didn’t gave it to anyone older than them. How many times Eidi was given?
Find a closed form formula in terms of n and given a formal proof for your answer.
In this ordering:
Page 4 of 5
CS/MATH 113 2025 Pset 10: Graph jc09631
n
Conclusion: A total of Eidi-givings occurred.
2
5. The gates of the digital world are open. You are part of the DigiDestined who entered the
digital world. As soon as you and the other DigiDestined enters the digital world you are all
greeted with a bunch rookie digimons. Following the path of all the previous DigiDestines
you will all partner up with one of those digimons and fight the forces of evil to save the
digital world and the real world. But the tricky part is partnering with the digimons. Talking
with the DigiDestines and the digimons you find out that every DigiDestined likes exactly n
digimons, and every digimon likes exactly n DigiDestines, for some positive integer n. Can
you pair every DigiDestined with a digimon such that everyone either gets a digimon they
like or a digimon that likes them (no two people gets the same digimon)? Give a formal
proof for your answer.
digimonadventure.png
Page 5 of 5