the Ultimate Solver

Now I am finally done with the new solver. It gives no gimmick solutions. All solutions are entirely distinct from each other according the the rules on the theory page. And I believe my theory is pretty close to how humans judge distinctiveness among different solutions.

Now what? Now I am going to go read Anthony Bourdain’s “Kitchen confidential”.

New Solver!

Now the theory is complete!


Check out the new solver which gives no gimmick solutions. Pretty much all solutions are reasonably distinct. Except solutions like 4 * 6 *7 / 7 and 4 * 6 + 7 – 7 are treated as distinct solutions.

I think it’s debatable if they are different and I will just leave them as is.

Will update all other pages to reflect the completeness of the solver.


Edit: On second thought, 4 * 6 * 7 / 7 and 4 * 6 + 7 – 7 should be treated as the same solution, will finish this over the weekend.


CSS float

If you view the site on your Chrome/Safari/Firefox browser, you see what the site is designed to look like. IE on the other hand, acts up on my CSS file (which is stolen from nearlyfreespeech).

Tried a couple of things and gave up. My hack on the problem is to change all the floating objects in the CSS to fixed positions.  So, go download a Chrome or Firefox browser. IE blows.

Almost done, I will redirect the ocf.berkeley links here over the weekend.


The site

I have been researching for the right webhosting service (and domain registration all that) for a while. Of course with the SOPA drama, Godaddy is the first thing that I would not consider.

After reading a bit of the comments on reddit,  I was convinced that  nearlyfreespeech might be worth trying. So far so good. And I actually like the layout on their site. And I have hence used their css file. So don’t be surprised that 24theory looks just like nearlyfreespeech.



I first played 24 the math game in 1984, I think.  The way we played was that we randomly pull out 4 poker cards and winner takes back all the 4 cards.  The one with all the cards at the end wins the game.  So it’s great for 2 or 4 players, we need to modify the rule at the end when less than 4 remain in the game.

It is a great way to draw kids into maths, science and other good stuff.

Fast forward to 2009, my then girlfriend and I played again to kill some time in boring New York. As someone with some street credit in maths, I found myself constantly beaten by my girlfriend. Frustrated, I decided to code up some perl script to solve the game for me. This was hosted on Not satisfied with the original solver which only gives a solution (1x2x3x4 for the quadruple {1,2,3,4}),  I coded up a script to give all possible solutions with some redundancies reduced: (3+2+1)×4,  (4+2)×(3+1) and 1x2x3x4.

Note: given  1x2x3x4,  4x3x2x1 is considered a redundant solution.

There are still more work to be done. For example, given quadruple {1,3,6,10}, my current solver gives 3 solutions: 10×3×1-6,  10×3-6×1, (10×3-6)×1.

They look different topologically, but they are all just 10×3×1-6.