CS 310 Unit 17 Elementary Graph Algorithms

CS 310 Unit 17 Elementary Graph Algorithms - CS 310 Unit 17...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 310  Unit 17  Elementary Graph Algorithms Furman Haddix Ph.D. Assistant Professor Minnesota State University,  Mankato Spring 2008
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unit 17 Objectives Seven bridges of Konigsberg problem Graph notation and representation Breadth-first search Depth-first search  Text Chapter 22.1, 22.2, 22.3, Appendix  B.4
Background image of page 2
Seven (or Twelve) Bridges of Konigsberg A Well-known Problem in Graph Theory Story is that there were seven bridges in the city of  Konigsberg, Prussia (now Kaliningrad, Russia). On Sunday afternoon walks, people would walk through  the town, crossing the seven bridges A sidebar pastime developed of attempting to include  exactly one crossing of each bridge while ending up at the  same location that one started from. Occasionally someone would claim that they had  succeeded; however, they were never able to repeat the  result (once they were sober). Euler, being an enterprising mathematician, decided that  this was a problem worthy of investigation. As a result he  came up with the concept of an Euler circuit, and was able  to prove that such a circuit was impossible with the  existing configuration of the seven bridges. A related concept is that of the Euler path, which requires  that all links be crossed, but allows start and end at  different nodes. This was also proven impossible with the  existing configuration of the seven bridges. It became  possible during World War II with the destruction of two of  the bridges, although even this Euler path must start on  one island and end on the other.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Seven Bridges –  No Euler Circuit Seven bridges – Two Islands, There is no circuit (or path) in which a person  can  cross all bridges exactly once. 1 2 3 5 6 7 4 ?
Background image of page 4
Graph View Original Formulation   All four nodes  have an odd number of linkages.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Graph View Princes of Konigsberg Formulation Red Prince’s Castle Blue Prince’s Castle Bishop’s Cathedral Town Tavern
Background image of page 6
The Eighth  Bridge The Blue Prince, having analyzed the town's bridge system by means of  graph theory, concludes the bridges cannot be walked. He contrives a  stealthy plan to build an 8th bridge so that he can begin in the evening at his  Schloß (castle), walk the bridges, and end at the Gasthaus (inn or tavern) to  brag of his victory. Of course, the Red Prince is unable to duplicate the feat. 1 2 3 5 6 7 4 8 Where should the eighth bridge be built?
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Graph View Eight Bridges   Blue and Amber Odd
Background image of page 8
The Ninth  Bridge The Red Prince, infuriated by his brother's Gordian solution to the  problem, builds a 9th bridge, enabling him to begin at his Schloß, 
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2008 for the course CS 310 taught by Professor Furmanhaddix during the Spring '08 term at Minnesota State University, Mankato.

Page1 / 69

CS 310 Unit 17 Elementary Graph Algorithms - CS 310 Unit 17...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online