It is currently Sat May 10, 2025 3:30 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2
Author Message
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #21 Posted: Wed Jul 20, 2011 5:59 pm 
Tengen

Posts: 4382
Location: Caldas da Rainha, Portugal
Liked others: 499
Was liked: 733
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
Oh, and if we want to test ourselves, someone should give us all the first 8 digits of 3 ^ (1/2)...

_________________
Occupy Babel!

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #22 Posted: Wed Jul 20, 2011 6:58 pm 
Gosei
User avatar

Posts: 2116
Location: Silicon Valley
Liked others: 152
Was liked: 330
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
OK, go for it: 1.73205081

Edit: I tried calculating the above by hand with newton's method. I made a mistake somewhere. But using newton's method with a calculator, I got it correct. OK, I will try getting two more places by hand.

_________________
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #23 Posted: Wed Jul 20, 2011 7:53 pm 
Tengen

Posts: 4382
Location: Caldas da Rainha, Portugal
Liked others: 499
Was liked: 733
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
Owwwww! I did that by hand. I believe 1.73205081 ^ 2 = 3.0000000084211561 (Python reports it as 3.0000000084216563, which fails a basic sanity check).

So we're a victim of rounding. We wanted 1.73205080.

Also, an important question is whether they have graph paper and what their handwriting is like. I did my first try on notebook paper, and it got out of alignment while I was squaring 1.73...

_________________
Occupy Babel!

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #24 Posted: Wed Jul 20, 2011 7:57 pm 
Lives in sente

Posts: 1223
Liked others: 738
Was liked: 239
Rank: OGS 2d
KGS: illluck
Tygem: Trickprey
OGS: illluck
I just tried to use the a^2+2ab approximation for root 3 by hand. It took me 20 minutes to do the calculations (my math sucks) and I made a mistake in there. Using a calculator, though, it does seem like the approximation is good enough.

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #25 Posted: Wed Jul 20, 2011 8:19 pm 
Gosei
User avatar

Posts: 2116
Location: Silicon Valley
Liked others: 152
Was liked: 330
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
hyperpape wrote:
Owwwww! I did that by hand. I believe 1.73205081 ^ 2 = 3.0000000084211561 (Python reports it as 3.0000000084216563, which fails a basic sanity check).

So we're a victim of rounding. We wanted 1.73205080.

Also, an important question is whether they have graph paper and what their handwriting is like. I did my first try on notebook paper, and it got out of alignment while I was squaring 1.73...


Yeah, I realized it was evil to round it, but: someone already mentioned that the given digits might have been rounded, and ordinarily I would round a number like that if giving it to N digits, so...

I decided I didn't have the patience to try this by hand and instead wrote a computer program to calculate square roots to arbitrary precision. Here's the fist 100k digits of sqrt(3): http://pastebin.com/6aV2Dn68

_________________
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #26 Posted: Wed Jul 20, 2011 8:36 pm 
Lives in sente

Posts: 1223
Liked others: 738
Was liked: 239
Rank: OGS 2d
KGS: illluck
Tygem: Trickprey
OGS: illluck
@hyperpape: My manual calculations give something close to the python result - 3.0000000084216561. I completely messed up the long division - I see no less than 3 errors in calculating 4 digits XD

For someone who doesn't fail as horribly as I do at math, though, the approximation is quite possible to do in 20 minutes (perhaps even less time, I had problems with aligning figures - would have been a good idea to just drew straight lines as grids).

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #27 Posted: Fri Jul 22, 2011 7:05 am 
Lives in sente
User avatar

Posts: 1326
Liked others: 14
Was liked: 153
Rank: German 1 Kyu
I think, hyperpage's suggestion of

b = (2 - a * a) / (2 * a)

provides the fastest method, and it surely can be done in 25 minutes.

@ Araban:
What method has been choosen by the Hero ?

_________________
The really most difficult Go problem ever: https://igohatsuyoron120.de/index.htm
Igo Hatsuyōron #120 (really solved by KataGo)

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #28 Posted: Fri Jul 22, 2011 12:12 pm 
Gosei
User avatar

Posts: 1848
Location: Bellevue, WA
Liked others: 90
Was liked: 837
Rank: AGA 5d
KGS: Capsule 4d
Tygem: 치킨까스 5d
Zero's method:
A lot less sophisticated than some of the answers here :P. He begins by multiplying 1.414213560 by itself. He uses the other people in the room to do the same calculation for verification. Next, he uses an arithmetic rule regarding multiplication of numbers differing by 1 value. Simply, once you know what 1414213560 * 1414213560 is, to check 1414213561 * 1414213561, you need to only add (1414213560 + 1414213560 + 1) to 1414213560 * 1414213560. In other words: 1414213560 * 1414213560 + 1414213560 + 1414213560 + 1 = 1414213561 * 1414213561

