## 24 challenge (new developments!)

Anything goes, but keep it seemly...
udosuk wrote:JPF, in case you're really using a program, it'd be good fun to discuss about it too.
...
Do you have a comprehensive list? And how could you be sure?

How did you guess ? I haven’t quite finished my homework yet.
I need a bit more time to post something safe.

I’ll PM you some first thoughts on the subject.

JPF

PS: what can I get with 1500 points ? JPF
2017 Supporter

Posts: 3755
Joined: 06 December 2005
Location: Paris, France

The big roller would seem to refute this article emm

Posts: 987
Joined: 02 July 2005

JPF wrote:what can I get with 1500 points ? My advice would be to make up your own riddle threads and award those points to others... Sharing makes the world a nicer place... And thanks for the great article emm... I like to program and often make spelling mistakes... But sometimes I'd point out typos by others too... So I don't know what group I belong to... And BTW seeing underquark has fixed the typo... I decide to not only give him back the missing point but also double his score for being the first to solve the original question... So he's on 100 now (still some distance behind the big roller)... Here is the grand prize: 10000 points for showing a full list of all combinations with unique formulas, with a solid proof/program as evidence...
udosuk

Posts: 2698
Joined: 17 July 2005

### 24 challenge

I couldn't help having a bit of a chuckle when reading emm's above article written by Chris Tomlinson concerning computer programmers' spelling.. It was the second line of the article which made me chuckle but then again, even the spelling checker can't expect to be always perfect. Cec
Cec

Posts: 1039
Joined: 16 June 2005

underquark wrote:I'm pretty sure there is a list of all solutions out there somewhere anyway.

Here is one I made with my program... I found 466 possible cases (out of 715 total combinations of 4 numbers from 0 to 9)... It'd be very appreciated if someone else could verify this figure with another program...

