1 / 16

# Chinese Postman Problem

Chinese Postman Problem. CP Problem CPP Algorithm Eulerization Algorithm. Chinese Postman Problem. Given a connected graph, find a minimal length circuit (or path) traversing all edges of the graph.

Télécharger la présentation

## Chinese Postman Problem

E N D

### Presentation Transcript

1. Chinese Postman Problem CP Problem CPP Algorithm EulerizationAlgorithm Mathematics in Management Science

2. Chinese Postman Problem Given a connected graph, find a minimal length circuit (or path) traversing all edges of the graph. If the graph has an Euler circuit (or path), it is a minimal length circuit (or path) traversing the entire graph. Euler circuits and paths provide the most efficient means to traverse all edges of a graph.

3. Solving CPP – harder case What if there are no ECs (or EPs)? CPP Algorithm • Eulerizethe graph • Find EC (or EP) on new graph • Transfer back to original graph Each duplicated edge gets retraced producing deadhead travel.

4. Eulerizing Algorithm Goal To get a graph which has EC/EP. • Mark all odd vertices. • Pick an odd vtx. Duplicate an existing edge having this vtx as an endpoint. • Change degrees of two vtxs just connected. All degrees even – done; otherwise, repeat the above step. For EP, done when get 2 odd vtxs.

5. Finding Good Eulerizations First, duplicate any connecting edges between pairs of odd vertices. Sometimes vertices are more than one edge apart; in this case, gotta duplicate edges between vertices. Look for the fewest edges to duplicate to make all vertices even. Each duplicated edge gets retraced producing deadhead travel.

6. Rectangular Networks

7. “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.

8. Semi-Eulerizing Graphs 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.

9. Conclusion Graphs Ideas go 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

More Related