https://github.com/jessepollak/graph-colorer
A graph coloring script I wrote for my Discrete Mathematics class
https://github.com/jessepollak/graph-colorer
Last synced: 3 months ago
JSON representation
A graph coloring script I wrote for my Discrete Mathematics class
- Host: GitHub
- URL: https://github.com/jessepollak/graph-colorer
- Owner: jessepollak
- Created: 2012-05-01T22:41:38.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-02T02:04:29.000Z (about 13 years ago)
- Last Synced: 2025-01-12T03:26:58.634Z (5 months ago)
- Language: Ruby
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
#Graph Colorer
This is a script for coloring a graph created for my Discrete Mathematics class.
To use, enter:
ruby graph_colorer.rb graph.txt
Input format: the input file will have one line with the number of vertices and the number of edges. There will then be one line for each edge, each line will contain two integers identifying the endpoints, the smaller number will be listed first.
INPUT:
5 6
1 2
1 4
1 5
2 4
2 5
3 4OUTPUT:
1 1
2 2
3 1
4 3
5 3