wu :: forums
« wu :: forums - Pi from digits 1 through 9 »

Welcome, Guest. Please Login or Register.
Apr 19th, 2024, 9:42pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: ThudnBlunder, SMQ, Icarus, Grimbal, towr, william wu, Eigenray)
   Pi from digits 1 through 9
« Previous topic | Next topic »
Pages: 1 2  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Pi from digits 1 through 9  (Read 2588 times)
SWF
Uberpuzzler
*****





   


Posts: 879
Pi from digits 1 through 9  
« on: Mar 30th, 2004, 5:52pm »
Quote Quote Modify Modify

Find a formula for the closest approximation to [pi] which uses each of the nine digits 1 through 9 exactly once.  The digit 0 is not used. Along with the nine digits, the following are also permitted in the formula (as often as desired):
 
+  (addition)
-  (subtraction, or negative sign)
*  (multiplcation)
/  (division)
^  (raising to a power)
() (parentheses)
.  (a decimal point, a leading zero is not required for values less than 1)
 
Digits may also be strung together to form a multiple digit number.
 
For example, one attempt might be:
 
3 + 1/7 - (5/6 + .2/9) ^ 48  for an error of 7e-4.
 
The allowable formulas are pretty much what you can type in on a spreadsheet using only the basic operators.
« Last Edit: Mar 30th, 2004, 5:54pm by SWF » IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #1 on: Mar 31st, 2004, 12:00am »
Quote Quote Modify Modify

[smiley=blacksquare.gif]
(7^3+12) / (98+4+5+6) for an error of < 2.7e-07
[smiley=blacksquare.gif]
 
This certainly may be improved since it doesn't use too many operations.
 
It seems one may write a program to try all possible cases...
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Pi from digits 1 through 9  
« Reply #2 on: Mar 31st, 2004, 1:00am »
Quote Quote Modify Modify

I don't think it's computationally viable to try all possible combinations..
Just single numbers with operators gives 9!*5^8 possibilities, add possible points in front of each number means multiplying this by 2^9. You can also concatenate numbers, further increasing the total.. So there are far more than 7.3 * 10^13 possibilities. It would take weeks if not months to do it on the best available consumer computer..
« Last Edit: Mar 31st, 2004, 1:03am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #3 on: Mar 31st, 2004, 9:12am »
Quote Quote Modify Modify

on Mar 31st, 2004, 1:00am, towr wrote:
I don't think it's computationally viable to try all possible combinations..

Hmm, maybe you are right...  Angry    Still, I believe some clever schemes exist that allow to reduce the number of combinations dramatically.
 
Here's another one:
[smiley=blacksquare.gif]
(97+( 1+8 )/(3*6+4))^.25, error ~e-9.
[smiley=blacksquare.gif]
IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #4 on: Mar 31st, 2004, 5:44pm »
Quote Quote Modify Modify

That is good Barukh. Your approach appears to be to take some old [pi] approximations:  355/113  and  sqrt(sqrt(97 + 9/22)) and express using the 9 digits. There are more accurate solutions.
 
Some easier side problems related to Barukh's solutions:
 
1) Find an expression equal to 355/113 that uses the 9 digits once each, one use of a math operator (division) and one decimal point.
 
2) Find an expression equal to sqrt(sqrt(97 + 9/22)) which uses the 9 digits once each to create 5 integers (no decimal point in this formula) that are combined with the allowed symbols.
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #5 on: May 4th, 2004, 11:09am »
Quote Quote Modify Modify

I'd like to revive this thread...  Grin
 
on Mar 31st, 2004, 5:44pm, SWF wrote:
1) Find an expression equal to 355/113 that uses the 9 digits once each, one use of a math operator (division) and one decimal point.

Do you mean the expression uses a single operation?
 
Quote:
There are more accurate solutions.

No doubt... I would like to get some insights how to approach them. Any clues, SWF?
IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #6 on: May 4th, 2004, 9:16pm »
Quote Quote Modify Modify

Yes, that means a single division.  So it is of the form A/B.
 
