52

An irrational obsession and The Electric Google Application Test

  • Upload
    sancho

  • View
    38

  • Download
    0

Embed Size (px)

DESCRIPTION

An irrational obsession and The Electric Google Application Test. . . (dot dot dot). My obsession began:. …. And then, . o n my birthday,. September 27, 1998. t his appeared…. Over $30 billion in profits in 2011. Electric circuits? Google?. - PowerPoint PPT Presentation

Citation preview

Page 1: An irrational obsession and The Electric Google Application Test
Page 2: An irrational obsession and The Electric Google Application Test

An irrational obsessionand

The Electric GoogleApplication Test

 

 

     

 

   

Page 3: An irrational obsession and The Electric Google Application Test

√2¿1.414213562373 0950 4880168872420969807856967187537694807317667973799073247846210703 88503875343276415727350138462309122970249248360558507372126441214970999358314132226 6592750559275579995050115278206057147010955997160597027453459686201472851741864088 919860955232923048430871432145083976260362799525140799

(dot dot dot)

Page 4: An irrational obsession and The Electric Google Application Test

My obsession began:

√2=1.414213575=1.4000000000000 …

9970=1.4142857142857 …

81195741=1.4142135 …

62373095 …

Page 5: An irrational obsession and The Electric Google Application Test

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.

Page 6: An irrational obsession and The Electric Google Application Test

Imagine an electric circuit composed of an infinitenumber of 1-ohm resistors in a 2-dimensional grid.

 ¿1 h𝑜 𝑚

Page 7: An irrational obsession and The Electric Google Application Test

What really happens inside an electric circuit:

Page 8: An irrational obsession and The Electric Google Application Test

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?

Page 9: An irrational obsession and The Electric Google Application Test

xkcd by Randall MunroeNotice that mathematicians’ brains are

more expensive than physicists’ brains (because physicists’ brains are used).

Page 10: An irrational obsession and The Electric Google Application Test

Is rational?

Assume it is.Then

And now back to

Page 11: An irrational obsession and The Electric Google Application Test

, , {𝑎 ,𝑏∈ℤ }{𝑎 ,𝑏∈ℤ }

,,

{𝑎 ,𝑏 ,𝑐∈ℤ }4𝑐2

,{𝑎 ,𝑏 ,𝑐 ,𝑑∈ℤ }

, ,

𝑎2

,

√2=𝑎𝑏=

2𝑐2𝑑=

𝑐𝑑¿2𝑒2 𝑓 =

𝑒𝑓 =…

{𝑎 ,𝑏 ,𝑐 ,𝑑 ,𝑒 , 𝑓 …∈ℤ }𝑎>𝑏>𝑐>𝑑>𝑒> 𝑓 >…>0

𝑖𝑓 √2= 𝑎𝑏 , {𝑎 ,𝑏∈ℤ } , h𝑡 𝑒𝑛

∴√2 𝑖𝑠𝑖𝑟𝑟𝑎𝑡𝑖𝑜𝑛𝑎𝑙 .

Page 12: An irrational obsession and The Electric Google Application Test

√3=𝑎𝑏=

3𝑐3𝑑=

𝑐𝑑¿3𝑒3 𝑓 =

𝑒𝑓 =…

{𝑎 ,𝑏 ,𝑐 ,𝑑 ,𝑒 , 𝑓 …∈ℤ }𝑎>𝑏>𝑐>𝑑>𝑒> 𝑓 >…>0

𝑖𝑓 √3=𝑎𝑏 , {𝑎 ,𝑏∈ℤ }, h𝑡 𝑒𝑛

∴√3 𝑖𝑠𝑖𝑟𝑟𝑎𝑡𝑖𝑜𝑛𝑎𝑙 .

Page 13: An irrational obsession and The Electric Google Application Test

√ 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.

Page 14: An irrational obsession and The Electric Google Application Test

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

Page 15: An irrational obsession and The Electric Google Application Test

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?

Page 16: An irrational obsession and The Electric Google Application Test

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 …

Page 17: An irrational obsession and The Electric Google Application Test

The Golden Ratio: = 1.61803398874989…

Page 18: An irrational obsession and The Electric Google Application Test

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

Page 19: An irrational obsession and The Electric Google Application Test

𝐹 𝑛+ 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 …

Page 20: An irrational obsession and The Electric Google Application Test

𝜆+¿=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.)

Page 21: An irrational obsession and The Electric Google Application Test

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

Page 22: An irrational obsession and The Electric Google Application Test

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 )

Page 23: An irrational obsession and The Electric Google Application Test

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

Page 24: An irrational obsession and The Electric Google Application Test

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

Page 25: An irrational obsession and The Electric Google Application Test

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

Page 26: An irrational obsession and The Electric Google Application Test

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

