# Mathematical puzzle

**URL:** <https://boards.straightdope.com/t/mathematical-puzzle/358435>\
**Category:** Factual Questions\
**Created:** [May 27, 2006, 12:33pm UTC](https://boards.straightdope.com/t/mathematical-puzzle/358435 "2006-05-27T12:33:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tappi](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tappi](https://boards.straightdope.com/u/Tappi)\
**Post date:** [May 27, 2006, 12:33pm UTC](https://boards.straightdope.com/t/mathematical-puzzle/358435/1 "2006-05-27T12:33:23Z")

</div>

My Google personalised homepage has a puzzle on it that has me completely stumped. The question is as follows:

> [@](#):
>
> Using the numbers 3, 3, 8, 8 (in any order), make a mathematical expression that equals 24. You can use only addition, subtraction, multiplication, and division (and parentheses), but in any order you wish. Note that you have to use all four numbers; otherwise 3 times 8 would be valid – and that wouldn’t be much of a puzzle, would it?

Any body got a clue how to do it? I don’t think there is a prize or anything, it’s just a bit of fun, but it’s driving me crazy!!

---

<div class="post-metadata">

**Author:** ![chrisk](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisk](https://boards.straightdope.com/u/chrisk)\
**Post date:** [May 27, 2006, 1:35pm UTC](https://boards.straightdope.com/t/mathematical-puzzle/358435/2 "2006-05-27T13:35:18Z")

</div>

[QUOTE=Tappi]

Any body got a clue how to do it? I don’t think there is a prize or anything, it’s just a bit of fun, but it’s driving me crazy!!  
[/QUOTE]

Wow… that’s a toughie!! I actually used my programming skills to solve it systematically… there are 5 possible unambiguous patterns of parenthesization you can use on an expression of 4 values, 6 different orders in which you can use the 8’s and threes, and 4 choices for each of the 3 different operators. That’s a total of 1920 different possible expressions you can build using the rules - I wrote a VB program to generate them all, copied them into OpenOffice Calc, let it evaluate them all, and searched for the one with a value equal to 24. It’s very tricky, involving fractional math at every step… and I can’t think of any better clue to put you on the right track without giving it away.

Answer in spoilers:

8 / (3 - (8 / 3))

8 divided by three is 2 and two thirds

3 subtract 2 and two thirds is one-third

8 divided by one third is the same as eight times three, or 24.

---

<div class="post-metadata">

**Author:** ![Majikthise](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@Majikthise](https://boards.straightdope.com/u/Majikthise)\
**Post date:** [May 28, 2006, 1:11am UTC](https://boards.straightdope.com/t/mathematical-puzzle/358435/3 "2006-05-28T01:11:24Z")

</div>

I managed to find a solution rather quickly by working partly forwards and partly backwards. First, the forward reasoning: Using +,-,/,\* the only values you can make from two 3’s are {0,1,6,9}. Similarly, two 8’s can make {0,1,16,64}, and from one of each you can make {-5,3/8,8/3,5,11}. Now, see whether a solution is possible of the form (\_ op _) op (_ op \_). It is simple to check that there is no way to combine one value from {0,1,6,9} with one from {0,1,16,64} to make 24. Also it is not possible to combine any two elements from {-5,3/8,8/3,5,11} to make 24.

Therefore that symmetric form is not possible, which means that the outermost operator must have 3 or 8 as one of its arguments, resulting in a value of 24. Now we work backwards, and list all the possibilities:

(21) + 3  
(27) - 3  
(8) \* 3  
(72) / 3  
3 - (-21)  
3 / (1/8)  
(I’ve only listed those involving 3, but you get the idea)

Now the problem is to find how to make one of the values in parentheses, using 3 or 8 together with one of the numbers in braces above. There really aren’t that many combinations to check. I found my solution in less time than it took to type up this response.

Here’s a hint:

Try to make 8 / (1/3).

Here’s the solution I found:

8 / (3 - (8 / 3))