A starting point may be to find the best solution of a given form like A/B or A/(B^C) and choose a form you think might work. I am not sure I have the best possible answer, but using forms that will generate lots of digits to the right of the decimal point are most likely better than something like A+B.
 
Here are a couple of examples (worse than those given so far, but not bad):
 
(821/(746-93))^5   (error 4.6e-8 )
 
3.25- (94/867.1)   (error 1.2 e-8 )
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #7 on: May 7th, 2004, 4:09am »
Quote Quote Modify Modify

Trying to keep this thread alive (where is my defibrillator?  Grin)
 
on Mar 31st, 2004, 5:44pm, SWF wrote:
1) Find an expression equal to 355/113 that uses the 9 digits once each, one use of a math operator (division) and one decimal point.

8591/2734.6
 
Quote:
2) Find an expression equal to sqrt(sqrt(97 + 9/22)) which uses the 9 digits once each to create 5 integers (no decimal point in this formula) that are combined with the allowed symbols.

Here’s my analysis. As stated, the formula should be E1^E2, where E1 equals to 2143/22, and E2 equals to 1/4. If E1 = a/b, then E2 contains 3 numbers, and at least 3 digits, that leaves 6 digits for a and b. But then b must contain the same two digits, which is impossible.
 
So, I looked at the expressions where E1 contains 3 numbers. I assumed E2 takes just 2 digits, so that E2 =1/4or 2/8. For E1 = (a[pm]b)/c there are not enough digits to represent the fraction.
 
a/(b[pm]c) is more interesting. It is clear that the only possibility here is for a, b, c  to have 4, 2  and 1 digit, respectively. This gives an “almost solution” (8572/(93-6))^(1/4).
 
Finally, I considered E1 = a [pm] b/c. That means c is at least 3 digits, leaving 2 and 2 for a and b. Therefore, b < c, which may be only if a = 97 or 98. The first choice gives the required solution (97+63/154)^( 2/8 ).
 
Interestingly enough, the solution is very close to the one I proposed originally, but it took me a long time to stumble at it.  Undecided
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7526
Re: Pi from digits 1 through 9  
« Reply #8 on: May 7th, 2004, 1:19pm »
Quote Quote Modify Modify

The simplest is probably
 
85910/27346 = 355/113 = 3.1415929...   error 2.67e-7
IP Logged
Three Hands
Uberpuzzler
*****





    Reucserru+Oymai


Gender: male
Posts: 715
Re: Pi from digits 1 through 9  
« Reply #9 on: May 7th, 2004, 3:25pm »
Quote Quote Modify Modify

Well, it would be if you were allowed to use the digit 0 Grimbal...
 
Don't worry, decimal points are allowed, so something like Barukh's answer (your numbers/10) should do the trick  Wink
 
Not that I would have figured it out, though, so I'm not sure why I'm the one pointing all of this out...
IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #10 on: May 7th, 2004, 7:36pm »
Quote Quote Modify Modify

Very good Barukh! But there is still more defibrilating to do, since there is room for improvement. The real hard part is finding forms that work well, here is another that succeeds in improving the accuracy another step:
 
A - B / ( C - D / ( E + F ))
 
This is easier than it looks at first: with so many variables they can't have many digits.
 
Three Hands is correct- it clearly says in the question that there is no zero, and Barukh gave essentially the same thing in the previous post. If it were permitted to violate some of the conditions of the question you could just use    
 
4*arctan(1-2-3+5+6-7-8+9)
 
but an expression meeting the conditions is higher priority than accuracy.
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #11 on: May 10th, 2004, 5:50am »
Quote Quote Modify Modify

on May 7th, 2004, 7:36pm, SWF wrote:
…here is another that succeeds in improving the accuracy another step:
 
A - B / ( C - D / ( E + F ))

That was giving too much… [smiley=blacksquare.gif] 3.2 – 4/(69 – 5/( 1.7+8 )), error 3.32e-10[smiley=blacksquare.gif]
 