Page 27: An irrational obsession and The Electric Google Application Test

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

Page 28: An irrational obsession and The Electric Google Application Test

What does any of this have to do with the Google problem???

 ¿1 h𝑜 𝑚

What is the total resistance between these two points?

Page 29: An irrational obsession and The Electric Google Application Test

What really happens inside an electric circuit:

Page 30: An irrational obsession and The Electric Google Application Test

  ¿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

Page 31: An irrational obsession and The Electric Google Application Test

  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

+…

Page 32: An irrational obsession and The Electric Google Application Test

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…

Page 33: An irrational obsession and The Electric Google Application Test

  

   

 

 

 

𝑅=(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 …

 

Page 34: An irrational obsession and The Electric Google Application Test

𝑇𝑜𝑡𝑎𝑙𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑜𝑓 𝑎𝑙𝑙 𝑟𝑒𝑠𝑖𝑠𝑡𝑜𝑟𝑠=𝜑 h𝑜 𝑚𝑠

  

   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

…   

  

  

…   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

𝑇𝑜𝑡𝑎𝑙𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑜𝑓 𝑎𝑙𝑙 𝑟𝑒𝑠𝑖𝑠𝑡𝑜𝑟𝑠=√2 h𝑜 𝑚𝑠

 

      

 

   

Page 35: An irrational obsession and The Electric Google Application Test

𝑇𝑜𝑡𝑎𝑙𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑜𝑓 𝑎𝑙𝑙 𝑟𝑒𝑠𝑖𝑠𝑡𝑜𝑟𝑠=√3 h𝑜 𝑚𝑠

 

  

  

…   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

      

 

     

  

  

 

 

 

 

 

 

 

 

 

   

 

 

 

 

   

 

 

 

 

   

 

 

… 

Page 36: An irrational obsession and The Electric Google Application Test

𝑇𝑜𝑡𝑎𝑙𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑏𝑒𝑡𝑤𝑒𝑒𝑛 h𝑡 𝑒𝑟𝑒𝑑𝑑𝑜𝑡𝑠= 1√3

h𝑜 𝑚𝑠

 

 …

 

  

  

 

 

 

 

 

 

 

 

 

   

 

 

 

 

   

 

 

 

 

   

 

 

… 

 

 

Page 37: An irrational obsession and The Electric Google Application Test

But we still don’t know how to solve this!

 ¿1 h𝑜 𝑚

What is the total resistance between these two points?

Page 38: An irrational obsession and The Electric Google Application Test

Surprise!

Leo Lavatelli, American Journal of Physics,Volume 40, pg 1248, September 1972

“The Resistive Net and Finite-Difference Equations”

Page 39: An irrational obsession and The Electric Google Application Test

Surprise #2!

James Clerck Maxwell1831 - 1879

 

 

 

 

 

   

 

  

  

Page 40: An irrational obsession and The Electric Google Application Test

 

 

 

 

 

   

 

 

 

 

 

 

 

𝐼 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

Page 41: An irrational obsession and The Electric Google Application Test

 

 

 

 

 

   

 

 

 

 

 

 

 

𝐼 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𝑜 𝑚𝑠

Page 42: An irrational obsession and The Electric Google Application Test

 

 

 

 

 

   

 

 

 

 

 

 

 

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

Page 43: An irrational obsession and The Electric Google Application Test

This method generalizes to 2 dimensions!

𝐸𝑥 𝐼𝑚 ,𝑛=𝐼𝑚+1 ,𝑛 𝐸𝑦 𝐼𝑚 ,𝑛=𝐼𝑚 ,𝑛+1

Current loops influence each other in a nonlinear way.

Horizontal and vertical equations are inseparable.

Page 44: An irrational obsession and The Electric Google Application Test

 

 

 

 

 

   

 

 

 

 

 

 

 

Interactions of two current loops: 1D chain

A B

Page 45: An irrational obsession and The Electric Google Application Test

 

 

 

 

 

   

 

 

 

 

 

 

 

Interactions of two current loops: 2D array

 

 

 

 

 

 

 

   

 

 

 

 

 

 

 

   

A

B

Page 46: An irrational obsession and The Electric Google Application Test

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.

Page 47: An irrational obsession and The Electric Google Application Test

 ¿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𝑜 𝑚𝑠

Page 48: An irrational obsession and The Electric Google Application Test

 ¿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𝑜 𝑚

Page 49: An irrational obsession and The Electric Google Application Test

 ¿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𝑜 𝑚𝑠

Page 50: An irrational obsession and The Electric Google Application Test

It will be left as an exercise for the reader to find the resistance

for an infinite 2D array.

We are officially out of time.

All of the information you need is in the references, which are right here…

Page 51: An irrational obsession and The Electric Google Application Test

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

Page 52: An irrational obsession and The Electric Google Application Test