Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring 2015 Mathematics in Management Science Chinese Postman Problem What is CPP? CPP & ECs & EPs Fleury’s Algorithm Eulerization.

Similar presentations


Presentation on theme: "Spring 2015 Mathematics in Management Science Chinese Postman Problem What is CPP? CPP & ECs & EPs Fleury’s Algorithm Eulerization."— Presentation transcript:

1 Spring 2015 Mathematics in Management Science Chinese Postman Problem What is CPP? CPP & ECs & EPs Fleury’s Algorithm Eulerization

2 Parking Meter Problem Blue dots indicate parking meters along certain streets. Meter reader must check each meter. Want efficient route.

3 Parking Meter Problem Create associated graph with just the information we need. Identify corners B’,B” & C’,C” etc; corners become vtxs.

4

5 Meter reader must traverse each edge of above graph (to read all meters along it). Would prefer no retracing; want an Euler circuit Does graph have an Euler circuit? So, what should meter reader do?

6 Chinese Postman Problem Chinese mathematician Meigu Guan first studied this problem in 1962, hence the name. The Problem Given a connected graph, find a minimal length circuit (or path) traversing all edges of the graph.

7 Solving CPP – easy case If graph has an Euler circuit (or path), it is a minimal length circuit (or path) traversing the entire graph. Euler’s Circuit/Path Theorems tell us exactly when a graph has EC/EP. How do we actually find an Euler circuit or Euler path?

8 Fleury’s Algorithm Check that the graph is connected and either has no odd vertices (for circuit), or has two odd vertices (for path). Choose a starting vertex. For a circuit, can be any vertex; for path, it must be one of the two odd vertices. At each step, if you have a choice, don’t choose a bridge of the yet-to- be-traveled part of the graph.

9 Bridges An edge is called a bridge if erasing it makes the graph disconnected. BF, FG, FH are bridges

10 Summary – CPP so far Euler circuits and paths provide the most efficient means to traverse all edges of a graph. Euler’s Theorems tell us an easy way to determine when a graph has an Euler circuit or path: the graph must be connected & all (all but 2 for path) vertices must be even.

11 Solving CPP – harder case What if there are no ECs or EPs? No EC means: some odd vertex! No EP means: 4 or more odd vtxs. No EC/EP: gotta retrace edge(s). Eulerize the graph Find an EC (or EP) on new graph Transfer back to original graph (“squeeze”)

12 Pix’d graph has no EC; C & G odd valence. Gonna have to retrace the edge CG. To Eulerize this graph, duplicate edge CG. Get a new graph! Careful; this new graph is not the same as the original.

13 Pix’d graph has no EC; C & G odd valence. Gonna have to retrace the edge CG. To Eulerize this graph, duplicate edge CG. Get new graph pix’d below where the blue edge is duplicated CG edge.

14 Now find EC for this new graph; this easy. Then, gotta transfer this EC back to original graph; traversing the blue edge here corresponds to retracing the CG edge in original graph.

15 The numbered edges describe the circuit A→B→C→D→H→G→C→G→F→B→F→E→A in the original graph. This then gives an efficient route for our meter reader.

16 Eulerizing Graphs If all vtxs are even, done (have an EC). Otherwise, have odd vtxs: mark them. (Must have even number of odd vtxs!) Pick an odd vtx. Duplicate an existing edge having this vtx as an endpoint. Change valences of two vtxs just connected. All vtxs even – done; otherwise, repeat the above step.

17 Example

18 Example

19 Example

20 Example

21 Finding Good Eulerizations Locate odd vertices. Try to duplicate connecting edges between pairs of odd vertices. Sometimes odd vertices more than one edge apart; if so, gotta duplicate buncha edges. Look for the fewest edges to duplicate to make all vertices even.

22 Rectangular Networks

23 “Edge Walker” Algorithm Start in upper left corner. Travel (clockwise) around outer boundary. As you travel, duplicate edge via rules: If vertex is odd, duplicate edge and link this vertex to next vertex. –If next vertex becomes even, skip it (just keep “walking”). –If next vertex becomes odd, (on a corner) link it to the next vertex. Repeat rules until you reach the upper left corner again.

24

25

26

27

28

29 Sometimes need an exhaustive route, but no “closed” requirement—route may start & stop at different points. Now want to leave two odd vertices on the graph unchanged, and change the other odd vertices into even. Route begins & ends at two odd vtxs. Semi-Eulerizing Graphs

30

31 Conclusion Graphs The idea goes back to Euler. Graph Models Graph theory useful to solve routing and network problems.Algorithm Step-by-step rules. Fleury’s Alg, “Edge Walker” Alg


Download ppt "Spring 2015 Mathematics in Management Science Chinese Postman Problem What is CPP? CPP & ECs & EPs Fleury’s Algorithm Eulerization."

Similar presentations


Ads by Google