And if you ask how I did it: a couple of weeks ago I wrote a program that is capable to go over all possible combinations – just to get convinced (as towr predicted) that it’s totally impractical. But then I added some filters to it – and the exact formula came in just in place to get the answer in less than 10 minutes.
 
After I saw this formula, I punched my head: what may be more natural to try than this form of repeated fraction? And yes, the one that may succeed should have a denominator divisible by 5…
 
So, no intelligence involved from my side… As SWF said:
 
Quote:
The real hard part is finding forms that work well

Maybe, something with exponentiation is even better?
« Last Edit: May 10th, 2004, 5:53am by Barukh » IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #12 on: May 11th, 2004, 6:01pm »
Quote Quote Modify Modify

Barukh, if you have found the answer to that last one, go ahead and post it.  I have more improvements.
 
There is still a way to improve upon 3.3e-10 (the accuracy of that last one), and some thinking instead of straight computation helps. Hint: Using as few digits as possible, try to match a well known [pi] approximation. Then with the remaining digits, make a very small number which is combined with the other expression to help correct the error.
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #13 on: May 12th, 2004, 5:29am »
Quote Quote Modify Modify

on May 11th, 2004, 6:01pm, SWF wrote:
Barukh, if you have found the answer to that last one, go ahead and post it.

 Huh Huh? I posted it four days ago…
 
Your last hint: how simple and beautiful (elementary, Watson!). Using it, I found two more solutions, pushing the accuracy upto 9.75e-11.  
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #14 on: May 15th, 2004, 9:38am »
Quote Quote Modify Modify

While looking for more accurate solutions, I came across the following interesting approximations (which unfortunately are not solutions) involving only integers:
 
[pi] ~ 10[sqrt]12911499 – 2 (error 2.6e-9)
[pi] ~ 10[sqrt]76350183 – 3 (error 1.78e-9)
[pi] ~ 10[sqrt]345104602 – 4 (error 8.6e-10)
[pi] ~ -10[sqrt]308739922 + 3 (error 1.25e-11)
IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #15 on: May 16th, 2004, 10:54am »
Quote Quote Modify Modify

on May 12th, 2004, 5:29am, Barukh wrote:

 Huh Huh? I posted it four days ago…

Sorry, I didn't see it hidden until now. I am also having difficulty finding your solution accurate to 9.75e-11, but that sounds about right for the approach described in the last clue.
 
Those tenth root solutions are good approximations, but not as close as can be obtained within the rules of the problem.
 
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #16 on: May 17th, 2004, 1:22am »
Quote Quote Modify Modify

on May 16th, 2004, 10:54am, SWF wrote:
I am also having difficulty finding your solution accurate to 9.75e-11, but that sounds about right for the approach described in the last clue.

I’ve found the following solutions:
 
[smiley=blacksquare.gif]
3+ 1/(7 + 2^-4) - ( 6 - 5/8 ) ^ -9, error  2.87e-10
3+ 1/(7 + 2^-4) - 5^-8 / 9.6, error 9.75e-11
[smiley=blacksquare.gif]
 
Quote:
Those tenth root solutions are good approximations, but not as close as can be obtained within the rules of the problem.

Wow! Every time I manage to get closer (using your clues), the horizon is still there… Could you at least tell what is the order of magnitude of the best solution you are aware of?
IP Logged
Leo Broukhis
Senior Riddler
****





   


Gender: male
Posts: 459
Re: Pi from digits 1 through 9  
« Reply #17 on: May 19th, 2004, 7:37pm »
Quote Quote Modify Modify

I cannot substantiate it, but I have a feeling that a good approximation might have a form X / Y, where Y is a very big number, e.g. 8^9 or .1^-9, or .1^-(8^9) Wink . This way the numerator does not have to be very precise.
IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #18 on: May 19th, 2004, 8:35pm »
Quote Quote Modify Modify

Barukh, your best is numerically the same as one approximation I have, but we both used the digits 1, 2, 3, 4, and 7 in different ways to get the 355/113 term!
 
You used 3+ 1/(7 + 2^-4)
I used 71/(23-.4)    = 71.0/22.6 = 710/226 = 355/113
 
