Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Dr. C. B. Alphonce (Room305 Mathematics Building) MT 147: DISCRETE MATHEMATICS (3 Units) CORE for B. SC. In COMPUTER SCIENCE.

Similar presentations


Presentation on theme: "By Dr. C. B. Alphonce (Room305 Mathematics Building) MT 147: DISCRETE MATHEMATICS (3 Units) CORE for B. SC. In COMPUTER SCIENCE."— Presentation transcript:

1 By Dr. C. B. Alphonce (Room305 Mathematics Building) MT 147: DISCRETE MATHEMATICS (3 Units) CORE for B. SC. In COMPUTER SCIENCE

2 Meeting Times : Monday 10 00 – 11 00 Room ATB(Lecture1) Tuesday 10 00 – 11 00 ) Room ATA(Tutorial) Thursday 14 00 – 15 00 ) Room ATB(Lecture2) Friday 11 00 – 12 00 ) Room ATALecture 3) Assessments: 2 Tests @ 20 Marks University Examinations 60 Marks

3 Warning: To benefit from this course make sure you are registered in ARIS

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43 GOOD NEWS Monday 27 thApril 2015 At 10 – 11 a.m. In Room ATB Test 1

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115 The 7 Bridges of Konigsberg A puzzle in need of solving

116 The Problem The 7 Bridges of Konigsberg is a famous mathematics problem inspired by an actual city in Germany. A river ran through the city such that in its center was an island, and after passing the island, the river broke into two parts.

117 Seven bridges were built so that the people of the city could get from one part to another. The Problem The map of the city looks something like this.

118 Many people claimed that they could walk a route that crossed each bridge exactly once yet nobody could prove it.

119 Try it. Sketch the above map of the city on a sheet of paper and try to 'plan your journey' with a pencil in such a way that you trace over each bridge once and only once and you complete the 'plan' with one continuous pencil stroke. Problem 1

120 Having trouble? That’s okay, so did Euler. It doesn’t seem possible to cross every bridge exactly once. In fact it isn’t. You will find out why later. Some failed attempts to solve the problem are:

121 Suppose they had decided to build one fewer bridge in Konigsberg so that map looked like this. Problem 2 Now is it possible to 'plan your journey' in such a way that you trace over each bridge once and only once and you complete the 'plan' with one continuous pencil stroke?

122 This one is solvable. Here's one possible solution:

123 Euler approached the 7 bridges problem by collapsing areas of land separated by the river into points, and the bridges into arcs. The map below shows this concept.

124 In a stripped down version, the map would look something like this.

125 The problem now becomes one of drawing this picture without retracing any line and without picking your pencil up off the paper. Consider this: all four of the vertices in the picture have an odd number of arcs connected to them. Take one of these vertices, say one with three arcs connected to it. Say you're going along, trying to trace the above figure without picking up your pencil. The first time you get to this vertex, you can leave by another arc. But the next time you arrive, you can't. So you'd better be through drawing the figure when you get there! Alternatively, you could start at that vertex, and then arrive and leave later. But then you can't come back. Thus every vertex with an odd number of arcs attached to it has to be either the beginning or the end of your pencil-path. So you can only have up to two 'odd' vertices! Thus it is impossible to draw the above picture in one pencil stroke without retracing.

126 Euler’s Theorem’s If a network has more than two odd vertices, it does not have an Euler path. If a network has two or less odd vertices, it has at least one Euler path. A vertex is odd if it has an odd number of arcs leading to it, otherwise it is called even. An Euler path is a continuous path that passes through every arc once and only once.

127 Which of the following networks are Euler Paths?

128 What about this one?

129 Let’s see if you were paying attention… Use Euler’s theorems to figure out the following problems…

130 The northern bank of the river is occupied by the castle of a Blue Prince, the southern bank by that of a Red Prince. The East bank is home to the Bishop’s Church, and on the small island in the center, is the town inn.

131 The Blue Prince, realizing that the bridges cannot be walked in a Euler path, contrives a stealthy plan to build an eighth bridge so that he can begin his evening walk at his castle, walk the 8 bridges and end at the inn to brag of his victory. Of course, he wants the Red Prince to be unable to duplicate the feat. Use Euler’s theorems to figure out where the Blue Prince should build the eighth bridge?

132 Solution: Euler paths are possible if it has two or less odd vertices. If this is so, then the walk must begin at one such vertex and end at the other. Since there are only 4 vertices, the solution is simple. The walk is desired to begin at the blue vertex and end at the orange vertex. Therefore a new bridge is drawn between the other two vertices. Since they each formerly has an odd number of bridges, they must now have an even number of bridges fulfilling all conditions.

133 The Red Prince, infuriated by his brother’s solution to the problem, begins to build a ninth bridge which enables him to begin at the Red castle, walk the bridges, and end at the inn to rub dirt in his brothers face. Of course with the construction of the ninth bridge, the Blue prince will no longer be able to walk the bridges himself. Where should the ninth bridge be built?

134 Solution: With the eighth bridge already built, it is desired to enable the red castle and forbid the blue castle as a starting point. The Inn remains the end of the walk and the church is unaffected. By adding a bridge between the red and blue castles, it changes the blue castle to an even vertex and changes the red castle to an odd vertex. Which means the Red Prince can walk the bridges and end at the inn but the Blue Prince cannot.

135 The Bishop has watched this furious bridge-building with dismay. It upsets the town folk and, worse, contributes to excessive drunkenness. He wants to build a tenth bridge that allows all involved to walk the bridges and return to their own beds. Where should the Bishop build the tenth bridge?

136 Solution: The 10th bridge takes us in a slightly different direction. The Bishop wishes every citizen to return to his starting point. This is an Euler cycle and requires that all vertices be of even degree. After the solution of the 9th bridge, the red and the orange nodes have odd degree, so they must be changed by adding a new edge between them.

137 This is what the town would look like with the addition of the 8 th, 9 th, and 10 th bridge.

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176 END ASANTE KWA KUNISIKILIZA


Download ppt "By Dr. C. B. Alphonce (Room305 Mathematics Building) MT 147: DISCRETE MATHEMATICS (3 Units) CORE for B. SC. In COMPUTER SCIENCE."

Similar presentations


Ads by Google