Pals, after a whole weekend's hardwork I think I've finally compiled a reliant program to work out what combinations have unique formulas...
A formula is unique if all other
inequivalent formulas using the same 4 numbers do not result in the same answer (24). 2 formulas are
equivalent if when all numbers are assigned as letters (variables) one could be algebraically converted to another. For example:
(7+9)+(9-1) and (9+9)-(1-7) are equivalent because (a+b)+(b-c)=(b+b)-(c-a) is always true for all a,b,c...
(4*4)+(4+4) and ((4*4)+4)+4 are equivalent because (a*a)+(a+a)=((a*a)+a)+a is always true for all a...
(3-1)*9+6 and 6-(1-3)*9 are equivalent because (a-b)*c+d=d-(b-a)*c is always true for all a,b,c,d...
(8/2)*7-4 and 7/(2/8)-4 are equivalent because (a/b)*c-d and c/(b/a)-d is always true for all a,b,c,d...
But (3+0)*(8*1) and (3-0)*(8/1) are
NOT equivalent because (a+b)*(c+d) and (a-b)*(c/d) are
NOT always equal...
As you shall see, combinations with 0 or 1 are very hard (0 much more so) to produce unique formulas because of the "versatility" of 0 & 1...
Anyway here are the lists of all unique combinations for 0..9 and 1..X (X=10), as well as those with 2 possible formulas:
0..9, unique formula (total 104):
1118, 1127, 1129, 1134, 1135, 1144, 1149, 1158, 1168, 1169, 1188, 1224, 1229, 1233, 1255, 1277, 1346, 1377, 1379, 1399, 1469, 1477, 1479, 1555, 1559, 1568, 1579, 1599, 1666, 1668, 1669, 1679, 1779, 1788, 1799, 1889, 2225, 2227, 2229, 2235, 2257, 2258, 2259, 2277, 2289, 2377, 2449, 2455, 2477, 2489, 2499, 2557, 2558, 2569, 2577, 2578, 2579, 2789, 2889, 3333, 3335, 3339, 3355, 3357, 3366, 3377, 3378, 3388, 3444, 3456, 3478, 3779, 3789, 4444, 4445, 4449, 4457, 4477, 4489, 4557, 4558, 4568, 4569, 4599, 4679, 4777, 4799, 4889, 4899, 5555, 5559, 5568, 5588, 5599, 5666, 5668, 5669, 5677, 5679, 5779, 6688, 6789, 6888, 7889
0..9, 2 formulas (total 106):
0699, 0789, 0888, 1126, 1157, 1166, 1225, 1227, 1228, 1245, 1247, 1279, 1333, 1336, 1338, 1356, 1357, 1378, 1444, 1446, 1449, 1455, 1456, 1457, 1458, 1459, 1466, 1467, 1556, 1567, 1578, 1688, 2223, 2234, 2237, 2244, 2249, 2255, 2266, 2267, 2269, 2333, 2335, 2345, 2389, 2447, 2457, 2479, 2559, 2566, 2588, 2678, 2689, 2699, 2778, 2899, 3334, 3337, 3344, 3347, 3368, 3445, 3447, 3455, 3459, 3469, 3556, 3557, 3559, 3566, 3567, 3588, 3589, 3599, 3677, 3777, 4447, 4468, 4469, 4478, 4479, 4555, 4559, 4567, 4577, 4588, 4589, 4778, 5556, 5567, 5578, 5589, 5688, 5689, 5699, 5788, 5789, 5888, 5889, 6666, 6668, 6669, 6679, 6689, 6889, 6899
1..X, unique formula (total 166):
1118, 1127, 1129, 1134, 1135, 113X, 1144, 1149, 114X, 1158, 1168, 1169, 117X, 1188, 1224, 1229, 1233, 1255, 1277, 128X, 1346, 1377, 1379, 138X, 1399, 139X, 13XX, 1469, 146X, 1477, 1479, 149X, 1555, 1559, 155X, 1568, 1579, 1599, 15XX, 1666, 1668, 1669, 1679, 1779, 1788, 1799, 179X, 1889, 188X, 2225, 2227, 2229, 2235, 223X, 2257, 2258, 2259, 2277, 227X, 2289, 229X, 2377, 23XX, 2449, 2455, 245X, 2477, 2489, 2499, 24XX, 2557, 2558, 255X, 2569, 2577, 2578, 2579, 259X, 277X, 2789, 2889, 29XX, 3333, 3335, 3339, 3355, 3357, 3366, 3377, 3378, 3388, 339X, 3444, 344X, 3456, 3478, 34XX, 35XX, 366X, 367X, 368X, 3779, 3789, 388X, 399X, 39XX, 4444, 4445, 4449, 4457, 4477, 447X, 4489, 44XX, 4557, 4558, 455X, 4568, 4569, 457X, 4599, 466X, 4679, 4777, 478X, 4799, 47XX, 4889, 4899, 489X, 499X, 5555, 5559, 5568, 557X, 5588, 5599, 559X, 55XX, 5666, 5668, 5669, 5677, 5679, 5779, 577X, 578X, 579X, 57XX, 59XX, 666X, 667X, 6688, 677X, 6789, 67XX, 6888, 689X, 699X, 6XXX, 779X, 7889, 788X, 789X, 78XX, 888X
1..X, 2 formulas (total 148):
1126, 112X, 1157, 1166, 1225, 1227, 1228, 1245, 1247, 125X, 1279, 1333, 1336, 1338, 133X, 1356, 1357, 135X, 1378, 137X, 1444, 1446, 1449, 1455, 1456, 1457, 1458, 1459, 145X, 1466, 1467, 1556, 1567, 156X, 1578, 157X, 158X, 1688, 169X, 2223, 222X, 2234, 2237, 2244, 2249, 2255, 2266, 2267, 2269, 22XX, 2333, 2335, 233X, 2345, 235X, 237X, 2389, 238X, 2447, 2457, 2479, 249X, 2559, 2566, 2588, 258X, 25XX, 2678, 267X, 2689, 2699, 269X, 26XX, 2778, 27XX, 288X, 2899, 289X, 3334, 3337, 333X, 3344, 3347, 3368, 338X, 3445, 3447, 3455, 3459, 345X, 3469, 3556, 3557, 3559, 3566, 3567, 356X, 3588, 3589, 3599, 359X, 3677, 36XX, 3777, 377X, 37XX, 4447, 444X, 445X, 4468, 4469, 446X, 4478, 4479, 4555, 4559, 4567, 4577, 4588, 4589, 459X, 45XX, 468X, 4778, 5556, 5567, 5578, 5589, 558X, 5688, 5689, 5699, 569X, 56XX, 5788, 5789, 5888, 5889, 588X, 6666, 6668, 6669, 6679, 6689, 668X, 669X, 6889, 6899
And here are the counts of #formulas vs #combinations:
- Code: Select all
For 0..9:
0 249
1 104
2 106
3 60
4 52
5 21
6 49
7 23
8 13
9 7
10 2
11 1
12 16
14 2
15 1
16 1
18 3
27 2
30 1
44 2
total=715
For 1..X:
0 149
1 166
2 148
3 77
4 66
5 25
6 23
7 26
8 16
9 8
10 2
11 4
12 1
14 2
15 1
16 1
total=715
New challenges
:
1. Find the sole combination from 0..9 that results in 11 different formulas...
2. The only 2 combinations that result in 10 different formulas are both from 2..9, could you find them?
3. There is only 1 combination with 12 formulas that is without a 0, find it...
4. Are the 15er and 16er from 0..9 & 1..X respectively same as each other?
Also, back to the basics, the following unique combinations with X are pretty tricky (not necessary fractional):
- Code: Select all
139X
24XX
255X
277X
388X
44XX
Anyone who's interested about the programming aspect could request me for the program code...
[Added later]
Here are the answers to the new challenges in tiny text (copy & paste the tiny text to Notepad to view):
1. 1699
2. 2346, 2448
3. 1266
4. The 15er is the same (1789), the 16ers are different (0226 & 168X respectively).
5. ((10+1)*3)-9, ((4/10)+2)*10, (5-(2/10))*5, ((10/7)+2)*7, ((10*8)-8)/3, ((10*10)-4)/4