Created
April 2, 2014 00:32
-
-
Save vermiculus/9925840 to your computer and use it in GitHub Desktop.
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
--- !Move | |
name: mark node | |
description: mark this node | |
author: Sean Allred | |
date: 2014-05-17 | |
tex: '"marked"(n) = 1' | |
filename: mark.py | |
--- !Move | |
name: unmark node | |
description: unmark this node | |
author: Sean Allred | |
date: 2014-05-17 | |
tex: '"marked"(n) = 0' | |
filename: unmark.py | |
--- !Predicate | |
name: marked and neighbor marked | |
filename: marked-and-neighbor-marked.py | |
description: two adjacent nodes are marked | |
author: Sean Allred | |
date: 2014-05-17 | |
tex: '"marked"(n) = 1 \land \exists v \in N(n) : "marked"(v) = 1' | |
--- !Predicate | |
name: unmarked and neighbors unmarked | |
filename: unmarked-and-neighbors-unmarked.py | |
description: All nodes in N[n] are unmarked | |
author: Sean Allred | |
date: 2014-05-17 | |
tex: '"marked"(n) = 0 \land \forall v \in N(n) : "marked"(v) = 0' | |
--- !Algorithm | |
name: Independent Set | |
author: Sean Allred | |
date: 2014-05-17 | |
rules: | |
- !Rule | |
description: if a neighbor is marked, unmark | |
author: Sean Allred | |
date: 2014-05-17 | |
predicate: marked and neighbor marked | |
moves: [ unmark node ] | |
- !Rule | |
description: if no neighbors are marked, mark | |
author: Sean Allred | |
date: 2014-05-17 | |
predicate: unmarked and neighbors unmarked | |
moves: [ mark node ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment