Skip to content

Instantly share code, notes, and snippets.

View MHenderson's full-sized avatar

Matthew Henderson MHenderson

View GitHub Profile
@MHenderson
MHenderson / recursive-colouring.ipynb
Last active August 29, 2015 14:03
Vertex colouring by recursive maximal independent set extraction.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MHenderson
MHenderson / chromatic-polynomial-notebook.ipynb
Last active August 29, 2015 14:03
Chromatic polynomials via NetworkX and tutte_bhkk.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MHenderson
MHenderson / .gitignore
Last active August 29, 2015 14:04
Compute the chromatic number of small graphs.
*~
*.swp
results
.drake
drake.log
@MHenderson
MHenderson / .gitignore
Last active August 29, 2015 14:05
Chromatic numbers of regular graphs on at most 10 vertices.
*~
*.swp
results
.drake
drake.log
data
results
@MHenderson
MHenderson / Drakefile
Last active August 29, 2015 14:05
Chromatic indices of small graphs with few edges.
ORDER_MIN=2
ORDER_MAX=9
SIZE_MIN=1
SIZE_MAX=10
GENG="geng -qc"
compute_chromatic()
for graph in $INPUT/*;
@MHenderson
MHenderson / moore.py
Last active August 29, 2015 14:06
Filter Moore graphs from standard input of graphs in graph6 format.
#!/usr/bin/env python
"""
Usage:
$ geng -qc 4 | moore.py
C~
"""
from sys import stdin
@MHenderson
MHenderson / Drakefile
Created September 24, 2014 10:54
Greedy edge-colouring of small, connected graphs.
ORDER_MIN=2
ORDER_MAX=9
; Let X be the set of all non-isomorphic, connected graphs of order at least
; ORDER_MIN and at most ORDER_MAX
; Count the total number of colours used by greedy edge-colourings of all
; graphs in X.
count_colours()
for j in `seq $ORDER_MIN $ORDER_MAX`
@MHenderson
MHenderson / edge_colouring.py
Last active August 29, 2015 14:06
Greedy edge-colouring of graph6 format graphs.
#!/usr/bin/env python
"""
Usage:
$ geng -qc 3 | edge_colouring.py
2
3
"""
from sys import stdin
@MHenderson
MHenderson / colouring-simulation-notebook.ipynb
Last active October 19, 2015 13:11
Investigating colourings of graphs on seven or fewer vertices.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MHenderson
MHenderson / networkx-drawing-notebook.ipynb
Last active October 19, 2015 13:11
Graph Drawing in NetworkX
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.