https://github.com/lamdav/isgraphicalscript
A simple algorithm written in Python to determine if a given degree sequence is graphical.
https://github.com/lamdav/isgraphicalscript
algorithm degree-sequence graph-theory graphical script
Last synced: 2 days ago
JSON representation
A simple algorithm written in Python to determine if a given degree sequence is graphical.
- Host: GitHub
- URL: https://github.com/lamdav/isgraphicalscript
- Owner: lamdav
- Created: 2016-03-19T03:02:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-19T03:23:10.000Z (over 9 years ago)
- Last Synced: 2025-02-24T03:32:56.765Z (9 months ago)
- Topics: algorithm, degree-sequence, graph-theory, graphical, script
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# isGraphicalScript
### Description
A simple algorithm written in Python to determine if a given degree sequence is graphical.
This was a fun and easy project to easily and quickly check if a given degree sequence is graphical. This script was used to solve several problems from:
[*A First Course in Graph Theory*](http://smile.amazon.com/First-Course-Graph-Theory-Mathematics/dp/0486483681/ref=sr_1_1?ie=UTF8&qid=1458357490&sr=8-1&keywords=graph+theory+first+course "Amazon") by Gary Chartrand and Ping Zhang.
These problems are in the comments of the main function with the number of the book problem listed.
### How to Use:
This is a command line script. Simply go where this file is saved and type in
``$ isGraphical.py [arguments] ``
This script takes in space separated arguments.
If you wish to see the degree sequence at each stage of the algorithm, you may use the ``-v`` verbose flag.
``$ isGraphical.py [arguments] -v``
The ``-v`` flag can appear interweaved in the arguments if so desired.