I expected this to just be a little dorky thing of mine, but it appears to be interesting to a lot of my friends. So what the hell, for your possible enjoyment.
My roommate has a little puzzle called a cubesnake. Looks like this while unfolded:
And the idea is that you try to fold it up into a 3x3x3 cube, like this:
As people played with it over the quarter, it was only a matter of time really until someone broke it. So we went to go buy a new one and found 3 different places selling them. Interested in what different puzzles we might find, my roommate ordered all 3. We then discovered that they are all the same puzzle.
Now I'm sure if you think about it for a while you can see that there is more than one way to make a puzzle like this. But how many, exactly? I wrote a program in C++ to figure it out.
How many would you expect? I find this an interesting exercise in human estimation. Answer in the tags.
Don't read on before you guess!
Naturally this spawned curiosity about other sizes. So after adapting the program to fit any dimensions and optomizing a little, I started it to work on 4x4x4 on Monday night. Midday Tuesday the program crashed when it found the 1,000,000th solution, exceeding the memory allocated for solution storage.
I reworked the code to let any number of snakes in, looked through the logs and developed a rough heuristic to estimate the total number of 4x4x4 snakes based on how fast it finds them in the first 12 hours. In total I estimate there are 75 million 4x4x4 snakes that can be folded at least one way into a cube. I also estimated that the program, had it not crashed, would have taken until early April to finish.
So I backed down a little and started it on a 4x3x3 rectangular solid. That started Wednesday, and is still going. It's found 630,319 so far, and my hueristic estimates it will find 1.75 million. It should be finished by late next week.
Here is the results output text file from 3x3x3:
results.txt
My roommate has a little puzzle called a cubesnake. Looks like this while unfolded:
And the idea is that you try to fold it up into a 3x3x3 cube, like this:
As people played with it over the quarter, it was only a matter of time really until someone broke it. So we went to go buy a new one and found 3 different places selling them. Interested in what different puzzles we might find, my roommate ordered all 3. We then discovered that they are all the same puzzle.
Now I'm sure if you think about it for a while you can see that there is more than one way to make a puzzle like this. But how many, exactly? I wrote a program in C++ to figure it out.
How many would you expect? I find this an interesting exercise in human estimation. Answer in the tags.
There are 11,487 snakes that can be solved to at least one 3x3x3 cube.
Naturally this spawned curiosity about other sizes. So after adapting the program to fit any dimensions and optomizing a little, I started it to work on 4x4x4 on Monday night. Midday Tuesday the program crashed when it found the 1,000,000th solution, exceeding the memory allocated for solution storage.
I reworked the code to let any number of snakes in, looked through the logs and developed a rough heuristic to estimate the total number of 4x4x4 snakes based on how fast it finds them in the first 12 hours. In total I estimate there are 75 million 4x4x4 snakes that can be folded at least one way into a cube. I also estimated that the program, had it not crashed, would have taken until early April to finish.
So I backed down a little and started it on a 4x3x3 rectangular solid. That started Wednesday, and is still going. It's found 630,319 so far, and my hueristic estimates it will find 1.75 million. It should be finished by late next week.
Here is the results output text file from 3x3x3:
results.txt