Numbers 0 to 11111 in terms of Increasing and Decreasing Orders of 1 to 9 (2014)
arxiv.org
arxiv.org
My understanding is that the author wrote the digits 1 through 9 in ascending order, and then inserted parenthesis, addition, subtraction, multiplication, division and exponentiation operators between them where appropriate to get every number from 0 to 11111.
And then he did the same thing using the digits 9 through 1 in descending order and did the same thing.
He was able to find a solution for every number except 10958 with 1-9 in ascending order.
EDIT:
The paper also doesn't explain much about how or why they did this. At first glance I don't think it would be too difficult to come up with a branch and bound algorithm to search through all the solutions.
You can create a second version by replacing this with 1×2×3.
For example,
10914 = 1 × 2 × 3 × (4^5 + 6 + 789)
10914 = (1 + 2 + 3) × (4^5 + 6 + 789)I myself solved several numbers before exhausting the tricks I could think of, and reverted to brute force/search with Polish/prefix notation, then realizing how massive the search space was for even just a few operators. Adding parentheses ordering further explodes the search space.
Finally, while this kind of concrete and explicit expression is "toy math", it is related to Godel Sentences and lexigraphic ordering of proofs used through much of the establishment of logic, the foundations of proof systems, and computer science.
0 = 12 + 34 − 56 − 7 + 8 + 9.
1 = 1^23456789.
2 = 123+4−56−78+9.
3 = 123 − 45 − 6 − 78 + 9.
And then in decreasing order 0 = 98−7−6−54−32+1.
1 = 98−76−54+32+1.
2 = 9+87−65+4−32−1.
3 = 98−76−5+4+3−21.
That this is possible at all is counter-intuitive to me, and hence fascinating. Even more fascinating is that he does not have a solution for 10958 in the ascending case. 1 = 1 ^ 23456789
I thought it was really cool that this pattern is used elsewhere to collapse any prefix into 1, e.g. 9 = (1 ^ 2345678) * 9 dig·it [ˈdijit]
NOUN
1) any of the numerals from 0 to 9, especially when forming part of a number.
2) a finger (including the thumb) or toe.In particular, since our hands can show "10" the natural base this would imply is base _11_ and not 10.
Another argument I've heard presented is that since 10 is divisible by 2 and 5 this simplifies many common calculations. There were groups in the past advocating use of other bases (in particular 12 but also 16).
The mayan's number system is base 20 (though the digits are are drawn out of sub digits in base-5).
I'd disagree. Having base 10 allows us to easily imagine 60 as 6 people worth of fingers.
I think I remember learning in school that one of the ancient Mesopotamian civilizations (Sumerian, I think, but I could be wrong) used 60 as the basis for their system because it was divisible by 1, 2, 3, 4, 5, and 6.
To me, it always seemed like 5 was only a common number because of its place in base 10, not the other way around. There doesn't seem to be any reason that 2 and 5 would have been chosen as more significant than 2 and 3 or 2 and 7.
To me this is just as interesting as any other arbitrary list of permutations of symbols.
1. https://en.wikipedia.org/wiki/Boolean_satisfiability_problem
https://github.com/adtac/123456789/blob/master/output
Admittedly, it doesn't have every number. I suspect it's because I haven't included bracketed expressions.
n = 0 + <ascending_solution_n>
without any additional consideration. Similarly for descending solution: n = <descending_solution_n> + 0
The descending case also looks like it'll produce a crap ton of solutions for n = 1 of the form: 1 = <arbitrary_descending_permutation> ^ 0 3 = 123+4+5-6*7^89
First verifiable instance of error?Did a little fishing for overflow candidates with the following regex:
[1-9]{3,}\^[1-9]{3,}
...caught 58 results between 266 and 10940: 266 = 123^456-78-9
...
10940 = 12345^6789
My kung fu isn't Python so I don't know how types are handled. That eval() function sure smells suicidal for anything remotely serious though."^" is the XOR operator. GP's code has that bug.
> That eval() function sure smells suicidal for anything remotely serious though.
Yes, ast.literal_eval() should be used.
Using * * is not really an option now because it takes insane amounts of time to compute something like `123456789`.
And this is just a tiny script - `eval` shouldn't really be an issue. And yes, I know it's evil, generally. But if you think about it, Python itself is just one big eval loop :P
Potentiation is a problem though (particularly when combined with brackets) as Python becomes impossibly slow using bignums. (I estimate it will take several days of compute time to test all 250 million possibilities, unless I put some effort into speeding it up significantly.) But at least it would prove definitively whether 10958 is possible.
If the only goal were to search for a solution to 10958 though, it should be fairly straightforward to re-order the search in approximately ascending order of compute cost so that if a simple solution exists it will be found quickly.
And if this is the best so far? Seems surprising given it's a popular kids game.
It's not really maths IMO since I think using 98 is cheating for instance, it's really (9 X 10 + 8), 10 not being allowed. So kids are not learning real maths, more arithmetic.
I think there was at least one script for some of the numbers, this I would have thought the most interesting, optimisation of the script and for all numbers and proving some numbers have no solutions([edit] possibly very hard) -
"The author is thankful to xxxx in finding some difficult representations using computerized script."
Edit: the revisions have different ranges of numbers, but they go up and down. Odd.
Pick at random 3 digit number and try to express using the digits 1 thru 9...loser has to drink
I think this was mostly just for fun/curiosity, but operation combinations are interesting -- if nothing else to show how easy numerology can be.
It's not like the author attached significance to any of the calculations.
Here is a result (we can call it Taneja's Conjecture):
The digits 1-9 in sequence can not be combined with fundamental operations (+ - / * ^) in a way that computes the value 10958.
The original proof of the existence of irrational numbers depends on using the Pythagorean theorem to show that the leg of an isosceles right triangle is simultaneously odd and even if irrational numbers do not exist. The proof works because somebody had thought out the seemingly trivial notions of what it means for a number to be odd and even and the effect this has on their squares and ratios. [1] I have always had this picture of somebody's spouse in 500 BC yelling at him to get in and do some useful work instead of standing around in the square drawing numbers.
[1] https://en.wikipedia.org/wiki/Irrational_number#Ancient_Gree...
I would say that you need only one 2 if you replace log_2 by lg, so we should make lg taught in high schools... wink