0038: (0+0)+(3*8)
0046: (0+0)+(4*6)
0128: ((0+1)+2)*8
0136: ((0+1)+3)*6
0137: ((0+1)+7)*3
0138: (0+1)*(3*8)
0139: (9-(0+1))*3
0145: ((0+1)+5)*4
0146: (0+1)*(4*6)
0147: (7-(0+1))*4
0148: (4-(0+1))*8
0155: ((5*5)-1)+0
0156: (5-(0+1))*6
0226: ((0+2)+2)*6
0234: (0+2)*(3*4)
0236: ((0+2)+6)*3
0238: (0*2)+(3*8)
0239: (0+2)*(3+9)
0244: ((0+2)+4)*4
0246: (0*2)+(4*6)
0248: (8-(0+2))*4
0257: (0+2)*(5+7)
0258: (5-(0+2))*8
0266: (6-(0+2))*6
0268: ((6*8)/2)+0
0269: ((0+2)*9)+6
0288: ((0+2)*8)+8
0334: ((0+3)+3)*4
0335: ((0+3)+5)*3
0337: (0+3)+(3*7)
0338: (0*3)+(3*8)
0339: ((3*9)-3)+0
0344: (0+3)*(4+4)
0346: (0*3)+(4*6)
0348: (0*4)+(8*3)
0349: (9-(0+3))*4
0358: (0*5)+(8*3)
0359: ((0+3)*5)+9
0366: ((0+3)*6)+6
0367: (7-(0+3))*6
0368: (6-(0+3))*8
0378: (0*7)+(8*3)
0388: (0*8)+(8*3)
0389: ((8*9)/3)+0
0445: (0+4)+(4*5)
0446: (0*4)+(4*6)
0447: ((4*7)-4)+0
0448: ((0+4)*4)+8
0456: (0*5)+(6*4)
0466: (0*6)+(6*4)
0467: (0*7)+(4*6)
0468: (8-(0+4))*6
0469: (0*9)+(4*6)
0478: (7-(0+4))*8
0488: ((0+4)*8)-8
0566: ((0+5)*6)-6
0569: (9-(0+5))*6
0588: (8-(0+5))*8
0689: (9-(0+6))*8
0699: (0+6)+(9+9)
0789: (0+7)+(8+9)
0888: (0+8)+(8+8)
1118: ((1+1)+1)*8
1126: ((1+1)+2)*6
1127: (1+2)*(7+1)
1128: ((1*1)+2)*8
1129: (1+2)*(9-1)
1134: (1+1)*(3*4)
1135: (1+3)*(5+1)
1136: ((1+1)+6)*3
1137: ((1*1)+7)*3
1138: ((3*8)-1)+1
1139: (1+1)*(3+9)
1144: ((1+1)+4)*4
1145: ((1*1)+5)*4
1146: ((4*6)-1)+1
1147: (7-(1*1))*4
1148: (8-(1+1))*4
1149: (1-4)*(1-9)
1155: ((5*5)*1)-1
1156: (5-(1*1))*6
1157: (1+1)*(5+7)
1158: (5-(1+1))*8
1166: (6-(1+1))*6
1168: 8/((1+1)/6)
1169: ((1+1)*9)+6
1188: ((1+1)*8)+8
1224: (1+2)*(2*4)
1225: (1+5)*(2+2)
1226: (1+2)*(2+6)
1227: (7-1)*(2+2)
1228: (2-(1-2))*8
1229: ((1+2)+9)*2
1233: (1+3)*(3*2)
1234: ((1+2)+3)*4
1235: ((1+2)+5)*3
1236: (3-(1-2))*6
1237: (1+2)+(3*7)
1238: (2-1)*(3*8)
1239: (3*9)-(1+2)
1244: (1+2)*(4+4)
1245: (5-(1-2))*4
1246: (2-1)*(4*6)
1247: ((1-2)+7)*4
1248: ((1-2)+4)*8
1249: (9-(1+2))*4
1255: ((5*5)-2)+1
1256: ((1-2)+5)*6
1257: (1*2)*(5+7)
1258: ((5+8)-1)*2
1259: ((1+2)*5)+9
1266: ((1+2)*6)+6
1267: (7-(1+2))*6
1268: (6-(1+2))*8
1269: ((1*2)*9)+6
1277: ((7*7)-1)/2
1278: (1+7)+(8*2)
1279: ((9*2)-1)+7
1288: ((1*2)*8)+8
1289: 9/((1+2)/8)
1333: (1+3)*(3+3)
1334: ((1+3)+4)*3
1335: ((1*3)+5)*3
1336: (6-(1-3))*3
1337: ((3*7)*1)+3
1338: ((1+8)*3)-3
1339: (1+3)*(9-3)
1344: (4-(1-3))*4
1345: (1+3)+(4*5)
1346: 6/(1-(3/4))
1347: (4*7)-(1+3)
1348: ((1+3)*4)+8
1349: (9-(1*3))*4
1356: (1+5)+(6*3)
1357: (3-1)*(5+7)
1358: ((1-3)+5)*8
1359: ((1*3)*5)+9
1366: ((1-3)+6)*6
1367: (7-(1*3))*6
1368: (8-(1+3))*6
1369: 6-((1-3)*9)
1377: (1-7)*(3-7)
1378: (7-(1+3))*8
1379: (1+7)*(9/3)
1388: ((1+3)*8)-8
1389: ((8*9)/3)*1
1399: (9-1)*(9/3)
1444: ((1+4)*4)+4
1445: ((4*5)*1)+4
1446: ((1+6)*4)-4
1447: ((4*7)*1)-4
1448: ((1*4)*4)+8
1449: ((1-4)+9)*4
1455: ((5*4)-1)+5
1456: 4/(1-(5/6))
1457: ((7*4)-5)+1
1458: (1+5)*(8-4)
1459: 9-((1-4)*5)
1466: ((1+4)*6)-6
1467: ((1-4)+7)*6
1468: ((1-4)+6)*8
1469: (9-(1+4))*6
1477: (1+7)*(7-4)
1478: (7-(1*4))*8
1479: (1-9)*(4-7)
1488: (8-(1+4))*8
1489: 9/((4-1)/8)
1555: (5-(1/5))*5
1556: (5*6)-(1+5)
1559: (1+5)*(9-5)
1566: ((1*5)*6)-6
1567: ((5*6)-7)+1
1568: ((1-5)+8)*6
1569: (9-(1*5))*6
1578: ((1-5)+7)*8
1579: (1-7)*(5-9)
1588: ((5-1)*8)-8
1589: (9-(1+5))*8
1599: (1+5)+(9+9)
1666: ((6-1)*6)-6
1668: 6/(1-(6/8))
1669: ((1-6)+9)*6
1679: (1+7)*(9-6)
1688: ((1-6)+8)*8
1689: (1+6)+(8+9)
1699: ((9+9)*1)+6
1779: (1+7)+(7+9)
1788: (1+7)+(8+8)
1789: ((8+9)*1)+7
1799: ((9+9)-1)+7
1888: ((8+8)*1)+8
1889: ((8+9)-1)+8
2223: (2+2)*(2*3)
2224: ((2+2)+2)*4
2225: ((2*5)+2)*2
2227: ((2*7)-2)*2
2228: ((2+2)+8)*2
2229: ((2+9)*2)+2
2233: (2+2)*(3+3)
2234: ((2+2)+4)*3
2235: ((5*2)-2)*3
2236: ((2/2)+3)*6
2237: ((3+7)+2)*2
2238: ((3*8)-2)+2
2239: (2+2)*(9-3)
2244: ((2*4)+4)*2
2245: (2+2)+(4*5)
2246: ((4*6)-2)+2
2247: (4*7)-(2+2)
2248: ((2+2)*4)+8
2249: ((4+9)*2)-2
2255: ((5+5)+2)*2
2256: ((5+6)*2)+2
2257: (2*5)+(7*2)
2258: ((5+8)*2)-2
2259: ((5+9)-2)*2
2266: (2+6)*(6/2)
2267: ((6+7)*2)-2
2268: (8-(2+2))*6
2269: ((9*2)-6)*2
2277: ((7+7)-2)*2
2278: (7-(2+2))*8
2288: ((2+2)*8)-8
2289: ((9*2)-2)+8
2333: ((2+3)+3)*3
2335: ((3*5)-3)*2
2336: (3-(2-3))*6
2337: (7-(2-3))*3
2338: (3-2)*(3*8)
2339: ((2+3)*3)+9
2344: ((2+3)*4)+4
2345: (5-(2-3))*4
2346: (3-2)*(4*6)
2347: ((2-3)+7)*4
2348: ((2-3)+4)*8
2349: ((4*9)/3)*2
2355: ((5*5)-3)+2
2356: ((2-3)+5)*6
2357: ((7*3)-2)+5
2358: ((3+5)*2)+8
2359: (2*3)*(9-5)
2366: ((2+3)*6)-6
2367: ((6*7)/2)+3
2368: ((3*6)-2)+8
2369: (9-(2+3))*6
2377: (2*7)+(7+3)
2378: ((7+8)-3)*2
2379: ((7+9)/2)*3
2388: (8-(2+3))*8
2389: (9-(2*3))*8
2399: (2*3)+(9+9)
2444: (4-(2-4))*4
2445: ((2+5)*4)-4
2446: ((4+6)*2)+4
2447: (2*4)*(7-4)
2448: (2+4)*(8-4)
2449: ((9-2)*4)-4
2455: ((5+5)*2)+4
2456: (5*6)-(2+4)
2457: (4-2)*(5+7)
2458: ((5*8)/2)+4
2459: (2+4)*(9-5)
2466: ((2-4)+6)*6
2467: ((7*4)-6)+2
2468: ((6+8)*2)-4
2469: 6-((2-4)*9)
2477: ((7+7)*2)-4
2478: ((7*8)/2)-4
2479: (2*4)+(7+9)
2488: 8-((2-4)*8)
2489: (9-(2+4))*8
2499: (2+4)+(9+9)
2557: (2*7)+(5+5)
2558: ((5/5)+2)*8
2559: 9-((2-5)*5)
2566: 6-((2-5)*6)
2567: ((2-5)+7)*6
2568: ((2-5)+6)*8
2569: (6/(2/5))+9
2577: (2*5)+(7+7)
2578: ((2*5)-7)*8
2579: (5*7)-(2+9)
2588: (8*5)-(2*8)
2589: (2+5)+(8+9)
2666: ((6*6)/2)+6
2667: ((6*7)+6)/2
2668: ((2-6)+8)*6
2669: (2+6)*(9-6)
2678: ((2-6)+7)*8
2679: (2+6)+(7+9)
2688: (2+6)+(8+8)
2689: ((2*6)-9)*8
2699: ((9+9)-6)*2
2778: (2+7)+(7+8)
2788: ((2-7)+8)*8
2789: ((9+7)*2)-8
2888: ((8+8)*2)-8
2889: ((2-8)+9)*8
2899: ((9+9)-2)+8
3333: ((3*3)*3)-3
3334: ((3+4)*3)+3
3335: (3*3)+(3*5)
3336: (3+3)+(3*6)
3337: (3+3)*(7-3)
3338: ((3+3)-3)*8
3339: (9-(3/3))*3
3344: (3*4)+(4*3)
3345: ((4+5)*3)-3
3346: ((4*6)-3)+3
3347: ((4+7)-3)*3
3348: (3+3)*(8-4)
3349: ((9-4)+3)*3
3355: (5*5)-(3/3)
3356: (5*6)-(3+3)
3357: ((3*5)-7)*3
3359: (3+3)*(9-5)
3366: ((6/3)+6)*3
3367: ((7*3)-3)+6
3368: ((3*3)-6)*8
3369: (3*3)+(6+9)
3377: ((3/7)+3)*7
3378: (3*3)+(7+8)
3379: ((7*9)/3)+3
3388: 8/(3-(8/3))
3389: (9-(3+3))*8
3399: (3+3)+(9+9)
3444: ((3+4)*4)-4
3445: (5-(3-4))*4
3446: (4-3)*(4*6)
3447: ((3-4)+7)*4
3448: ((3+4)-4)*8
3449: (4*9)-(3*4)
3455: ((5*5)-4)+3
3456: ((3-4)+5)*6
3457: (3*4)+(5+7)
3458: ((8-5)+3)*4
3459: ((9-5)+4)*3
3466: (3*4)+(6+6)
3468: ((3*4)-8)*6
3469: ((9-6)+3)*4
3477: ((7*4)-7)+3
3478: 8-((3-7)*4)
3479: (3*4)*(9-7)
3489: (3+4)+(8+9)
3499: ((9+9)/3)*4
3556: ((5+5)*3)-6
3557: (5-3)*(5+7)
3558: ((3+5)-5)*8
3559: ((9/5)+3)*5
3566: ((3-5)+6)*6
3567: ((6+7)-5)*3
3568: 8/((5-3)/6)
3569: (3+5)*(9-6)
3578: ((8-5)*7)+3
3579: (3+5)+(7+9)
3588: (3+5)+(8+8)
3589: ((8-5)*9)-3
3599: (9/(3/5))+9
3666: 6-((3-6)*6)
3667: ((3-6)+7)*6
3668: ((3+6)-6)*8
3669: (3+6)+(6+9)
3677: ((7/7)+3)*6
3678: (3+6)+(7+8)
3679: ((9-7)+6)*3
3688: ((8/8)+3)*6
3689: 9/((6-3)/8)
3699: ((9/9)+3)*6
3777: (3+7)+(7+7)
3778: ((3+7)-7)*8
3779: (9-(7/7))*3
3788: ((7-3)*8)-8
3789: ((9-8)+7)*3
3799: ((9/9)+7)*3
3888: ((3+8)-8)*8
3889: (3*8)*(9-8)
3899: (3*8)+(9-9)
3999: ((9+9)-3)+9
4444: (4+4)+(4*4)
4445: ((4/4)+5)*4
4446: ((4+4)-4)*6
4447: (4+4)*(7-4)
4448: (4*8)-(4+4)
4449: ((9-4)*4)+4
4455: ((5+5)-4)*4
4456: (5-(4/4))*6
4457: ((7-5)+4)*4
4458: ((4+4)-5)*8
4468: ((8-6)+4)*4
4469: (4+4)*(9-6)
4477: (4-(4/7))*7
4478: ((8-4)*7)-4
4479: (4+4)+(7+9)
4488: (4+4)+(8+8)
4489: (9*4)-(4+8)
4555: ((5*5)-5)+4
4556: ((4+5)-5)*6
4557: (7-(5/5))*4
4558: (4-(5/5))*8
4559: ((9-5)*5)+4
4566: ((6/6)+5)*4
4567: ((7-6)+5)*4
4568: ((4+5)-6)*8
4569: (4+5)+(6+9)
4577: ((7/7)+5)*4
4578: (4+5)+(7+8)
4579: ((9-5)*7)-4
4588: ((8/8)+5)*4
4589: ((9-8)+5)*4
4599: ((9/9)+5)*4
4666: ((4+6)-6)*6
4667: (4*6)*(7-6)
4668: (4+6)+(6+8)
4669: 6-((4-6)*9)
4677: (4+6)+(7+7)
4678: ((4+6)-7)*8
4679: ((7+9)/4)*6
4688: 8-((4-6)*8)
4689: ((8*9)/4)+6
4699: (4*6)+(9-9)
4777: (7-(7/7))*4
4778: ((7-8)+7)*4
4788: ((4+7)-8)*8
4789: 9/((7-4)/8)
4799: (7-(9/9))*4
4888: ((8*8)/4)+8
4889: ((4+8)-9)*8
4899: (4-(9/9))*8
5555: (5*5)-(5/5)
5556: (5*5)+(5-6)
5559: (5+5)+(5+9)
5566: ((5+5)-6)*6
5567: (5*5)+(6-7)
5568: (5+5)+(6+8)
5577: (5+5)+(7+7)
5578: ((5+5)-7)*8
5588: (5*5)-(8/8)
5589: (5*5)+(8-9)
5599: (5*5)-(9/9)
5666: (5-(6/6))*6
5667: (5+6)+(6+7)
5668: 6-((5-8)*6)
5669: (6*9)-(5*6)
5677: (5-(7/7))*6
5678: ((7-8)+5)*6
5679: 6-((5-7)*9)
5688: ((5+6)-8)*8
5689: ((8-9)+5)*6
5699: (5-(9/9))*6
5779: (5+7)*(9-7)
5788: 8-((5-7)*8)
5789: ((5+7)-9)*8
5888: (5*8)-(8+8)
5889: 9/((8-5)/8)
6666: (6+6)+(6+6)
6668: ((6+6)-8)*6
6669: ((9-6)*6)+6
6679: (6+6)*(9-7)
6688: 6/((8-6)/8)
6689: ((6+6)-9)*8
6789: (6*8)/(9-7)
6799: (6*7)-(9+9)
6888: 8-((6-8)*8)
6889: (8*9)-(6*8)
6899: ((9+9)/6)*8
7889: 8-((7-9)*8)

