top | item 13370218

Numbers 0 to 11111 in terms of Increasing and Decreasing Orders of 1 to 9 (2014)

116 points| hardmath123 | 9 years ago |arxiv.org | reply

56 comments

order
[+] jlarocco|9 years ago|reply
The abstract and introduction don't explain this very well.

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.

[+] pavel_lishin|9 years ago|reply
I wonder if any numbers have multiple solutions.
[+] jwtadvice|9 years ago|reply
At my office we lost a lot of time because someone put up a challenge to represent all the numbers 0-99 with algebriac expressions containing exactly four digits '4'. The use of powers and radicals was allowed.

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.

[+] javajosh|9 years ago|reply
It wasn't clear why this was interesting from the title. But here's an example:

   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.
[+] happimess|9 years ago|reply
It's not clear from your formatting, but the line was

  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
[+] Retra|9 years ago|reply
There's not a lot interesting about "facts about numbers" when you place such a low upper bound on your achievements. If he'd only done this up to 100, he'd never have had trouble finding a solution for 10958. But why 11111? Why not 111111111111?

To me this is just as interesting as any other arbitrary list of permutations of symbols.

[+] monk_e_boy|9 years ago|reply
I didn't read the article... but why 1 to 9? Is it because we have 10 fingers and 10 symbols that represent numbers? We're this numbers chosen for another reason?
[+] adtac|9 years ago|reply
I just wrote a script to do this in, like, 5 minutes :) And the whole thing runs in 7 seconds on my machine.

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.

[+] metaphor|9 years ago|reply

  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.
[+] questerzen|9 years ago|reply
I added division and brackets. This gets every number up to 5397, with only about 400 numbers still missing overall (<5%), but run time goes up to 40 minutes.

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.

[+] Phemist|9 years ago|reply
I think a good idea might be to do it for postfix/prefix notation, rather than infix. This will also get rid of the need for parentheses.
[+] baristaGeek|9 years ago|reply
Reminds me so much of competitive programming
[+] 7373737373|9 years ago|reply
What happens if you allow for 0?
[+] aaron695|9 years ago|reply
Would be more interested in the script than the list and how long it took to run.

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.

[+] thomasahle|9 years ago|reply
Huh, he does 98 as 98=1×23+45+6+7+8+9. Or do you mean that 23 and 45 are cheating, because they are two digit numbers? I think they rules are quite well explained and followed.
[+] lanna|9 years ago|reply
There is no script, he did it mostly by hand.
[+] iplaw|9 years ago|reply
So, who is going to find the increasing solution for 10958?
[+] sp332|9 years ago|reply
Why did this paper need four revisions?

Edit: the revisions have different ranges of numbers, but they go up and down. Odd.

[+] ninju|9 years ago|reply
Maybe something neat to bring up as a "drinking game"...at my next Math Symposium

Pick at random 3 digit number and try to express using the digits 1 thru 9...loser has to drink

[+] monochromatic|9 years ago|reply
This is way more numerology than math, and I don't see any deep results coming out of this. Was this just a fun side project for the author?
[+] thomasahle|9 years ago|reply
Not everything that's written as an article is serious :)
[+] hodgesrm|9 years ago|reply
A lot of math results are curiosities at first but turn out to be important in unexpected ways.

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...

[+] daveguy|9 years ago|reply
One persons numerology is another person's abstract algebra.

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.

[+] Grue3|9 years ago|reply
Interesting fact: every integer can be written with three 2's.
[+] lifthrasiir|9 years ago|reply
-log_2 log_2 sqrt(...(sqrt(2))...) {with n copies of sqrt} = -log_2 (2^-n log_2 2) = -log_2 (2^-n) = -(-n) = n.

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

[+] rerx|9 years ago|reply
n + (2 - 2) / 2 ?