Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the...
Transcript of Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the...
![Page 1: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/1.jpg)
Slithering the Link
David Anderson, Dan Hamalainen, Edward Kwiatkowski,Valerie Lambert, Sam Spaeth
Carleton College Department of Computer Science
March 12, 2016
![Page 2: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/2.jpg)
Roadmap
What is a Slitherlink Puzzle?
How to Define a Slitherlink Puzzle
How to Solve a Slitherlink Puzzle
How to Make a Slitherlink Puzzle
![Page 3: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/3.jpg)
What is Slitherlink?
Logic puzzle developed by NikoliPlayed on:
I a rectangular lattice of dots, creating ”cells”
I with some cells containing numbers
![Page 4: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/4.jpg)
What is Slitherlink?
Objective of the game is to create a single loop throughout thepuzzle where:
I the final solution is acontinuous line thatdoes not cross itself
I each numbered cellcorresponds to thenumber of solutionlines around it
I the puzzle should haveONLY ONE uniquesolution
![Page 5: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/5.jpg)
Solving a Slitherlink Puzzle
![Page 6: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/6.jpg)
Solving a Slitherlink Puzzle
Conceptis Puzzles Slitherlink Techniques
![Page 7: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/7.jpg)
Solving a Slitherlink Puzzle
Conceptis Puzzles Slitherlink Techniques
![Page 8: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/8.jpg)
Solving a Slitherlink Puzzle
Conceptis Puzzles Slitherlink Techniques
![Page 9: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/9.jpg)
Solving a Slitherlink Puzzle
Conceptis Puzzles Slitherlink Techniques
![Page 10: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/10.jpg)
Solving a Slitherlink Puzzle
Conceptis Puzzles Slitherlink Techniques
![Page 11: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/11.jpg)
Solving a Slitherlink Puzzle
![Page 12: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/12.jpg)
Solving a Slitherlink Puzzle
Solving a Slitherlink puzzle is an NP-complete problem, as well asdetermining if there are multiple solutions.
On the NP-completeness of the Slither Link Puzzle Takayuki YATO
![Page 13: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/13.jpg)
Puzzle Representation
Components of a puzzle:I the grid
I linesI numbers
I rules and contradictions
I contours
I what it means to be solved
![Page 14: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/14.jpg)
The Grid
M by N grid has 3 2D arrays:
I M by N 2D array for numbers; values 0 to 3 or empty
I M + 1 by N 2D array for horizontal lines; values line, x, orempty
I M by N + 1 2D array for vertical lines; values line, x, or empty
A rule-based approach to the puzzle of Slither Link. StefanHerting.
![Page 15: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/15.jpg)
![Page 16: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/16.jpg)
Rules and Contradictions
Each rule has:
I dimensions
I prerequisites
I consequences
Each contradiction has:
I dimensions
I prerequisities
![Page 17: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/17.jpg)
Examples of Rules
![Page 18: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/18.jpg)
Static Rules
Static rules are rules that do not contain lines or x’s in theirprerequisites. We identified 3 static rules.
![Page 19: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/19.jpg)
Rule and Contradiction in action
We chose to cover rules that are at most 3 by 3 in dimension, andcontradictions that are at most 2 by 2 in dimension.
![Page 20: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/20.jpg)
Contours
I Use 2D array to keep track of contour endpoints.
I Update endpoints as we add lines.
I Keep track of the number of open and closed contours as weadd lines.
Table 1: Contour Endpoint Array
3,1 0,1
1,2 0,2 1,3
2,2
numClosed = 0numOpen = 3
![Page 21: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/21.jpg)
How Can We Tell Our Grid is Solved?
I Every number in thegrid is satisfied
I There is exactly oneclosed loop, and noopen loops.
![Page 22: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/22.jpg)
How Can We Tell Our Grid is Solved?
I Every number in thegrid is satisfied
I There is exactly oneclosed loop, and noopen loops.
![Page 23: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/23.jpg)
Applying Rules
I for every position in the grid...
I for every defined rule...I for every orientation...
Do the prerequisites in the rule match where we’re looking at onthe grid?
I If so, add consequences to the grid.
![Page 24: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/24.jpg)
![Page 25: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/25.jpg)
![Page 26: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/26.jpg)
![Page 27: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/27.jpg)
![Page 28: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/28.jpg)
![Page 29: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/29.jpg)
![Page 30: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/30.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 31: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/31.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 32: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/32.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 33: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/33.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules
2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 34: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/34.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 35: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/35.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 36: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/36.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules
3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 37: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/37.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 38: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/38.jpg)
Guessing
Method:
1. Find a particular open position
2. Guess that position is a Line
2.1 Run deterministic rules2.2 If there’s a contradiction, we know the position is an X
3. Guess that position is an X
3.1 Run deterministic rules3.2 If there’s a contradiction, we know the position is a Line
4. If neither results in a contradiction, take the intersection ofthe two resulting grids
![Page 39: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/39.jpg)
![Page 40: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/40.jpg)
![Page 41: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/41.jpg)
![Page 42: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/42.jpg)
![Page 43: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/43.jpg)
Recursive Guessing
If single guesses don’t result in anything, we can nest our guesses.New information from nested guesses propagates out to thecanonical grid.
We call n nested guesses a ”depth n guess”.
![Page 44: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/44.jpg)
Recursive Guessing
If single guesses don’t result in anything, we can nest our guesses.New information from nested guesses propagates out to thecanonical grid.
We call n nested guesses a ”depth n guess”.
![Page 45: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/45.jpg)
Example of a depth 2 guess
Grid
![Page 46: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/46.jpg)
Example of a depth 2 guess
Grid
A
![Page 47: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/47.jpg)
Example of a depth 2 guess
Grid
A
Line X
![Page 48: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/48.jpg)
Example of a depth 2 guess
Grid
A
Line
B
Line X
X
![Page 49: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/49.jpg)
Example of a depth 2 guess
Grid
A
Line
B
Line X
X
C
Line X
![Page 50: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/50.jpg)
Example of a depth 2 guess
Grid
A
Line
B
Line
contradiction
X
X
C
Line X
![Page 51: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/51.jpg)
Example of a depth 2 guess
Grid
A
Line
B
Line
contradiction
X
valid
X
C
Line X
![Page 52: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/52.jpg)
Example of a depth 2 guess
Grid
A
Line
B
X
valid
X
C
Line X
![Page 53: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/53.jpg)
Example of a depth 2 guess
Grid
A
Line
B
X
valid
X
C
Line
contradiction
X
![Page 54: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/54.jpg)
Example of a depth 2 guess
Grid
A
Line
B
X
valid
X
C
Line
contradiction
X
contradiction
![Page 55: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/55.jpg)
Example of a depth 2 guess
Grid
A
Line
B
X
valid
X
contradiction
![Page 56: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/56.jpg)
Example of a depth 2 guess
Grid
A
Line
B
X
![Page 57: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/57.jpg)
Repeated guessing algorithm
I If at any point new information is found, restart algorithm
I Run deterministic rules
I Run every possible guess (depth 1 guessing)
I Run every possible guess, and within each guess, make allpossible guesses (depth 2 guessing)
I · · ·
![Page 58: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/58.jpg)
Repeated guessing algorithm
I If at any point new information is found, restart algorithm
I Run deterministic rules
I Run every possible guess (depth 1 guessing)
I Run every possible guess, and within each guess, make allpossible guesses (depth 2 guessing)
I · · ·
![Page 59: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/59.jpg)
Repeated guessing algorithm
I If at any point new information is found, restart algorithm
I Run deterministic rules
I Run every possible guess (depth 1 guessing)
I Run every possible guess, and within each guess, make allpossible guesses (depth 2 guessing)
I · · ·
![Page 60: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/60.jpg)
Repeated guessing algorithm
I If at any point new information is found, restart algorithm
I Run deterministic rules
I Run every possible guess (depth 1 guessing)
I Run every possible guess, and within each guess, make allpossible guesses (depth 2 guessing)
I · · ·
![Page 61: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/61.jpg)
Repeated guessing algorithm
I If at any point new information is found, restart algorithm
I Run deterministic rules
I Run every possible guess (depth 1 guessing)
I Run every possible guess, and within each guess, make allpossible guesses (depth 2 guessing)
I · · ·
![Page 62: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/62.jpg)
Solving a Slitherlink Puzzle
![Page 63: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/63.jpg)
Solving a Slitherlink Puzzle
![Page 64: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/64.jpg)
Solving a Slitherlink Puzzle
![Page 65: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/65.jpg)
Solving a Slitherlink Puzzle
![Page 66: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/66.jpg)
Solving a Slitherlink Puzzle
![Page 67: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/67.jpg)
Solving a Slitherlink Puzzle
![Page 68: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/68.jpg)
Solving a Slitherlink Puzzle
![Page 69: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/69.jpg)
Solving a Slitherlink Puzzle
![Page 70: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/70.jpg)
Solving a Slitherlink Puzzle
![Page 71: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/71.jpg)
Solving a Slitherlink Puzzle
![Page 72: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/72.jpg)
Solving a Slitherlink Puzzle
![Page 73: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/73.jpg)
Solving a Slitherlink Puzzle
![Page 74: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/74.jpg)
Solving a Slitherlink Puzzle
![Page 75: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/75.jpg)
Solving a Slitherlink Puzzle
![Page 76: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/76.jpg)
Solving a Slitherlink Puzzle
![Page 77: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/77.jpg)
Solving a Slitherlink Puzzle
![Page 78: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/78.jpg)
Solving a Slitherlink Puzzle
![Page 79: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/79.jpg)
Solving a Slitherlink Puzzle
![Page 80: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/80.jpg)
Solving a Slitherlink Puzzle
![Page 81: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/81.jpg)
Solving a Slitherlink Puzzle
![Page 82: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/82.jpg)
Solving a Slitherlink Puzzle
![Page 83: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/83.jpg)
Solving a Slitherlink Puzzle
![Page 84: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/84.jpg)
Solving a Slitherlink Puzzle
![Page 85: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/85.jpg)
Checking for Multiple Solutions
For every guess we made to get to the solution:
I Go back to the state of the grid before the guess was made,and solve the corresponding grid with the opposite guess atthat same spot:
I If the opposite guess eventually leads to a contradiction, weknow that the original guess has to be true (given all previousguesses). Continue to check other guesses.
I If the opposite guess eventually leads to one or more solutions,then we know that this grid has more than one solution.
If the opposite of every guess we had to make leads to acontradiction, then we know that the original solution we found isthe only one.
![Page 86: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/86.jpg)
Checking for Multiple Solutions
For every guess we made to get to the solution:I Go back to the state of the grid before the guess was made,
and solve the corresponding grid with the opposite guess atthat same spot:
I If the opposite guess eventually leads to a contradiction, weknow that the original guess has to be true (given all previousguesses). Continue to check other guesses.
I If the opposite guess eventually leads to one or more solutions,then we know that this grid has more than one solution.
If the opposite of every guess we had to make leads to acontradiction, then we know that the original solution we found isthe only one.
![Page 87: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/87.jpg)
Checking for Multiple Solutions
For every guess we made to get to the solution:I Go back to the state of the grid before the guess was made,
and solve the corresponding grid with the opposite guess atthat same spot:
I If the opposite guess eventually leads to a contradiction, weknow that the original guess has to be true (given all previousguesses). Continue to check other guesses.
I If the opposite guess eventually leads to one or more solutions,then we know that this grid has more than one solution.
If the opposite of every guess we had to make leads to acontradiction, then we know that the original solution we found isthe only one.
![Page 88: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/88.jpg)
Checking for Multiple Solutions
For every guess we made to get to the solution:I Go back to the state of the grid before the guess was made,
and solve the corresponding grid with the opposite guess atthat same spot:
I If the opposite guess eventually leads to a contradiction, weknow that the original guess has to be true (given all previousguesses). Continue to check other guesses.
I If the opposite guess eventually leads to one or more solutions,then we know that this grid has more than one solution.
If the opposite of every guess we had to make leads to acontradiction, then we know that the original solution we found isthe only one.
![Page 89: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/89.jpg)
Checking for Multiple Solutions
For every guess we made to get to the solution:I Go back to the state of the grid before the guess was made,
and solve the corresponding grid with the opposite guess atthat same spot:
I If the opposite guess eventually leads to a contradiction, weknow that the original guess has to be true (given all previousguesses). Continue to check other guesses.
I If the opposite guess eventually leads to one or more solutions,then we know that this grid has more than one solution.
If the opposite of every guess we had to make leads to acontradiction, then we know that the original solution we found isthe only one.
![Page 90: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/90.jpg)
Checking for Multiple Solutions
For every guess we made to get to the solution:I Go back to the state of the grid before the guess was made,
and solve the corresponding grid with the opposite guess atthat same spot:
I If the opposite guess eventually leads to a contradiction, weknow that the original guess has to be true (given all previousguesses). Continue to check other guesses.
I If the opposite guess eventually leads to one or more solutions,then we know that this grid has more than one solution.
If the opposite of every guess we had to make leads to acontradiction, then we know that the original solution we found isthe only one.
![Page 91: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/91.jpg)
Checking for Multiple Solutions
![Page 92: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/92.jpg)
Checking for Multiple Solutions
![Page 93: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/93.jpg)
Checking for Multiple Solutions
![Page 94: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/94.jpg)
Checking for Multiple Solutions
![Page 95: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/95.jpg)
Time Complexity
Important details:
I For each depth, O(mn) new guesses, each taking O(mn) timeto instantiate
I Guessing at the max depth is by far the most important factorin runtime
I We can maximize this by never filling anything in at lowerdepths
![Page 96: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/96.jpg)
Time Complexity
Important details:
I For each depth, O(mn) new guesses, each taking O(mn) timeto instantiate
I Guessing at the max depth is by far the most important factorin runtime
I We can maximize this by never filling anything in at lowerdepths
![Page 97: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/97.jpg)
Time Complexity
Important details:
I For each depth, O(mn) new guesses, each taking O(mn) timeto instantiate
I Guessing at the max depth is by far the most important factorin runtime
I We can maximize this by never filling anything in at lowerdepths
![Page 98: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/98.jpg)
Time Complexity
Important details:
I For each depth, O(mn) new guesses, each taking O(mn) timeto instantiate
I Guessing at the max depth is by far the most important factorin runtime
I We can maximize this by never filling anything in at lowerdepths
![Page 99: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/99.jpg)
Time Complexity
Overall runtime O((mn)d) with d bounded above by O(mn)
Table 2: Empty grid completion time
Size Max Depth Time (sec)3x3 0 0.0011113x3 1 0.0337433x3 2 1.199983x3 3 57.20043x3 4 2587.52
![Page 100: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/100.jpg)
Empirical Results: Typical Puzzles
Table 3: Solve Times
Size Max Depth Solve Time10x10 1 0.048542 seconds10x10 1 0.385348 seconds10x10 2 1.77571 seconds10x10 2 3.23716 seconds10x10 3 150.824 seconds*30x25 1 1.95466 seconds30x25 1 2.38471 seconds30x25 1 4.4892 seconds40x30 1 1.97524 seconds40x30 3 66.268 seconds*
*These puzzles were determined to have multiple solutionsPuzzles taken from nikoli .com, kakuro − online.com, andpuzzle − loop.com.
![Page 101: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/101.jpg)
Make a Slitherlink Puzzle
Overview
1. Make a loop
2. Fill grid with numbers
3. Remove some numbers
![Page 102: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/102.jpg)
Making a Loop
Start with an empty m × n grid, a simple rule, and three lists:
1. available
2. expandable
3. unexpandable
Start with every location in the grid in available but none inunexpandable and expandable. Then, add one random location toexpandable and remove it from available.
![Page 103: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/103.jpg)
Making a Loop
Start with an empty m × n grid, a simple rule, and three lists:
1. available
2. expandable
3. unexpandable
Start with every location in the grid in available but none inunexpandable and expandable. Then, add one random location toexpandable and remove it from available.
![Page 104: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/104.jpg)
Bad Stuff
Rule: When expanding from a location, cur , in expandable to anadjacent location in available , make sure that adding pos toexpandable doesn’t cause any bad stuff
Opposite: Opposite kitty-corners:
If opposite or either of the opposite kitty -corners are inexpandable, then do not add pos to the loop.
![Page 105: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/105.jpg)
Making a Loop cont.
1. Choose a location, cur in expandable at random
2. Look at neighbors to see if and where the loop can expandfrom cur .
2.1 If a neighbor is in available and it wasn’t a valid neighbor,remove it from available
2.2 If there are no valid neighbors, add cur to unexpandable andremove it from expandable
2.3 Otherwise, randomly choose an valid neighbor to add to addto expandable and take out of available
3. repeat until there are no locations in expandable
![Page 106: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/106.jpg)
Making a Loop cont.
1. Choose a location, cur in expandable at random
2. Look at neighbors to see if and where the loop can expandfrom cur .
2.1 If a neighbor is in available and it wasn’t a valid neighbor,remove it from available
2.2 If there are no valid neighbors, add cur to unexpandable andremove it from expandable
2.3 Otherwise, randomly choose an valid neighbor to add to addto expandable and take out of available
3. repeat until there are no locations in expandable
![Page 107: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/107.jpg)
Making a Loop cont.
1. Choose a location, cur in expandable at random
2. Look at neighbors to see if and where the loop can expandfrom cur .
2.1 If a neighbor is in available and it wasn’t a valid neighbor,remove it from available
2.2 If there are no valid neighbors, add cur to unexpandable andremove it from expandable
2.3 Otherwise, randomly choose an valid neighbor to add to addto expandable and take out of available
3. repeat until there are no locations in expandable
![Page 108: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/108.jpg)
Making a Loop cont.
1. Choose a location, cur in expandable at random
2. Look at neighbors to see if and where the loop can expandfrom cur .
2.1 If a neighbor is in available and it wasn’t a valid neighbor,remove it from available
2.2 If there are no valid neighbors, add cur to unexpandable andremove it from expandable
2.3 Otherwise, randomly choose an valid neighbor to add to addto expandable and take out of available
3. repeat until there are no locations in expandable
![Page 109: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/109.jpg)
Making a Loop cont.
1. Choose a location, cur in expandable at random
2. Look at neighbors to see if and where the loop can expandfrom cur .
2.1 If a neighbor is in available and it wasn’t a valid neighbor,remove it from available
2.2 If there are no valid neighbors, add cur to unexpandable andremove it from expandable
2.3 Otherwise, randomly choose an valid neighbor to add to addto expandable and take out of available
3. repeat until there are no locations in expandable
![Page 110: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/110.jpg)
Making a Loop cont.
1. Choose a location, cur in expandable at random
2. Look at neighbors to see if and where the loop can expandfrom cur .
2.1 If a neighbor is in available and it wasn’t a valid neighbor,remove it from available
2.2 If there are no valid neighbors, add cur to unexpandable andremove it from expandable
2.3 Otherwise, randomly choose an valid neighbor to add to addto expandable and take out of available
3. repeat until there are no locations in expandable
![Page 111: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/111.jpg)
Making a Loop Example
![Page 112: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/112.jpg)
Making a Loop Example
![Page 113: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/113.jpg)
Making a Loop Example
![Page 114: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/114.jpg)
Making a Loop Example
![Page 115: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/115.jpg)
Making a Loop Example
![Page 116: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/116.jpg)
Making a Loop Example
![Page 117: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/117.jpg)
Making a Loop Example
![Page 118: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/118.jpg)
Making a Loop Example
![Page 119: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/119.jpg)
Making a Loop Example
![Page 120: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/120.jpg)
Making a Loop Example
![Page 121: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/121.jpg)
Making a Loop Example
![Page 122: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/122.jpg)
Making a Loop Example
![Page 123: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/123.jpg)
Making a Loop Example
![Page 124: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/124.jpg)
Filling with Numbers
Surprise surprise, this is actually really easy
(sum the differences in the neighboring locations)
![Page 125: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/125.jpg)
Removing Numbers
To make puzzles interesting, we want to remove numbersWe want to do so until we have reached a certain countMust retain one unique solution
![Page 126: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/126.jpg)
Removing Numbers
The Process:
1. Pick a number from a set of eligible numbers
2. Add this number to a stack of ineligible numbers
3. Check if eliminating would make the puzzle unsolvable
3.1 If solvable, remove the number from both the grid and set ofeligible numbers
3.2 If unsolvable, only remove the number from the set of eligiblenumbers
4. Repeat until set of eligible numbers is empty
![Page 127: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/127.jpg)
Removing Numbers
The Process:
1. Pick a number from a set of eligible numbers
2. Add this number to a stack of ineligible numbers
3. Check if eliminating would make the puzzle unsolvable
3.1 If solvable, remove the number from both the grid and set ofeligible numbers
3.2 If unsolvable, only remove the number from the set of eligiblenumbers
4. Repeat until set of eligible numbers is empty
![Page 128: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/128.jpg)
Removing Numbers
The Process:
1. Pick a number from a set of eligible numbers
2. Add this number to a stack of ineligible numbers
3. Check if eliminating would make the puzzle unsolvable
3.1 If solvable, remove the number from both the grid and set ofeligible numbers
3.2 If unsolvable, only remove the number from the set of eligiblenumbers
4. Repeat until set of eligible numbers is empty
![Page 129: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/129.jpg)
Removing Numbers
The Process:
1. Pick a number from a set of eligible numbers
2. Add this number to a stack of ineligible numbers
3. Check if eliminating would make the puzzle unsolvable
3.1 If solvable, remove the number from both the grid and set ofeligible numbers
3.2 If unsolvable, only remove the number from the set of eligiblenumbers
4. Repeat until set of eligible numbers is empty
![Page 130: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/130.jpg)
Removing Numbers
The Process:
1. Pick a number from a set of eligible numbers
2. Add this number to a stack of ineligible numbers
3. Check if eliminating would make the puzzle unsolvable
3.1 If solvable, remove the number from both the grid and set ofeligible numbers
3.2 If unsolvable, only remove the number from the set of eligiblenumbers
4. Repeat until set of eligible numbers is empty
![Page 131: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/131.jpg)
Removing Numbers
The Process:
1. Pick a number from a set of eligible numbers
2. Add this number to a stack of ineligible numbers
3. Check if eliminating would make the puzzle unsolvable
3.1 If solvable, remove the number from both the grid and set ofeligible numbers
3.2 If unsolvable, only remove the number from the set of eligiblenumbers
4. Repeat until set of eligible numbers is empty
![Page 132: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/132.jpg)
Removing Numbers
The Process:
1. Pick a number from a set of eligible numbers
2. Add this number to a stack of ineligible numbers
3. Check if eliminating would make the puzzle unsolvable
3.1 If solvable, remove the number from both the grid and set ofeligible numbers
3.2 If unsolvable, only remove the number from the set of eligiblenumbers
4. Repeat until set of eligible numbers is empty
![Page 133: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/133.jpg)
Removing Numbers cont.
Once set of eligible numbers is empty:
1. Pop numbers off ineligible stack
2. Place each back into the set of eligible numbers
3. Do so until most recently eliminated number is found
4. Keep eliminated in the ineligible stack, but place back intogrid
Repeat removing numbers until desired count is reached
![Page 134: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/134.jpg)
Removing Numbers cont.
Once set of eligible numbers is empty:
1. Pop numbers off ineligible stack
2. Place each back into the set of eligible numbers
3. Do so until most recently eliminated number is found
4. Keep eliminated in the ineligible stack, but place back intogrid
Repeat removing numbers until desired count is reached
![Page 135: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/135.jpg)
Removing Numbers cont.
Once set of eligible numbers is empty:
1. Pop numbers off ineligible stack
2. Place each back into the set of eligible numbers
3. Do so until most recently eliminated number is found
4. Keep eliminated in the ineligible stack, but place back intogrid
Repeat removing numbers until desired count is reached
![Page 136: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/136.jpg)
Removing Numbers cont.
Once set of eligible numbers is empty:
1. Pop numbers off ineligible stack
2. Place each back into the set of eligible numbers
3. Do so until most recently eliminated number is found
4. Keep eliminated in the ineligible stack, but place back intogrid
Repeat removing numbers until desired count is reached
![Page 137: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/137.jpg)
Removing Numbers cont.
Once set of eligible numbers is empty:
1. Pop numbers off ineligible stack
2. Place each back into the set of eligible numbers
3. Do so until most recently eliminated number is found
4. Keep eliminated in the ineligible stack, but place back intogrid
Repeat removing numbers until desired count is reached
![Page 138: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/138.jpg)
Removing Numbers cont.
Once set of eligible numbers is empty:
1. Pop numbers off ineligible stack
2. Place each back into the set of eligible numbers
3. Do so until most recently eliminated number is found
4. Keep eliminated in the ineligible stack, but place back intogrid
Repeat removing numbers until desired count is reached
![Page 139: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/139.jpg)
Removing Numbers cont.
It’s too hard!
Improvements
1. Data
2. Rule set
3. Balancing
![Page 140: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/140.jpg)
![Page 141: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/141.jpg)
Ruleset Limitation
As a result, we created two subsets of rules:
I easy: the rules with a greater than 5% occurrence rate
I hard: the rules with a greater than 1% occurrence rate
![Page 142: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/142.jpg)
An ‘Easy’ Puzzle
![Page 143: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/143.jpg)
A Quick Attempt at the ‘Easy’ Puzzle
![Page 144: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/144.jpg)
Balancing the Numbers
![Page 145: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/145.jpg)
A Balanced Easy Puzzle
![Page 146: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/146.jpg)
A Quick Attempt at the ‘Easy’ Puzzle
![Page 147: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/147.jpg)
Time Complexity
Important details
I The Solver is run on the order of mn times.
I Each time the solver is run, it happends with a maximumdepth of one guess which has on the order of O((mn)2) time.
I Therefore, the generator run in the order of O((mn)3) time.
![Page 148: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/148.jpg)
References
Conceptis Puzzles Slitherlink TechniquesOn the NP-completeness of the Slither Link Puzzle Takayuki YATOFinding All Solutions and Instances of Numberlink and Slitherlinkby ZDDs. Ryo Yoshinaka, Toshiki Saitoh, Jun Kawahara, KojiTsuruma, Hiroaki Iwashita and Shin-ichi Minato.
A rule-based approach to the puzzle of Slither Link. StefanHerting.
Puzzles and Games: A Mathematical Modeling Approach. TonyHurlimann, 2015
Solving logical puzzles using mathematical models. KVIS Susanti,S Lukas.
![Page 149: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/149.jpg)
Thank you
![Page 150: Slithering the Link - Carletoncs.carleton.edu/cs_comps/1516/slither/final-results/...Slithering the Link David Anderson, Dan Hamalainen, Edward Kwiatkowski, Valerie Lambert, Sam Spaeth](https://reader033.fdocuments.in/reader033/viewer/2022052009/601de5732e722e741151728b/html5/thumbnails/150.jpg)
Questions?