Thanks!
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:Here is one I made with my program... I found 466 possible cases (out of 715 total combinations of 4 numbers from 0 to 9)... It'd be very appreciated if someone else could verify this figure with another program...

I agree with the list of the 466 numbers.
I didn't check the formula...

So the next question is : what are the numbers with a unique solution ?
To be precise , let's agree that for 1235 :
((1+2)+5)*3
3*((2+1)+5)
are the same solution.

What do you think ?

JPF
JPF
2017 Supporter

Posts: 3755
Joined: 06 December 2005
Location: Paris, France

That's exactly the question I'm working at - the grand prize of 10000 points... I could program out the duplications described by you, but there are other "implicit" duplications which are hard to pick out, e.g.

(3-1)*9+6
6-(1-3)*9

(8/2)*7-4
7/(2/8)-4

Should we consider them as duplicates?

It seems a pretty good computing assignment to write a program to find all the combinations with unique formulas... Perhaps I should post this in the programming forum... udosuk

Posts: 2698
Joined: 17 July 2005

Some clever Dutch programmer wrote:Via deze pagina kunt u 4x6-Oplossingen downloaden. Met dit programma kunt u alle oplossingen zoeken voor "4x6-game". Doel van het spel is om met 4 willekeurige getallen bijvoorbeeld de uitkomst 24 te vinden door de 4 getallen te delen/op te tellen/af te trekken/te vermenigvuldigen. Klik hieronder op "download" om het programma op te slaan. Met MinUnzip kunt u het programma uitpakken.

