https://github.com/kevinbird61/chinese-postman-problem
Project of Course - Graph Theory (EE6622E) in National Cheng Kung University.
https://github.com/kevinbird61/chinese-postman-problem
fake mininet
Last synced: 12 months ago
JSON representation
Project of Course - Graph Theory (EE6622E) in National Cheng Kung University.
- Host: GitHub
- URL: https://github.com/kevinbird61/chinese-postman-problem
- Owner: kevinbird61
- License: gpl-3.0
- Created: 2019-02-12T16:46:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-27T06:12:33.000Z (over 7 years ago)
- Last Synced: 2025-05-15T22:39:12.352Z (about 1 year ago)
- Topics: fake, mininet
- Language: C++
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chinese Postman Problem
Project of Course - Graph Theory (EE6622E) in National Cheng Kung University.
## Build & Run
```sh
# Clone
$ git clone --recursive https://github.com/kevinbird61/chinese-postman-problem.git
# Build the library first
$ cd fake-mininet/ && make lib && cd ..
# Copy the libfakemn.a to root
$ cp fake-mininet/libfakemn.a .
# Build the code
$ make
# Run
$ ./main.out
```
## Concepts we need
* Graph (Edge, Vertex) - chapter 1
* Distance - chapter 2
* Matching - chapter 3
* Connectivities - chapter 4
* Dijkstra
* Eulerian circuit
## Description of Program
1. If current graph is Eulerian ?
* Yes: Find one of Eularian path/trail (shortest path) can solve chinese postman problem.
* No: Goto next phase.
2. If not Eulerian:
* Find all `odd` degree points, then using these points into a `complete graph`.
* Mapping those `new` edges of complete graph back to origin graph. (It will be some new edges)
* Now we have Eulerian, back to Step 1.
3. After finding an Eulerian path/trail, if there have any `new` edges in this path/trail, then replace it with an alternative path in original graph. (Using `fake-mininet` API to give these `new` edges a "tag", and if detect this special tag, then replace it with an alternative.)