Instead of just adding a small term to 355/113, you can make a small modification to the numerator or denominator.  Doing that with my fraction, there is a way to get an error of 3.28e-10 (no better than the approximations you have already found). Perhaps modifying your expression similarly with give a better improvement.
 
There is a way to reduce error by more than a factor of 10, but since that is my last remaining improvement, I will be more stingy about giving clues.  
 
If that is too hard, another fairly simple expression to try for with error around 8e-9: It contains a 7 digit number and two 1 digit numbers (maybe containing decimal points, e.g.  12.34 would be considered a four digit number).
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #19 on: May 23rd, 2004, 3:47am »
Quote Quote Modify Modify

on May 19th, 2004, 8:35pm, SWF wrote:
If that is too hard, another fairly simple expression to try for with error around 8e-9: It contains a 7 digit number and two 1 digit numbers (maybe containing decimal points, e.g.  12.34 would be considered a four digit number).

[smiley=blacksquare.gif]
(93647.85 + .2) ^ .1, error 8.47e-9
[smiley=blacksquare.gif]
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #20 on: May 24th, 2004, 6:30am »
Quote Quote Modify Modify

on May 19th, 2004, 8:35pm, SWF wrote:
There is a way to reduce error by more than a factor of 10, but since that is my last remaining improvement, I will be more stingy about giving clues.

OK. Let’s see if I made it this time. I’ve got a couple of improvements, and the best approximation is 6.6e-13.  
IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #21 on: May 31st, 2004, 5:49pm »
Quote Quote Modify Modify

That is better than the best I have, Barukh!  Of course, I'd like to see your formula.
IP Logged
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: Pi from digits 1 through 9  
« Reply #22 on: Jun 1st, 2004, 5:44am »
Quote Quote Modify Modify

on May 31st, 2004, 5:49pm, SWF wrote:
That is better than the best I have, Barukh!  Of course, I'd like to see your formula.

2 ^ (5 ^ .4) - .6 - ((.3 ^ 9) / 7) ^ (.8 ^ .1) for an error 6.6e-13.
 
Here’s how I’ve found it. I ran all the combinations of 4 digits to get as close to [pi] as possible. There are just 5 combinations with an error less than 10-5. Then, for every such combination, I searched for the best approximation with the remaining five digits.
 
Interestingly enough, when I reversed the process (i.e. started with all the 5 digit combinations, and then fixing with remaining 4 digits), I didn’t get as close. One example that is better than my last try, is the following:
 
(4 – .1 + 2^.3)^.7 - 5 ^-8 + 9^-6, error 3.87e-11
 
And now, SWF, I would like you to present your best solution!  Grin
 
IP Logged
Leo Broukhis
Senior Riddler
****





   


Gender: male
Posts: 459
Re: Pi from digits 1 through 9  
« Reply #23 on: Jun 1st, 2004, 7:32pm »
Quote Quote Modify Modify

on Jun 1st, 2004, 5:44am, Barukh wrote:

2 ^ (5 ^ .4) - .6 - ((.3 ^ 9) / 7) ^ (.8 ^ .1) for an error 6.6e-13.

 
Barukh,
 
you may want to send this result to Eric Weisstein of mathworld.com,  
because your approximation is way better than any pandigital approximation mentioned in http://mathworld.wolfram.com/PiApproximations.html
although it is unclear if decimal fractions without a leading 0 are allowed there.
IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: Pi from digits 1 through 9  
« Reply #24 on: Jun 1st, 2004, 9:58pm »
Quote Quote Modify Modify

OK, here is the former best formula  Sad
 
( (3^(-14))/2 + .67)^.5 + .9^( -8 )
 
for an error of 4.2e-12.  
 
Something about this one is that the digits are not well scrambled:  the first block of numbers contains 1 through 4, second block of numbers contains 5 through 7, and last block of numbers has 8 and 9.  Also the first block of numbers is the first 4 digits of [pi], 3.142, (rounded to 4th digit), but with symbols inserted bewteen.
IP Logged
Pages: 1 2  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board