He decides to start with 2 for the 9th digit based on the answer he got for 1414213560 * 1414213560, which is 1.999999993287873600. Using the rule, he arrives at 1.999999998944727844. With 11:53 minutes left on the clock, he applies the same rule once again to arrive at 3 for his 10th digit:

Image

In the game he was allowed 2 tries to determine the 'password' (the 9th and 10th digits). He uses 23 for his first try, only to realize he had to round it up based on:

Image

Hence arriving at 24 as the correct password. If anyone's confused about what I said or want more detail (or just want to read the story), you can read the part in the manga here: http://www.mangafox.com/manga/tobaku_ha ... .2/96.html

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #29 Posted: Fri Jul 22, 2011 1:26 pm 
Gosei
User avatar

Posts: 2116
Location: Silicon Valley
Liked others: 152
Was liked: 330
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
First 8 digits of square root of five per Google: 2.23606798 (in case someone wants to try Zero's method)

_________________
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #30 Posted: Fri Jul 22, 2011 2:09 pm 
Gosei
User avatar

Posts: 1848
Location: Bellevue, WA
Liked others: 90
Was liked: 837
Rank: AGA 5d
KGS: Capsule 4d
Tygem: 치킨까스 5d
daniel_the_smith wrote:
First 8 digits of square root of five per Google: 2.23606798 (in case someone wants to try Zero's method)
Image
Sigh...I actually did take the time to multiply this by itself by hand, only to get 5.0000000111812804, which had me confused because it had to be < 5. So I checked the first 8 digits of sqrt(5), only to realize that Google rounded up the 8th digit so the first 8 digits of sqrt(5) is actually 2.23606797__.

Those are 11 minutes I'm never getting back daniel_the_smith :(.


This post by Solomon was liked by: daniel_the_smith
Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #31 Posted: Fri Jul 22, 2011 3:21 pm 
Gosei
User avatar

Posts: 2116
Location: Silicon Valley
Liked others: 152
Was liked: 330
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
I'm sorry, that time it wasn't intentional. I guess I should have put a disclaimer that I didn't know if it was rounded or not.

As penance, if I have a chance, I'll see if I can square that by hand in less than 11 minutes...

Edit: Actually, I don't feel too bad because I'm pretty sure I wasted more than 11 minutes writing a square root calculator due to this thread... :)

_________________
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #32 Posted: Fri Jul 22, 2011 3:56 pm 
Tengen

Posts: 4382
Location: Caldas da Rainha, Portugal
Liked others: 499
Was liked: 733
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
I can't believe I didn't think of that. I use that shortcut really often.

It's probably not a huge time difference, but you avoid the subtraction, and more importantly, you don't have to worry about whether you're dropping the right digits.

_________________
Occupy Babel!

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #33 Posted: Fri Jul 22, 2011 6:22 pm 
Lives in gote
User avatar

Posts: 603
Liked others: 43
Was liked: 139
Rank: 6-7k KGS
My first thought was that

2 = (200000/141421) * (282842/200000)

Add those two fractions and divide by 2, and you get

(79999798482/56568400000)

Either do the long division out to ten places, or multiply 56568400000 * 1.41421356 (since you know the first eight places), and then do the division for the last two digits.

As the denominator is eleven digits, you have to be correct to at least 1/56568400000, which is ten places after the decimal.

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #34 Posted: Fri Jul 22, 2011 8:53 pm 
Honinbo

Posts: 10905
Liked others: 3651
Was liked: 3374
I think maybe Fedya has the right idea. We can use Newton's method with 1.41421.

A little algebra gives us sqrt(2) - 1.41421 = delta = 1/1.41421 - 1.41421/2 , to 10 digits.

1.41421/2 = 0.707105

And we know that 1/1.41421 starts off as 0.70710, since 1.41421 is less than the square root of 2.

The long division to get the next five digits is not so bad.

So to find delta we have

0.7071085624 -
0.707105
------------
0.0000035624

Which means that digits 9 and 10 are 2 and 4, respectively. :)

Edit: Actually, we do not have to do that last subtraction, do we. ;)

Edit again: Actually, we do not have to do long division for 5 digits, since we know that 1/1.41421 starts off as 0.70710856, don't we? ;) ;) We only have to do long division for the final two digits.

