This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MINION 3 | |
**VARIABLES** | |
DISCRETE l[8,8] {0..8} | |
**SEARCH** | |
PRINT ALL | |
**CONSTRAINTS** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Combinatory Exercises" | |
author: "Matthew Henderson" | |
date: "13 August 2016" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Usage: | |
$ geng -qc 3 | edge_colouring.py | |
2 | |
3 | |
""" | |
from sys import stdin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Usage: | |
$ geng -qc 4 | moore.py | |
C~ | |
""" | |
from sys import stdin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORDER_MIN=2 | |
ORDER_MAX=9 | |
SIZE_MIN=1 | |
SIZE_MAX=10 | |
GENG="geng -qc" | |
compute_chromatic() | |
for graph in $INPUT/*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# echo `geng -qc 5` | moore.sh | |
# | |
# Note: Do not use for values greater than 6. | |
read g6raw | |
g6proc=$(echo $g6raw | | |
awk '{ print "\"" $1 "\"" "," }' RS=' ' ORS=' ' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*~ | |
*.swp | |
results | |
.drake | |
drake.log | |
data | |
results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*~ | |
*.swp | |
results | |
.drake | |
drake.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file_gv=$1 | |
n_edges_re='s/\([0-9]*\) %.*/\1/p' | |
n_edges=`gc -e $file_gv\ | |
| sed -n "${n_edges_re}"\ | |
| tr -d ' '` |