by tzs · 14y ago · 0 comments
Here's a related problem, but for e: using each digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 at most once each, and only the operators +, -, x, /, and ^ (exponentiation), and parenthesis for grouping, how close can you get to e? Digits may not be concatenated--for instance, you cannot get a 23 by simply placing the 2 next to the 3.
My best, after about 15 minutes of fiddling, were:
(3x(4x7+1))/2^5 = 2.71875 ≈ e + 0.000468172
and 2x(9x6-1)/(3x(8+5)) = 2.717948... ≈ e - 0.000333111
but it turns out you can do FAR better.That was fun. Although I'm having trouble confirming the answer... - Also I'm meant to be packing.
http://play.golang.org/p/G_Y5SblSuv for some brute force eval :)
Edit: This could be a nice demonstration for a genetic algorithm: A clearly defined fitness function yet an unknown (unknowable?) goal, and a distinct representation of the genes. I'm not sure how hereditary the fitness is though.
Further edit: Just 4 digits: (6-(8^(4/7))) 2.718658575969448 0.00037674751040306376 - I hope this is a) correct, b) interesting to someone else.
Best I've seen is given in this discussion: http://www.reddit.com/r/math/comments/zakqh/using_the_number...
Interesting problem nonetheless.
short: 2981^ (1/8)
less short: (2574 + 4903 ^ (1/4))/950
I used: http://apod.nasa.gov/htmltest/gifcity/e.1milPerhaps I am misunderstanding your output but it is only correct up on till: 2.7182818
(1+9^(-4^(7x6))^(3^(2^85))
which gives e to 18457734525360901453873570 decimal digits.I think that renders both of your solutions invalid, but cool nonetheless!
(9 - (5/7)^(1/2)) / 3
I was tired when I saw that post, it was late/early. rmccue, I also seemed to have missed that you gave an error bound =(<span style="FILTER: FlipH;">9</span>
However I think for this problem, and many others, mastering a general purpose programming language is much more efficient. After all you can pipeline symbolic expressions to Mathematica - or Maple >:) - and you have the best of both worlds. Or you just use Ruby or another highly expressive language - the syntax of simple symbolic expressions is basically the same.