See:
http://home.planet.nl/~edejong/4x6-oplossingen/home.html
underquark

Posts: 299
Joined: 06 September 2005

udosuk wrote:I could program out the duplications described by you, but there are other "implicit" duplications which are hard to pick out, e.g.

(3-1)*9+6
6-(1-3)*9

(8/2)*7-4
7/(2/8)-4

Should we consider them as duplicates?

If * is an operation :
"x*y" is equivalent to "y*x" if * is a commutative operation.

Let's write "x*y"~"y*x"

So :
"1+2" ~ "2+1"
"(1+2)+5" ~ "5+(2+1)"

and

"3*((2+1)+5)" ~ "(5+(1+2))*3"

"3*((2+1)+5)" and "(5+(1+2))*3" are duplicates

but :

"(3-1)*9+6" is not equivalent to "6-(1-3)*9"

and therefore

"(3-1)*9+6 " and "6-(1-3)*9" are two different solutions.

JPF
JPF
2017 Supporter

Posts: 3755
Joined: 06 December 2005
Location: Paris, France

I found 37 numbers with a unique solution :
Code: Select all
`1118116911881277134615551666166822252227222922352258244924552477255825782789333333393357336633773388344437794445447745574558459947774799489956665677`

It'd be very appreciated if someone else could verify this figure ... (for the solutions, see udosuk's previous post)

