Please turn off your cell phones.
xkcdand
The Electric GoogleApplication Test
Keith ClayDepartment of PhysicsGreen River Community College
How to solve the problemthat stumped the world
β2ΒΏ1.414213562373 0950 4880168872420969807856967187537694807317667973799073247846210703 88503875343276415727350138462309122970249248360558507372126441214970999358314132226 6592750559275579995050115278206057147010955997160597027453459686201472851741864088 919860955232923048430871432145083976260362799525140799
(dot dot dot)
My obsession began:
β2=1.414213575=1.4000000000000 β¦
9970=1.4142857142857 β¦
81195741=1.4142135 β¦
62373095 β¦
Then I grew upβ¦
β¦ sort of.
And then, on my birthday,
September 27, 1998this appearedβ¦
Over $30 billion in profits in 2011
Chosen as the most desirable employer in America
Which is one of the reasons why it is interesting thatGoogle once offered a job interview to anyone who
could solve an electric circuit problem.
Electric circuits? Google?
The goal was to identify smart people.So Google asked some βinterestingβ questions.
Imagine an electric circuit composed of an infinitenumber of 1-ohm resistors in a 2-dimensional grid.
ΒΏ1 hπ π
What really happens inside an electric circuit:
Imagine an electric circuit composed of an infinitenumber of 1-ohm resistors in a 2-dimensional grid.
ΒΏ1 hπ π
What is the total resistance between these two points?
xkcd by Randall MunroeNotice that mathematiciansβ brains are
more expensive than physicistsβ brains (because physicistsβ brains are used).
Is rational?
Assume it is.Then
And now back to
, , {π ,πββ€ }{π ,πββ€ }
,,
{π ,π ,πββ€ }4π2
,{π ,π ,π ,πββ€ }
, ,
π2
,
β2=ππ=
2π2π=
ππΒΏ2π2 π =
ππ =β¦
{π ,π ,π ,π ,π , π β¦ββ€ }π>π>π>π>π> π >β¦>0
ππ β2= ππ , {π ,πββ€ } , hπ‘ ππ
β΄β2 ππ πππππ‘πππππ .
β3=ππ=
3π3π=
ππΒΏ3π3 π =
ππ =β¦
{π ,π ,π ,π ,π , π β¦ββ€ }π>π>π>π>π> π >β¦>0
ππ β3=ππ , {π ,πββ€ }, hπ‘ ππ
β΄β3 ππ πππππ‘πππππ .
β 4=ππ=
4π4π=
ππΒΏ4π4 π =
ππ =β¦
{π ,π ,π ,π ,π , π β¦ββ€ }π>π>π>π>π> π >β¦>0
ππ β4=ππ , {π ,πββ€ } , hπ‘ ππ
β΄β4 ππ πππππ‘πππππ? ? ?
It will be left as an exercise for the reader to figure out why this proof breaks down for .
No.
So there are no integers {π ,πββ€ } such that π2=2π2
The best we can hope for isπ2=2π2Β± 1
And there are plenty of these:
72=2 (52 )β 132=2 (22)+1
412=2 (292 )β 1172=2 (122 )+1
12=2 ( 02 )+112=2 ( 12 ) β1
Could there be an infinite sequence of whole numbers
π2=2π2Β± 1{π ,πββ€ } such that ?
An infinite sequence of integers with ratios that approximate an irrational number?
Really?Really?
The Fibonacci Sequence
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233β¦
πΉ 0=0 ,πΉ1=1 ,πΉ π+ 2=πΉ π+1+πΉ π
32=1.5
53=1.66 β¦
85=1.6
138 =1.625
2113=1.615 β¦ 34
21=1.619 β¦
5534=1.6176 β¦ 89
55=1.6181 β¦πΉ16
πΉ15=1.618033 β¦
ΒΏ
12
(1+β5 )ΒΏ1.618034 β¦
The Golden Ratio: = 1.61803398874989β¦
The Golden Ratio: = 1.61803398874989β¦
πβ‘ 12
(1+β5 )= limπβ β ( πΉ π+1
πΉ π)
πΉ π+2=πΉ π+1+πΉ πππ πΉπ+2βπΉπ+1 βπΉπ=0
Define the βnext termβ operator E:
For any term of a sequence Sn ,
πΉ π+ 2βπΉ π+1βπΉπ=0becomesπΈ2πΉ πβπΈπΉ πβπΉπ=0
E Sn = Sn+1 E2 Sn = Sn+2
πΉ π+ 2βπΉ π+1βπΉπ=0becomesπΈ2πΉ πβπΈπΉ πβπΉπ=0
We can factor this:
πΈ2πΉ πβπΈπΉπβ πΉπ=0
(πΈ2βπΈβ1 )πΉ π=0
πΌπ πΈ πΉ π=ππΉπ , hπ‘ ππ π2 β πβ 1=0
πΒ±=12
(1 Β±β5 )
π+ΒΏ=1
2( 1+β5 )=1.618 β¦ ΒΏ πβ=
12
(1ββ5 )=β0.618 β¦
π+ΒΏ=1
2( 1+β5 )=1.618 β¦=π ΒΏπβ=
12
(1ββ5 )=β0.618 β¦=β 1π
Just βa littleβ algebra shows thatβ¦
πΉ π+1=π πΉπ+(β 1π )
π=ππΉ π+(β 0.618 β¦ )π
πΉ π=1β5 (ππβ[β 1
π ]π) Binetβs formula
(The proof will be left as an exercise for the reader.)
But what about ?
72=2 (52 )β 132=2 (22)+1
412=2 (292 )β 1172=2 (122 )+1
12=2 ( 02 )+112=2 ( 12 ) β1 1 0 Undefined
1 1 1
3 2 1.5
7 5 1.4
17 12 1.4167
41 29 1.4138
99 70 1.4143
π2=2π2Β± 1Weβre looking for{π ,πββ€ } such that
992=2 (702 )+1
Notice:
1 0 Undefined
1 1 1
3 2 1.5
7 5 1.4
17 12 1.4167
41 29 1.4138
99 70 1.4143
ππ+2=2ππ+1+ππ ππ+2=2ππ+1+ππ
πΌπ πΈ ππ=πππ , hπ‘ ππ π2β 2πβ1=0
πΒ±=(1 Β±β2 ) πβ= (1ββ2 )= β11+β2
=β 1π+ΒΏ ΒΏ
ππ=12 (ππ+[β 1
π ]π)
ππ=1
2β2 (ππβ[β 1π ]
π)
πΏππ‘ π=( 1+β2 )
1 1 1
3 2 1.5
7 5 1.4
17 12 1.4167
41 29 1.4138
99 70 1.4143
ππ=12 (ππ+[β 1
π ]π)
ππ=1
2β2 (ππβ[β 1π ]
π)
πΏππ‘ π=( 1+β2 )
We have found an infinite number of pairs of positive integerssuch that{ππ ,ππββ€ }
|β2 βππ
ππ|< 1
(2.414 ) (ππ )2
ππββ2ππ , in factβ¦
ππ=β2ππ+(β 1π )
πππ+2=2ππ+1+ππ ππ+2=2ππ+1+ππ
1 1 1
3 2 1.5
7 5 1.4
17 12 1.4167
41 29 1.4138
99 70 1.4143
1 1 1
3 2 1.5
7 5 1.4
17 12 1.4167
41 29 1.4138
99 70 1.4143
239 169 1.41420
1 1 1
3 2 1.5
7 5 1.4
17 12 1.4167
41 29 1.4138
99 70 1.4143
239 169 1.41420
577 408 1.414216
Heyβ¦ Doesnβt this have something to do withβ¦
Hurwitzβ Theorem!
Adolf Hurwitz!
For any irrational number z there exists an infinite number of pairs of integers a, b, such that
|π§βππππ
|< 1β5 (ππ)2
We have found an infinite number of pairs of positive integers
such that{ππ ,ππββ€ } |β2 βππ
ππ|< 1(2.414 ) (ππ )2
ππβ1=2ππβππ
in factβ¦ weβve found all of them!
ππβ1=ππβππ
Assume someone finds not on our list.{ππ ,ππββ€ }Define
Repeating this procedure will lead to π1=1 , π1=1and
For any irrational number z there exists an infinite number of pairs of integers a, b, such that
|π§βππππ
|< 1β5 (ππ)2
There are two types of (real) irrational numbers
Algebraic Transcendental
β212
(1+β5 )
3β7 β 5β13
roots of finitepolynomials with
rational coefficients
π
ln 5
π΄πππ‘ππ (7 )
roots of infinitepolynomials with
rational coefficients
Solve:
0=32 β 1
2! π₯2+
14 ! π₯
4
π₯=β6β 485198
Solve:
0=32 β 1
2! π₯2+
14 ! π₯
4 β 16 ! π₯
6 +18 ! π₯
8β 110 ! π₯
10 β¦
π₯=2π3 β 710
339
What does any of this have to do with the Google problem???
ΒΏ1 hπ π
What is the total resistance between these two points?
What really happens inside an electric circuit:
ΒΏ1 hπ πWhat is the total
resistance between these two points?
What is the total resistance between these two points?
ΒΏ2 hπ ππ
What is the total resistance between these two points?
ΒΏ3 hπ ππ
Resistances in series simply add
RESISTORSIN SERIES:
Resistance
1 hπ π
12 o hππ
RESISTORSIN PARALLEL:
The opposite of resistance is conductance.
πππππ’ππ‘ππππ=1
πππ ππ π‘ππππConductance increases when resistors are added in parallel.
11 hπ π
Conductance Resistance
ΒΏ
11 hπ π +
11 hπ π=
21 hπ π
ΒΏ1
2 hπ π+1
1 hπ π=3
2 hπ π23 o hππ
Conductances in parallel simply add
1π ππππ΄πΏ
=1π 1
+1π 2
+β¦
Try some harder ones...
ΒΏ (1 hπ π )+( 11 hπ π+
12 hπ ππ )
β1
=53
hπ ππ
ΒΏ2 hπ ππ =21 o hππ
ΒΏ (1 hπ π )+( 11 hπ π+ 1
53 hπ ππ )
β1
=138
hπ ππ
ΒΏ (1 hπ π )+( 11 hπ π+ 1
138 hπ ππ )
β1
=3421
hπ ππ
ΒΏ β hπ ππ =10 o hππ
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233β¦
π =(1 )+( 11+
1π )
β1
=2π +1π +1
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233β¦
β¦
πππ‘πππππ ππ π‘ππππ ππ πππ’ππππ ππ π‘πππ =π hπ ππ
π +π 2=2π +1π 2=π +1
π =12
(1+β5 )=π=1.61803 β¦
πππ‘πππππ ππ π‘ππππ ππ πππ πππ ππ π‘πππ =π hπ ππ
β¦
β¦
πππ‘πππππ ππ π‘ππππ ππ πππ πππ ππ π‘πππ =β2 hπ ππ
πππ‘πππππ ππ π‘ππππ ππ πππ πππ ππ π‘πππ =β3 hπ ππ
β¦
β¦
πππ‘πππππ ππ π‘πππππππ‘π€πππ hπ‘ πππππππ‘π = 1β3
hπ ππ
β¦
β¦
But we still donβt know how to solve this!
ΒΏ1 hπ π
What is the total resistance between these two points?
Surprise!
Leo Lavatelli, American Journal of Physics,Volume 40, pg 1248, September 1972
βThe Resistive Net and Finite-Difference Equationsβ
Surprise #2!
James Clerck Maxwell1831 - 1879
πΌ 1 πΌ 2 πΌ 3πΌ 0πΌβ1
Label the currents with indices to denote locations in the circuit.
Kirchhoffβs loop rule: πΌ 0β 4 πΌ1+πΌ 2=0πΌπβ 4 πΌπ+1+πΌπ+2=0
πΏππ‘ πΈ πΌπ= πΌπ+1 (1 β 4πΈ+πΈ2 ) πΌπ=0
πΈπππππ£πππ’ππ :πΈ πΌπ=π πΌπ π=2+β3
πΌ 1 πΌ 2 πΌ 3πΌ 0πΌβ1
Particular solution:
π=2+β3
πΌ ππ₯π‘
πΉππ ππππ>1 , πΌπ=1π πΌπβ1πΉππ ππππ<0 , πΌπ=
1π πΌπ+1
πΌ ππ₯π‘β πΌ 0+4 πΌ 1β πΌ2=0 ( πΌ ππ₯π‘β πΌ 0+ πΌ1 )π =π
πΌ 0=β πΌ1πππ πΌ 2=1π πΌ1
π =1β3
hπ ππ
This method generalizes to 2 dimensions!
πΌ 1,1 πΌ 2,1 πΌ 3,1πΌ 0,1πΌβ1,1
πΌ 1,0 πΌ 2,0 πΌ 3,0πΌ 0,0πΌβ1,0
πΌ 1 ,β1 πΌ 2 ,β1 πΌ 3 ,β 1πΌ 0 ,β 1πΌβ1 ,β 1
This method generalizes to 2 dimensions!
πΈπ₯ πΌπ ,π=πΌπ+1 ,π πΈπ¦ πΌπ ,π=πΌπ ,π+1
Current loops influence each other in a nonlinear way.
Horizontal and vertical equations are inseparable.
Interactions of two current loops: 1D chain
A B
Interactions of two current loops: 2D array
A
B
But a full solution involves multivariate calculusand the creation of appropriate Greenβs functions.
Complexity of solutions of 2D grids
Number of rows Order of polynomials Number of equations
1 2 1
2 4 2
3 6 6
7 14 924
20 40 35 billion
Fortunately the infinite dimensional 2D gridis βsimplerβ than a grid with 20 infinite rows.
ΒΏ1 hπ πWhat is the total
resistance between these two points?
Finite element: 1 hπ π
Infinite 1-D chain: 1β3
hπ ππ
Infinite 2-D array: 12 hπ ππ
ΒΏ1 hπ πWhat is the total
resistance between these two points?
Finite element:
Infinite 1-D chain: β32
hπ ππ
Infinite 2-D array: 2π hπ ππ
1 hπ π
ΒΏ1 hπ πWhat is the total
resistance between these two points?
Finite element:
Infinite 1-D chain:
Infinite 2-D array:
75 hπ π
( 4β3
β 1) hπ ππ
It will be left as an exercise for the reader to derive the resistance for
an infinite 2D array.
You have been nerd sniped.
All of the information you need is in the references, which are right hereβ¦
References:β’ Lavatelli, L., βThe Resistive Net and Finite-Difference
Equations,β American Journal of Physics, Volume 40, pg 1248,
β’ Gardner, M., βThe Calculus of Finite Differences,β reprinted in The Colossal Book of Mathematics, Norton & Co., 2001
β’ Levine, L., βThe Calculus of Finite Differences,β http://www.math.cornell.edu/~levine , Jan 2009
β’ MathPages.com, βInfinite Grid of Resistors,β http://mathpages.com/home/kmath668/kmath668.htm
β’ Munroe, R., xkcd.com
September, 1972
By the way, the answer isβ¦
π =8 βπ2π hπ ππ
DOOR PRIZES!Pesonally signed by randall munroe
grownups
purity