Edit again: And to get those two digits, we can divide at that point by 1.414, as that will give us sufficient accuracy. (1.41 might do, but I like a little leeway. :) )

_________________
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.


Last edited by Bill Spight on Fri Jul 22, 2011 9:50 pm, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #35 Posted: Fri Jul 22, 2011 9:46 pm 
Honinbo

Posts: 10905
Liked others: 3651
Was liked: 3374
Araban wrote:
Zero's method:
A lot less sophisticated than some of the answers here :P. He begins by multiplying 1.414213560 by itself. He uses the other people in the room to do the same calculation for verification. Next, he uses an arithmetic rule regarding multiplication of numbers differing by 1 value. Simply, once you know what 1414213560 * 1414213560 is, to check 1414213561 * 1414213561, you need to only add (1414213560 + 1414213560 + 1) to 1414213560 * 1414213560. In other words: 1414213560 * 1414213560 + 1414213560 + 1414213560 + 1 = 1414213561 * 1414213561

He decides to start with 2 for the 9th digit based on the answer he got for 1414213560 * 1414213560, which is 1.999999993287873600. Using the rule, he arrives at 1.999999998944727844. With 11:53 minutes left on the clock, he applies the same rule once again to arrive at 3 for his 10th digit:

Image

In the game he was allowed 2 tries to determine the 'password' (the 9th and 10th digits). He uses 23 for his first try, only to realize he had to round it up based on:

Image

Hence arriving at 24 as the correct password. If anyone's confused about what I said or want more detail (or just want to read the story), you can read the part in the manga here: http://www.mangafox.com/manga/tobaku_ha ... .2/96.html


What rule is Zero using to get the 2 and 3?

Once he has 1.9999999932878736 he can perform the division 6712/283 to get the next two digits with sufficient accuracy. I. e., (2 - a^2)/2a.

_________________
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #36 Posted: Fri Jul 22, 2011 11:07 pm 
Lives in sente
User avatar

Posts: 1326
Liked others: 14
Was liked: 153
Rank: German 1 Kyu
Bill Spight wrote:
What rule is Zero using to get the 2 and 3?

Once he has 1.9999999932878736 he can perform the division 6712/283 to get the next two digits with sufficient accuracy. I. e., (2 - a^2)/2a.


Yes, and even the "long" division with the 8 digits-numbers can be done in the remaining 14 minutes. (Devision by 2 should not be the big problem.)

That's relative simple, because we already have most of the n * a (n = 1, 2, ...) from doing the multiplication before.

And it is not necessary to perform the "manual" devision-steps for more that 3 digits. Remember, that "manual" devision here is nothing more than substraction.

Overall, this method has less calculating steps than the method, which has been choosen by the hero. And there remains the fact of his unexplained ability of guessing "2" and "3".

_________________
The really most difficult Go problem ever: https://igohatsuyoron120.de/index.htm
Igo Hatsuyōron #120 (really solved by KataGo)

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #37 Posted: Sat Jul 23, 2011 6:39 pm 
Oza
User avatar

Posts: 2659
Liked others: 310
Was liked: 631
Rank: kgs 6k
Presumably he's multiplying n*3,000,000,000 (and then by 300,000,000) to estimate how many chunks of 1,414,000,000 you need to add to round off to 2 x 10^m... you need about 60,000,000,000 in the first and about 1,200,000,000 in the second.

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #38 Posted: Tue Jul 26, 2011 5:32 pm 
Lives in gote

Posts: 553
Liked others: 61
Was liked: 250
Rank: AGA 5 dan
This solution is the same as others have posted, but maybe thinking about fractional accuracy makes it a little easier to see. Once the hero calculates that (1.414235600)^2 = 1.9999999933 (note that he does not need further digits), he can observe that this starting point falls short by 67 parts in the last two decimal places. To get those 67 parts back, he has to increase the starting point by 67/2/1.4 (again no more digits are needed) = 23 parts in the last two decimal places. He can spend any remaining time verifying this answer :)

Top
 Profile  
 
Offline
 Post subject: Re: Arithmetic problem from Tobaku Haouden Zero.
Post #39 Posted: Sun Aug 07, 2011 2:51 pm 
Dies with sente
User avatar

Posts: 106
Location: Germany
Liked others: 64
Was liked: 7
Rank: EGF 8k
Universal go server handle: ChradH
Just found this article about Japanese mnemonics for numbers.

_________________
To sig or not to sig, that is the question.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group