Skip to document

Math127121 assignment 10solutions

Course

Discrete Mathematics  (Mathematics 1271)

23 Documents
Students shared 23 documents in this course
Academic year: 2021/2022
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Lakehead University

Comments

Please sign in or register to post comments.

Preview text

Math 1271 Assignment 10

Solutions

  1. LetGbe an undirected looped graph with a loop at every vertex. Show that the

relationEon the vertex set given byuEvif and only if there is a path connecting

uandvis an equivalence relation.

Solution:To show thatEis an equivalence relation, we have to show thatEis

reflexive, symmetric, and transitive. SinceGhas a loop at every vertex, we have

vEvfor every vertexv,soEis reflexive. Since our graph is undirected, if there is a

path fromv 1

tov 2

,the same path traversed in the opposite direction goes fromv 2

tov 1

,sov 1

Ev 2

impliesv 2

Ev 1

,andEis symmetric. If we have a path fromv 1

to

v 2

,and another fromv 2

tov 3

,then following the first path, then the second gives a

path fromv 1

tov 3

,sov 1

Ev 2

andv 2

Ev 3

together implyv 1

Ev 3

andEis transitive.

ThusEmeets all three conditions, and is an equivalence relation.

  1. Represent each of the following graphs with an adjacency matrix:K 4 ,K 2 , 3 ,and

W 4.

Solution:

ForK 4

we have:

0 1 1 1

1 0 1 1

1 1 0 1

1 1 1 0

ForK 2 , 3

we list the two vertices on one side first, then the three on the other side.

We get:

     

0 0 1 1 1

0 0 1 1 1

1 1 0 0 0

1 1 0 0 0

1 1 0 0 0

     

Finally, forW 4

we list the centre of the wheel first, then the four vertices on the

rim clockwise. We get:

     

0 1 1 1 1

1 0 1 0 1

1 1 0 1 0

1 0 1 0 1

1 1 0 1 0

     

  1. For each of the graphs below, determine whether it has an Euler circuit. Con-

struct an Euler circuit when one exists. For each graph, determine whether it has

an Euler walk, and if it does, construct one.

1

2

c

O

O

O

O

O

O

O

O

O

O

O

O

O

O

d @

@

@

@

@

@

@

e

h

@

@

@

@

@

@

@

d

c

/

/

/

/

/

/

/

/

/

/

/

/

/

/

g

@

@

@

@

@

@

@

  • f

a















b

@

@

@

@

@

@

@

• • •

a















b

@

@

@

@

@

@

@

j

o o o o o o o o o o o o o o

f













g

i















e

h















Solution: For the first graph, we see that the degrees of the vertices are, from

left to right, 2, 4 , 4 , 2 , 2 , 2 , 4 .since these are all even, our theorem on Euler circuits

tells us that one exists. The patha, e, h, c, d, f, j, i, g, bis one Euler circuit in this

graph. For the second graph, the degrees are 2, 3 , 2 , 3 , 4 , 2 .Since two of these are

odd, there is no Euler circuit. There is an Euler walk going from one vertex with

odd degree to the other one. The pathd, g, h, c, a, b, e, fis one such walk.

  1. For each of the graphs below, determine whether the graph has a Hamilton

circuit. If it does construct one. If it does not, give an argument to show why no

such circuit exists.

b

@

@

@

@

@

@

@

a

g

e

j

a

/

/

/

/

/

/

/

/

/

/

/

/

/

/

b

d

@

@

@

@

@

@

@

  • h

f

k

@

@

@

@

@

@

@

g

@

@

@

@

@

@

@

f

??















c

i





























h

c

e















i

Solution:For the first graph, the patha, c, h, j, g, e, bgives a Hamilton circuit. For

the second graph, there cannot be a Hamilton circuit, as the only way to reach the

vertex in the lower left attached by edgecis alongc,and any circuit including this

edge would have to visit the degree 4 endpoint of edgectwice.

  1. Use Dijkstra’s Algorithm to find the weight of the lowest weight walk fromato

zin the graph below.

b

2

3 }

}

}

}

}

}

}

}

2

c

7

A

A

A

A

A

A

A

A

• 1

a -

z

e

5

2

A

A

A

A

A

A

A

A

f

1

}

}

}

}

}

}

}

}

Solution: We illustrate the algorithm by a series of diagrams showing how the

weights change.

4

b(3)

2

3 y

y

y

y

y

y

y

y

y

2

c(5)

7

E

E

E

E

E

E

E

E

E

• 1

a(0) -

z(7) S={a, e, b, c, f}

e(2) 5

2

E

E

E

E

E

E

E

E

E

f(6)

1

y y y y y y y y y

A minimum weight path is given bya, b, c, f, zwhich has weight 7.

  1. Consider the simple graphGdescribed inR

3 as follows. The verticies ofGare

the points with all coordinates either 0 or 1,i,e,

V={(x, y, z)|x= 0 orx= 1, y= 0 ory= 1, z= 0 orz= 1}.Two verticies inG

are connected by a single edge if, and only if, they differ in a single coordinate,

so (110) is connected to (111) but not to (101).Determine whetherGis a planar

graph.

Solution: The graphGis planar. Here is a representation of it without edge

crossings.

(0, 0 ,0)

J

J

J

J

J

J

J

J

J

(0, 1 ,0)

(0, 0 ,1) -

(0, 1 ,1)

t t t t t t t t t

(1, 0 ,1) -

(1, 1 ,1)

J

J

J

J

J

J

J

J

J

(1, 0 ,0)

t t t t t t t t t

(1, 1 ,0)

Was this document helpful?

Math127121 assignment 10solutions

Course: Discrete Mathematics  (Mathematics 1271)

23 Documents
Students shared 23 documents in this course
Was this document helpful?
Math 1271 Assignment 10
Solutions
1. Let Gbe an undirected looped graph with a loop at every vertex. Show that the
relation Eon the vertex set given by uEv if and only if there is a path connecting
uand vis an equivalence relation.
Solution: To show that Eis an equivalence relation, we have to show that Eis
reflexive, symmetric, and transitive. Since Ghas a loop at every vertex, we have
vEv for every vertex v, so Eis reflexive. Since our graph is undirected, if there is a
path from v1to v2,the same path traversed in the opposite direction goes from v2
to v1,so v1Ev2implies v2Ev1,and Eis symmetric. If we have a path from v1to
v2,and another from v2to v3,then following the first path, then the second gives a
path from v1to v3,so v1Ev2and v2Ev3together imply v1Ev3and Eis transitive.
Thus Emeets all three conditions, and is an equivalence relation.
2. Represent each of the following graphs with an adjacency matrix: K4,K2,3,and
W4.
Solution:
For K4we have:
0111
1011
1101
1110
For K2,3we list the two vertices on one side first, then the three on the other side.
We get:
00111
00111
11000
11000
11000
Finally, for W4we list the centre of the wheel first, then the four vertices on the
rim clockwise. We get:
01111
10101
11010
10101
11010
3. For each of the graphs below, determine whether it has an Euler circuit. Con-
struct an Euler circuit when one exists. For each graph, determine whether it has
an Euler walk, and if it does, construct one.
1