5
CSE-2315 Discrete Structures Homework 8 (sample solutions) Ref Book by Gersting, 7 th edition Textbook exercise 7.1 2. 4. 28.

CSE-2315 Discrete Structures Homework 8 (sample solutions

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CSE-2315 Discrete Structures Homework 8 (sample solutions

CSE-2315 Discrete StructuresHomework 8 (sample solutions)Ref Book by Gersting, 7th edition

Textbook exercise 7.12.

4.

28.

Page 2: CSE-2315 Discrete Structures Homework 8 (sample solutions

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

Page 3: CSE-2315 Discrete Structures Homework 8 (sample solutions

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

Page 4: CSE-2315 Discrete Structures Homework 8 (sample solutions

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.

Page 5: CSE-2315 Discrete Structures Homework 8 (sample solutions

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