Arithmetic problem from Tobaku Haouden Zero.

All non-Go discussions should go here.
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by daniel_the_smith »

Kirby wrote:I bet Araban's solution takes advantage of the 20 bystanders. There are 20 possible digits (10 per x).


Maybe I'm too pessimistic, but given 20 random adults, I'd expect maybe 10 of them to be able to get a 10 digit multiplication problem correct in 25 minutes under that kind of pressure.
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com
User avatar
ChradH
Dies with sente
Posts: 106
Joined: Wed Apr 21, 2010 8:40 am
Rank: EGF 8k
GD Posts: 0
Universal go server handle: ChradH
Location: Germany
Has thanked: 64 times
Been thanked: 7 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by ChradH »

This reminds me of an interpolation method I learned some 30 years ago :)
It gives one digit per iteration:

1.41421356 is too small (too short), and 1.41421357 is already too big,
so lets take them for lower bound 'L' and upper bound 'U', respectively.

Calculate L^2 and U^2 and see where our goal 2 lies in between:

Let x = (2 - L^2) / (U^2 - L^2) = 0.237... for values above.
Take first digit after the decimal point as the next digit of the root: 1.414213562 and repeat.

Next iteration gives 1.4142135623.

That's two (long) multiplications and one (shorter) division per iteration. As we need only the first digit of x, it might even be possible to break the multiplications off early when they have reached enough significant digits.

In any case this should be possible with pencil and paper in 25 minutes. I used a calculator, of course :)
A really cool solution would use those 20 people around :lol:
To sig or not to sig, that is the question.
User avatar
Cassandra
Lives in sente
Posts: 1326
Joined: Wed Apr 28, 2010 11:33 am
Rank: German 1 Kyu
GD Posts: 0
Has thanked: 14 times
Been thanked: 153 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by Cassandra »

Kirby wrote:I bet Araban's solution takes advantage of the 20 bystanders. There are 20 possible digits (10 per x).

If there are enough pencils and paper, parallel processing might be possible.

There are 20 helpers, so let them calculate the squares with

xx = 00, 05, 10, ... , 95.

After the first run, the hero will find that 20 gives a result below 2, 25 a result above.

For the second run, the hero can let his helpers calculate in steps of .4, i. e.
20.4, 20.8, 21.2, ..., with the result that 23.6 is below and 24.0 is above 2.

The third, and decisive, run is the one for the hero, who calculates 23.9, with a result above 2.

So he can be sure that xx is 23.
The really most difficult Go problem ever: https://igohatsuyoron120.de/index.htm
Igo Hatsuyōron #120 (really solved by KataGo)
BobC
Lives with ko
Posts: 198
Joined: Sat Nov 27, 2010 2:02 pm
Rank: lol
GD Posts: 0
KGS: DrBobC
Tygem: 35kyu
Has thanked: 4 times
Been thanked: 23 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by BobC »

I think you can bastardise Taylors theorem for this.
Take given: 1.41421356

1.41421356 - square it..
then turn the 56 into 57 - square it ( with one f the helpers)
then turn 56 into 565 - square it..
compare answers to 2 then interpolate and repeat with increasing precision...



it's like playing the "hi lo guess a number game". Should get it out in about 7 squares..
hyperpape
Tengen
Posts: 4382
Joined: Thu May 06, 2010 3:24 pm
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
Location: Caldas da Rainha, Portugal
Has thanked: 499 times
Been thanked: 727 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by hyperpape »

This could be personal preference, but it feels easier to use the formula for square of sums, then subtract and do division, using a lot of "safe" approximations.

[1] (a + b)^2 = a^2 + 2ab + b^2.

[2] a = 1.41421356

[3] a ^ 2 = 1.99999999328

[4] 2 - a ^ 2 = 67.2... * 10 ^-9 (as far as the calculation is concerned, you can forget the -9).

[5] 67.2 / 2a ≈ 23

[6] b = 2.3 * 10^-9

=========

At [3], the b^2 term is extremely small. Unless 2 - a^2 looks wrong, you can ignore it.

You can do [5] with all the digits of the 67.2... term, as well as all the digits of a. But you're almost certainly not going to need them all. I'd start with 67.2 / 1.41 and see whether I might need to backtrack.
hyperpape
Tengen
Posts: 4382
Joined: Thu May 06, 2010 3:24 pm
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
Location: Caldas da Rainha, Portugal
Has thanked: 499 times
Been thanked: 727 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by hyperpape »

Oh, and if we want to test ourselves, someone should give us all the first 8 digits of 3 ^ (1/2)...
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by 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
hyperpape
Tengen
Posts: 4382
Joined: Thu May 06, 2010 3:24 pm
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
Location: Caldas da Rainha, Portugal
Has thanked: 499 times
Been thanked: 727 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by hyperpape »

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...
illluck
Lives in sente
Posts: 1223
Joined: Sun Apr 25, 2010 5:07 am
Rank: OGS 2d
GD Posts: 0
KGS: illluck
Tygem: Trickprey
OGS: illluck
Has thanked: 736 times
Been thanked: 239 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by 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.
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by 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
illluck
Lives in sente
Posts: 1223
Joined: Sun Apr 25, 2010 5:07 am
Rank: OGS 2d
GD Posts: 0
KGS: illluck
Tygem: Trickprey
OGS: illluck
Has thanked: 736 times
Been thanked: 239 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by 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).
User avatar
Cassandra
Lives in sente
Posts: 1326
Joined: Wed Apr 28, 2010 11:33 am
Rank: German 1 Kyu
GD Posts: 0
Has thanked: 14 times
Been thanked: 153 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by Cassandra »

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)
User avatar
Solomon
Gosei
Posts: 1848
Joined: Tue Apr 20, 2010 9:21 pm
Rank: AGA 5d
GD Posts: 0
KGS: Capsule 4d
Tygem: 치킨까스 5d
Location: Bellevue, WA
Has thanked: 90 times
Been thanked: 835 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by Solomon »

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
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by 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
User avatar
Solomon
Gosei
Posts: 1848
Joined: Tue Apr 20, 2010 9:21 pm
Rank: AGA 5d
GD Posts: 0
KGS: Capsule 4d
Tygem: 치킨까스 5d
Location: Bellevue, WA
Has thanked: 90 times
Been thanked: 835 times

Re: Arithmetic problem from Tobaku Haouden Zero.

Post by Solomon »

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 :(.
Post Reply