Exercises 11.1 Exercise 6) Work: A shortest path from d to c is: {d,c

advertisement
Exercises 11.1
Exercise 6)
Work:
A shortest path from d to c is: {d,c} then d ( d,c) = 1
A shortest path from d to e is: {d,e} then d (d,e) = 1
A shortest path from d to c is: {d,f} then d (d,f) = 1
A shortest path from d to g is: {d,c},{c,g} then d( d,g) = 2
A shortest path from d to h is: {d,c},{c,g},{g,h} then d(d,h) = 3
A shortest path from d to i is: {d,c},{c,g},{g,h},{h,i}
then d(d,i) = 4
A shortest path from d to j is: {d,c},{c,g},{g,j} then d(d,j) = 3
A shortest path from d to k is: {d,c},{d,k} then d(d,k) = 2
A shortest path from d to l is: {d,c},{c,k},{k,l} then d(d,l) = 3
A shortest path from d to m is: {d,c},{c,k},{k,m} then d(d,m) = 3
Answer:
d(d.c) = d(d,e) = d(d,f) = 1,
d(d,h) = d(d,j) = d(d,l) = d(d,m) = 3,
d(d,g) = d(d,k) = 2
d(d,i) = 4
Exercise 11)
Work
a) Yes, because if we have a connected graph G, not loop free, we remove a loop of G and
the result is a connected graph
Answer: Yes
b) No, because if G is a multigraph exists x,y vertex of G there is at least one edge from x
to y, then if we remove one of those edges the graph remains connected
Answer: No
c)
We will give an idea of how to prove this statement:
Let G graph with n vertices, connected and if we remove any edge the result is a
disconnected graph then the number of edges of G is n-1
Proof: (Idea)
Let the vertices of the graph G : {v1,v2,……vn},
Let´s start with a graph containing only one vertex of G and no edges (H0), we will add
edges finishing the process when we have the graph G
We select any vertex (for example v1) , Ho is the graph with only one vertex (v1) and no
edges
Since the graph is connected, exists vi (i1) vertex of G
Where (v1,vi) is an edge of G , then we add to Ho the edge (v1,vi) and the result is H1
H1 has 2 vertices and 1 edge (v1,vi), also v1 can be connected with more than one vertex
We check if exists vj (j1,ji) where (v1,vj) is an edge of G, if exists we add the edge
(v1,vj) and we obtain the graph H2 with 3 vertices and 2 edges
H2 has 3 vertices {v1,vi,vj} and 2 edges (v1,vi),(v1,vj)
We continue this process until we have Hk1 a graph with k1+1 vertices
{v1,vi1,….vik1} and k1 edges (v1,vi1),(v1,vi2)…..(v1,vik1)
If k1 = n-1 the process is finished , (we see that G has n vertices)
If not we do the same with each vertex vi1,….vik1
We always add at each step one edge of G and one vertex of G until we cover all the
vertices of G.
So the final graph is Hn-1 = G (has n vertices and n-1 edges)
Answer: Yes, it has n-1 edges
Exercise 15)
For n = 1 we have 1 walk {v,v}
For n = 2 we have 2 walks {v,v},{v,v} and {v,w},{w,v}
For n = 3 we have 3 walks
{v,v},{v,v},{v,v}
and {v,v},{v,w},{w,v} and
{v,w},{w,v},{v,v}
Let An the number of closed v-v walks of length n
Then An has the form: {v,x1},{x1,x2},{x2,x3},….{xn-2,xn-1},{xn-1,v} where
{x1,x2….xn-1}  {v,w} and {xi,xi+1} {w,w} for 1  i  n-2
xn-1 can be v or w
Let An,v = the number of closed v-v walks of length n where xn-1 = v
Let An,w = the number of closed v-v walks of length n where xn-1 = w
Then An = An,v+ An,w
An,v has the form: {v,x1},{x1,x2},{x2,x3},….{xn-2,v},{v,v}
Then An,v = An-1
An,w has the form: {v,x1},{x1,x2},{x2,x3},….{xn-3,v}{v,w},{w,v}
Then An,w = An-2
Then: An = An-1+An-2
A1 = 1, A2 = 2, A3 = 1+2 = 3, A4 = 2+3=5
Then An = Fn+1 where Fn is the nth Fibonacci number
F0 = 0, F1=1, F2=1,F3=2,F4=3
Then An = Fn+1 =
𝟏
√𝟓
[(
𝟏+√𝟓
𝟐
𝒏+𝟏
)
𝟏−√𝟓
−(
𝟐
)
𝒏+𝟏
] (See page 442) for n ≥1)
a)
g) When 3 intervals do not overlap
010101
h) Interval 1 and 2 overlap , 2 and 3 overlap but not overlap 1 and 2 001011
Answer: There are 2 more , sequences are 010101 and 001011
b) ??
c) ??
Exercises 11.2
Exercise 6)
Work:
These are all (loop-free) non isomorphic undirected graphs with four vertices:
Answer: There are 8 graphs and there are 4 connected
Exercise 13)
Work:
Let G be a cycle on n vértices, we have to prove:
1) If G is self complementary  n = 5
2) If n = 5  G is self-complementary
1)
If G is self complementary then G is isomorphic to 𝐺̅ then the number of edges of G must
be equal to the number of edges of 𝐺̅
Since G it´s a cycle on n vertices , If V = {v1,v2,…..vn}
then edges are: E={{v1,v2},{v2,v3}……{vn-1,vn},{vn,v1}} , we have n edges
Kn has n(n-1)/2 edges then 𝐺̅ has n(n-1)/2 – n = n[(n-1)/2 -1] = n[n-3]/2 edges
Then since G and 𝐺̅ must have the same number of edges we have:
n = n(n-3)/2 then (n-3)/2 = 1 then n-3 = 2 then n = 5
2)
If G is a cycle on 5 vertices
Let G = (V,E) and 𝐺̅ = (𝑉 ∗, 𝐸 ∗)
V ={v1,v2,v3,v4,v5}, E = {{v1,v2},{v2,v3},{v3,v4},{v4,v5},{v 5,v1}}
V* ={v1,v2,v3,v4,v5}, E* = {{v1,v3},{v1,v4},{v2,v4},{v2,v5},{v3,v5}}
Let f:
f(v1) = v1
f(v2) = v3
f(v3) = v5
f(v4) = v2
f(v5) = v4
It is easy to see that f is a onto and one to one function, also for all a,bV
{a,b}E if only if {f(a),f(b)}E*
Then G and 𝐺̅ are isomorphic then G is self complementary
Exercises 11.3:
Exercise 13)
Work:
Kn is un undirected graph with no isolated vertices
Then using Theorem 11.3
Kn has an euler circuit if only if Kn is connected (we know that) and every vertex in Kn has
even degree
Every vertex of Kn has a degree of n-1
Then Kn has an euler circuit if only if n-1 is even if only if n is odd
Answer: Kn has an euler circuit if only if n is odd
Kn is un undirected graph with no isolated vertices
Then using Corollary 11.2
We can construct an euler trial in Kn if only if Kn is connected (we know that) has exactly
two vertices of odd degree
The only value of n where Kn has exactly 2 (all) vertices of odd degree is n = 2
Also n=2 is even (K2 has not an euler circuit)
Answer: Kn have an euler trial (but not an euler circuit) if only if n = 2
Exercises 11.4:
Exercise 17)
a) v = 17 , e = 34 , r =18 then v –e + r = 17-34+19 = 2
b) v = 10, e = 24, r = 16 then v – e + r = 10-24+16 = 2
Exercises 12.1:
Exercise 2)
Work:
Since in every tree T = (V,E) we know: V=E+1
E1=17 implies: V1=E1+1 = 17 +1 = 18
V2=2V1=2(18) = 36
E2=V2-1 = 36-1 = 35
Answer: V1= 18 , V2= 36 and E2 = 35
Exercise 7)
Work:
Using the theorem 12.5) if we have a loop-free undirected graph G=(V,E)
G connected and V=E+1 then G is a tree then we must search an example
where G is disconnected:
Example: V = {a,b,c,d} , E ={(a,b),(b,c),(a,c)}
V= 4 , E= 3 , obviously V=E+1
Exercise 11)
Work:
Every subgraph starts into a vertex a and end in b and for each (a,b) exists only one path
from a to b
Then the number of paths in T = number of ways we can select 2 vertices in T = (nC2)
= n(n-1)/2
Answer: n(n-1)/2
Exercises 12.3:
Exercise 2)
Work:
a)
b)
Download