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 by Gary Chartrand and Ping Zhang.
These problems are in the comments of the main function with the number of the book problem listed.
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.