
Numbers 0 to 11111 in terms of Increasing and Decreasing Orders of 1 to 9 (2014) - hardmath123
https://arxiv.org/abs/1302.1479
======
jlarocco
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
I wonder if any numbers have multiple solutions.

~~~
mmanfrin
I am nearly certain many do.

~~~
Beltiras
Your sibling comment has an example in 1+2+3=1* 2*3

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

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

~~~
matthewbauer
I assume 111112 is unrepresentable as well?

~~~
Mizza
To me, the pattern of unrepresentable numbers (like the pattern of primes)
would also be an "interesting" result.

------
adtac
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](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

      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.

~~~
witty_username
No, Python doesn't have integer overflow.

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

~~~
adtac
Ugh, fixed it.

Using * * is not really an option now because it takes insane amounts of time
to compute something like `1234567 __8 __9`.

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

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

~~~
lanna
There is no script, he did it mostly by hand.

~~~
aaron695
I would have thought that to be the fun bit!

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

~~~
lanna
"some". In previous versions of the paper, he claims to have done everything
manually: "To bring these numbers, thousands of combinations are considered
without use of any programming language."

------
iplaw
So, who is going to find the increasing solution for 10958?

------
sp332
Why did this paper need four revisions?

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

~~~
dotancohen
Actually, four is even.

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

------
chriswarbo
Seems related to this recent Numberphile video which does a similar thing for
e and pi:

[https://www.youtube.com/watch?v=xgBGibfLD-U](https://www.youtube.com/watch?v=xgBGibfLD-U)

------
monochromatic
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
Not everything that's written as an article is serious :)

------
Grue3
Interesting fact: every integer can be written with three 2's.

~~~
rerx
n + (2 - 2) / 2 ?

~~~
Grue3
Nope. You can use three instances of number 2, all arithmetical operations and
elementary special functions that are taught in high school.

