Tuesday, 07 July 2009

  • Where is the fun?

    I'm continuously trying to find ways to occupy my easily bored brain. I've been reading "Kitchen Science" by Howard Hillman and watching episodes of The Twilight Zone. I did go to Sea World and Disney World in consecutive days several days ago (with my girlfriend), but since then reading and watching Twilight Zone is all. Oh yeah, I almost forgot the many hours I spent thinking of the code for a program that would solve any sudoku. Unfortunately, my pursuit at programming the sudoku solver ended in failure.

    Kitchen Science is a great book if you want to learn interesting science about food and even some history about food. I bet you didn't know that once upon a time the London Broil was a cow's flanks but after World War II the London Broil became so popular that butchers had to market the round beef as the London Broil. Hell, if I got something wrong here I really don't care. I bet you also didn't know that the reason visible ice forms in ice cream is because the ice cream was exposed to relatively high temperatures for too long allowing the water in the ice cream to separate from the fat and form large ice crystals. There you go: the book has a lot of interesting facts.

    I have never seen Twilight Zone as far as I know before july 4th 2009 when there was a Twilight Zone marathon on the Sci Fi channel for the entire day that day. I think the marathon got so much attention they extended it to July 5th so I saw about five episodes before there was no more marathon :(. I was really sad when the marathon was over but I quickly remembered that just about anything on TV is very likely to be on the internet. Now I continue to watch episodes on the internet through Veoh and CBS . I felt like I was in some one of Twilight Zone's twisted happy endings.

    Before Twilight Zone and before realizing how much fun Kitchen Science could be, my mind was focused on solving every sudoku possible. I don't mean that I was actually going to solve every sudoku possible because that would probably take more than one life time. What's funny is that probability has a lot to do with how I went at creating the program that would solve all sudoku puzzles. After many days of jotting down barely helpful notes and sleeping on the problem, I finally came to a great realization as to how the any sudoku could be solved. The program would insert a random number in all squares without numbers in them already and then compare each square to all the other squares in their row and column to make sure there are no repeats and if there were repeats the squares with a random numbers would be blank again and the process would repeat. In theory, this would solve any sudoku with no problem. I actually tried my code with a smaller version of sudoku with a 9 by 9 board where each square holds an integer between 1 and 3  and the program sucessfully solved any combination in seconds. However, when I tried a 9 by 9,  the program was taking a long time. I took a while to realize that the odds of all the numbers coming in place was very very very unlikely  (let's say about 1/9 ^ 60).

    what do you do for fun?

  • Choose Identity

  • Give eProps (?)

  • New! You can now edit your comments for 15 minutes after submitting.

Who recommended?