Homework 6
Homework 6
1 Chapter 10
1.1 Connectivity
2
a) a,b,e,c,d
This path is simple because there isn’t any vertex repeated.
This path isn’t circuits because it start and end in different vertex.
The lengths of the path is 4
b) a,d,a,d,a
This path is not simple because there is vertex repeated.
This path is circuits because it start and end in the same vertex.
The lengths of the path is 4.
c) a,d,b,e,a
This is not a path.
d) a,b,e,c,b,d,a
This is not a path.
6
Graph 3 has 3 connected components.
Graph 4 has 1 connected components.
Graph 5 has 2 connected components.
16
Given that u and v are mutually reachable, it mean that there exists a directed
path from u to v, and there are also exists a directed path from v to u. Simu-
liarly, given that v and w are mutually reachable, there exists a direct path from
v to w.
By start at u, follow the path to v
Then from v, follow the path to w
Therefore, u and w are mutuallt reachable.
19
a) n=2
Since K4 is complete graph, every pair of vertices is connected by an edge.
Number of paths of lengths 2=Number of pairs of vertices = C24 = 6
b) n=3
Since K4 is complete any triplet of distinct vertices forms of length 3
1
Number of paths of lengths 3 = Number of triples of vertices = C34 = 4
c) n=4 Since K4 has only 4 vertices, and we are considering paths between two
different vertices, it’s impossible to have a path of length 4 between two different
vertices in K4 . Therefore, the number of paths of length 4 is 0.
d) n=5
Similar to n=4. It’s impossible to have a path of length 5 between two different
vertices, as there only 4 vertices in K4 . Therefore, the number of paths if length
5 is 0.
28
To show that every connected graph with n ertices has at least n-1 edges, we
can use proof by induction on the number of vertices.
Base case: For n=1, the graph consists of a single vertex, which is trivially
connected. Since there are no edges, the statement holds true, as n-1 = 1-1 =0.
Inductive Hypothesis: Assume that every connected graph with k vertices (k ≥
1) has at least k - 1 edges.
Inductive Step: Now, consider a connected graph G with k+1 vertices.
Since G is connected, there exists a spanning tree within G.A spanning tree of
G is a tree that spans all vertices of G,meaning it connects every vertex without
forming any cycles.
A tree with k+1 vertices has k edges.Removing any edge from the spanning tree
would disconnect the tree, leaving two separate components. Adding back any
edge to connect those components would form a cycle. Thus, adding an edge to
a tree creates exactly one cycle.
Since G has k+1 vertices and we can add one edge to form a cycle from the
spanning tree, the total number of edges required to maintain connectivity is
k-1+1=k.
Therefore, every connected graph with k+1 vertices has at least k edges.
By the principle of mathematical induction, the statement holds true for al n ≥
1. Hence, every connected graph with n vertices has at least n-1 edges.
30
In every simple graph, we can demonstrate that there exists a path from every
vertex of odd degree to some other vertex of odd degree. Let’s prove this
statement:
Definition: A simple graph is an undirected graph with no loops (edges con-
necting a vertex to itself) and no multiple edges (more than one edge connecting
the same pair of vertices). The degree of a vertex is the number of edges incident
to it. Claim: In any simple graph, the number of vertices with odd degree is
always even. Proof: Consider the sum of degrees of all vertices in the graph. By
the Handshaking Lemma, this sum is equal to twice the number of edges (since
each edge contributes to the degree of two vertices). If we denote the number
of vertices with odd degree as (k), then the sum of degrees is (2k + 2m), where
(m) is the number of vertices with even degree. Since the sum of degrees is even
(twice the number of edges), (2k + 2m) must be even. This implies that (k +
m) is even, which means that (k) (the number of vertices with odd degree) is
also even. Conclusion: Since the number of vertices with odd degree is even,
2
there must be at least one vertex of odd degree in each connected component
of the graph. Therefore, for every vertex of odd degree, there exists a path to
another vertex of odd degree. In summary, in every simple graph, there is a
path from every vertex of odd degree to some other vertex of odd degree.
3
but not an Euler circuit if and only if the graph is weakly connected, and the
in-degree and out-degree of each vertex are equal for all but two vertices. These
two exceptional vertices have specific properties:
One vertex has an in-degree one larger than its out-degree. The other vertex
has an out-degree one larger than its in-degree. Let’s explore this in more detail:
Euler Path and Euler Circuit: An Euler path is a path in a graph that visits
every edge exactly once. An Euler circuit is an Eulerian path that starts and
ends at the same vertex. A graph is said to be Eulerian if it has an Eulerian cycle
(Euler circuit). We have previously discussed Eulerian circuits for undirected
graphs. In this post, we extend the concept to directed graphs. Conditions for
Euler Path and Circuit: A directed graph has an Eulerian cycle if the following
conditions are true: All vertices with nonzero degree belong to a single strongly
connected component. The in-degree is equal to the out-degree for every vertex.
We can detect the strongly connected component using Kosaraju’s DFS-based
simple algorithm. Graph Properties: Let’s analyze the properties of the graph
in question: No isolated vertices (vertices with zero degree). Weakly connected
(there is a path between any two vertices, regardless of direction). The in-degree
and out-degree of each vertex are equal for all but two vertices. Conclusion: If
the graph satisfies the specified conditions, it has an Euler path but not an Euler
circuit. The two exceptional vertices (with in-degree one larger than out-degree
and vice versa) prevent the existence of an Euler circuit.
18
Because there is 2 vertext has odd-degree so there is a Euler path. 1 path is
a,b,d,c,a,d,b,c,d
4
algorithm will decide that L(z) = 2 and stop, whereas the path a, b, z is shorter
(has length 1 ).
28. The following table shows the twelve different Hamilton circuits and their
weights, where we abbreviate the cities with the beginning letter of their name,
except that New Orleans is O :
Circuit Weight
S-B-N-O-P-S 409 + 109 + 229 + 309 + 119 = 1175
S − B − N − P − O − S 409 + 109 + 319 + 309 + 429 = 1575
S − B − O − N − P − S 409 + 239 + 229 + 319 + 119 = 1315
S − B − O − P − N − S 409 + 239 + 309 + 319 + 389 = 1665
S − B − P − N − O − S 409 + 379 + 319 + 229 + 429 = 1765
S − B − P − O − N − S 409 + 379 + 309 + 229 + 389 = 1715
S − N − B − O − P − S 389 + 109 + 239 + 309 + 119 = 1165
S − N − B − P − O − S 389 + 109 + 379 + 309 + 429 = 1615
S − N − O − B − P − S 389 + 229 + 239 + 379 + 119 = 1355
S − N − P − B − O − S 389 + 319 + 379 + 239 + 429 = 1755
S − O − B − N − P − S 429 + 239 + 109 + 319 + 119 = 1215
S − O − N − B − P − S 429 + 229 + 109 + 379 + 119 = 1265
5
17. As in the argument in the proof of Corollary 1 , we have 2e ≥ 5r and
r = e − v + 2. Thus, e − v + 2 ≤ 2e/5, which implies that e ≤ (5/3)v − (10/3).
26. If we follow the proof in Example 3, we see how to construct a planar rep-
resentation of all of K3,3 except for one edge. In particular, if we place vertex
v6 inside region R22 of Figure 7( b), then we can draw edges from v6 to v2 and
v3 with no crossings, and to v1 with only one crossing. Furthermore, since K3,3
is not planar, its crossing number cannot be 0 . Hence its crossing number is 1
.