Tag Archives: puzzle

COMP 401 == fun

I have been taking a Computer Science class this semester to hone my self-taught programming skills. I’m really glad that I decided to go through with it. It was nice to be back in the classroom, and the Prof, Dr. Stephen Weiss, made it quite enjoyable.

Dr. Weiss has been around for a large percentage of the entirety of Computer Science, and translates all of that experience into really cool lessons, asides, and tangents in the class. Before taking the class I had no idea how punch-card or tape-based systems would sort a large set of values (or do anything, for that matter). In teaching basic sort algorithms by relating them to historical systems like this, Dr. Weiss puts a more imaginable perspective on what is really going on behind the aluminum and gloss of my little lappy.

The kicker that tied this together came on Tuesday, when he described the Turing Machine, which is an incredibly simple theoretical machine, first described in 1936, that can do anything that any computer can do, from punch-card machine to MacBook Pro.

All of the assignments could be approached as puzzles, which made completing them particularly satisfying. I just finished the final assignment, a 9-square puzzle solver. You start with nine cards with values on each edge, then rearrange them, position and rotation, so that all the touching edges add up to 0. There are 49*9! (=95,126,814,720) possible arrangements, which, if you went through all of them, would take even a modern computer a while. So the problem is to eliminate possibilities as you go, which is called pruning. Here is the output of my solution: