cse-2315 discrete structures homework 8 (sample solutions
Post on 07-May-2022
0 Views
Preview:
TRANSCRIPT
CSE-2315 Discrete StructuresHomework 8 (sample solutions)Ref Book by Gersting, 7th edition
Textbook exercise 7.12.
4.
28.
34.
Textbook exercise 7.211.No odd nodes, so yes; such a path can start at ny node and will end there.For example, 2 – 3 – 2 – 1 – 3 – 1 – 2
28.No.
33a. n = 2 (a trivial case)
or, n = any odd nuber (in which case the degree of every node isn – 1, an even number)
b. n > 2
Textbook exercise 7.33.IN = {1}
1 2 3 4 5 6 7 8
d 0 3 5 8 1
s - 1 1 1 1 1 1 1
p = 6, IN = {1, 6}1 2 3 4 5 6 7 8
d 0 3 5 7 1
s - 1 1 1 6 1 6 1
p = 2, IN = {1, 6, 2}1 2 3 4 5 6 7 8
d 0 3 5 7 1
s - 1 1 1 6 1 2 1
p = 7, IN = {1, 6, 2,7}1 2 3 4 5 6 7 8
d 0 3 5 7 1
s - 1 1 1 6 1 2 7
p = 3, IN = {1, 6, 2,7,3}1 2 3 4 5 6 7 8
d 0 3 5 7 1
s - 1 1 3 6 1 2 7
p = 8, IN = {1, 6, 2,7,3,8}1 2 3 4 5 6 7 8
d 0 3 5 6 1
s - 1 1 3 8 1 2 7
p = 5, IN = {1, 6, 2,7,3,8,5}1 2 3 4 5 6 7 8
d 0 3 5 6 1
s - 1 1 3 8 1 2 7
Path: 1, 2, 7, 8, 5distance = 6
8.IN = {3}
1 2 3 4 5 6 7
d 0 1
s 3 3 - 3 3 3 3
p = 4, IN = {3,4}1 2 3 4 5 6 7
d 0 1
s 3 3 - 3 4 3 4
p = 5, IN = {3,4,5}1 2 3 4 5 6 7
d 0 1
s 3 3 - 3 4 5 4
p = 7, IN = {3,4,5,7}1 2 3 4 5 6 7
d 0 1
s 3 3 - 3 4 5 4
p = 6, IN = {3,4,5,7,6}1 2 3 4 5 6 7
d 0 1
s 3 3 - 3 4 5 4
p = 1, IN = {3,4,5,7,6,1}1 2 3 4 5 6 7
d 0 1
s 3 3 - 3 4 5 4
No path from 3 to 1.
18.IN = {1, 5, 2, 6, 7, 8, 4, 3}
Textbook exercise 7.44.g b a c e f d h i j
6.h f c a b e g j i d
14.g b e h j a c f i d
16.h f g i c d e b j a
32.Begin a DFS at node d, and then at node a: a d c e f b
top related