This file contains hidden or 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
Main = try set_counter then (count!; (decrement; Relax!; Clean!)!; Final) | |
Relax = root1; try no_deg else ((unmarked_edge; try {unvisited, reduce}; finish)!; unroot1) | |
Clean = root2; unmark_edge!; unroot2 | |
Final = (root1; (unmarked_edge; if reduce then set_flag; finish)!; unroot1)!; | |
if flag then fail; delete_counter; no_deg_inv! | |
no_deg(x: list) | |
[ | |
(n1(R), x #blue) | |
| |
This file contains hidden or 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
Main = (init; DFS!; try unroot else break)!; Check | |
DFS = try next_edge then (try {move, ignore} else (set_flag; break)) | |
else (try loop; try back else break) | |
Check = if flag then fail | |
init(x: list) | |
[ | |
(1, x #grey) | |
| | |
] |
This file contains hidden or 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
#include <iostream> | |
#include <random> | |
#include <ctime> | |
#include <string> | |
using namespace std; | |
int main(void){ | |
srand(time(NULL)); | |
string goal = "MAJA", current; |
This file contains hidden or 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
Main = try init then (DFS!; Check) | |
DFS = FORWARD!; try back else break | |
FORWARD = next_edge; try {colour_red, colour_blue, blue_red, red_blue} else (unroot; break) | |
Check = try unroot else fail | |
init(x: list) | |
[ | |
(n1, x #grey) | |
| | |
] |
This file contains hidden or 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
Main = try init then (DFS!; Check) | |
DFS = (next; {move, ignore})!; try back else break | |
Check = if match then fail | |
init(x: list) | |
[ | |
(n1, x #grey) | |
| | |
] | |
=> |
This file contains hidden or 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 | |
install_dir="/opt/local/gp2c" | |
flags="" | |
code=false | |
output=false | |
while getopts ":co" opt; do | |
case $opt in |