For 1,4,5,6 :
the clever Dutch programmer wrote:
Code: Select all
`1456 : 4/(1-(5/6)) = 24 `

Code: Select all
`1456 : 6/((5/4)-1) = 24 `
which is not equivalent.

JPF
JPF
2017 Supporter

Posts: 3755
Joined: 06 December 2005
Location: Paris, France

JPF, I don't think your list is comprehensive enough... For example:

4*4+4+4
5*5-5/5

Should be included in the list... Probably more...

It's a big challenge to write a 100% working program... I wish some of the solver programmers could take this up...
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:JPF, I don't think your list is comprehensive enough... For example:
4*4+4+4
5*5-5/5

You are right : 5555 should be part of the list.

But not 4444 :
In my opinion, (4*4)+(4+4) and ((4*4)+4)+4 are 2 different solutions.
In one case we add 16+8 and in the other one 16+4 and 20+4.

We need first to agree on the definitions JPF
JPF
2017 Supporter

Posts: 3755
Joined: 06 December 2005
Location: Paris, France

Let's first define what structure we're doing with... I reckon the Algebraic Field is a good one...

You've decided to adopt the commutative property, so why not pick the associative property too?

Definition of Field wrote:For all a, b, c in F, a + (b + c) = (a + b) + c and a * (b * c) = (a * b) * c.

However, it might make the programming trickier...

For example:

(7+9)+(9-1)
(7+9)-(1-9)
(7-1)+(9+9)
(9-1)+(7+9)

You might want to define them as different, but IMO they're all the same:
7+9+9-1
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:You might want to define them as different, but IMO they're all the same

OK, udosuk ; even if you are not #9, you are the boss in this thread. udosuk wrote:However, it might make the programming trickier...
Let's try.

JPF
JPF
2017 Supporter

Posts: 3755
Joined: 06 December 2005
Location: Paris, France

Still working at it...

A few weeks ago, I was #9 and not the boss...

Now the boss is #9 and I'm the boss in this thread...

Strange turnaround... udosuk

Posts: 2698
Joined: 17 July 2005

PreviousNext 