tuzz / square-sum

A solver for the Square Sum problem from a Numberphile video.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Square Sum Problem

Searches for Hamiltonian paths in square sum graphs as described in this YouTube video.

Setup

First, install LKH then run:

ruby generate_graphs.rb
ruby search_for_paths.rb | tee results.txt
watch "cat results.txt | grep 'does not have a path'"

The algorithm generates Hamiltonian Cycle files for use with the LKH solver. We reduce cycle -> path by adding an extra node connected to all others.

About

A solver for the Square Sum problem from a Numberphile video.


Languages

Language:Ruby 100.0%