chaos and collatz - a simple mapcu boulder applied math a brief introduction to the collatz problem...
TRANSCRIPT
-
CU Boulder Applied Math
Chaos and Collatz - A Simple MapAPPM 3010, University of Colorado, Boulder
December 13, 2016
Zoë Farmer
Zoë Farmer Collatz December 13, 2016 1 / 31
-
CU Boulder Applied Math
A Brief Introduction to the Collatz ProblemLet x be an arbitrary positive number, i.e. x ∈ Z, x > 0. Definef : Z → Z as the following.
f (x) ={
x/2 x ≡ 0 mod 23x + 1 x ≡ 1 mod 2
Now define the sequence Cx as the iteration of this function,
Cx ,n+1 = f (Cx ,n)
The Collatz Conjecture states that for any input number x , Cx willgo to one as n goes to infinity. In limit form,
limn→∞
Cx ,n = 1
Zoë Farmer Collatz December 13, 2016 2 / 31
-
CU Boulder Applied Math
Professional Opinions
Paul Erdös once said, “Mathematics is not yet ready for suchproblems.”
Zoë Farmer Collatz December 13, 2016 3 / 31
-
CU Boulder Applied Math
Visualizing the Problem
• Collatz was famous for visualizing this as a directed graph• Two different ways• Top Down - Pick a number and iterate• Bottom up - Make branches
Zoë Farmer Collatz December 13, 2016 4 / 31
-
CU Boulder Applied Math
Top Down Algorithm
1 Initialize an array of edges called E .2 Let i = 2.3 Find the corresponding Collatz Sequence for i , Ci .4 Add edges to E of the form (Ci ,n,Ci ,n+1).5 Let i = i + 1 and go to 3.
Table: Top Down Collatz Graph Algorithm
Zoë Farmer Collatz December 13, 2016 5 / 31
-
CU Boulder Applied Math
Top Down Graph
Figure: Directed Graph of the Collatz Sequence from 1 to 20Zoë Farmer Collatz December 13, 2016 6 / 31
-
CU Boulder Applied Math
Bottom Up Algorithm
1 Initialize an array of edges called E .2 Initialize an array of “start nodes”, called S.3 Set the depth D.4 Initialize a queue, Q, filled with (Si ,D).5 Get (s, d) from the queue. If |Q| = 0, break.6 Set x1 = 2s, and x2 = (2x − 1)/3.7 Add (x1, s) to E .8 If s ≡ 4 mod 6, add (x2, s) to E , else do nothing.9 If d = 0, go to 12, else continue.10 Add (x1, d − 1) to Q.11 If s ≡ 4 mod 6, add (x2, d − 1) to Q, else do nothing.12 Go to 5
Table: Bottom Up Collatz Graph Algorithm
Zoë Farmer Collatz December 13, 2016 7 / 31
-
CU Boulder Applied Math
Bottom Up Graph
Figure: Directed Graph of the Collatz Sequence from 1 to 10Zoë Farmer Collatz December 13, 2016 8 / 31
-
CU Boulder Applied Math
Let’s scale things up a bit
Figure: Directed Graph of the Collatz Sequence from 1 to 25
Zoë Farmer Collatz December 13, 2016 9 / 31
-
CU Boulder Applied Math
Figure: Directed Graph of the Collatz Sequence from 1 to 100Zoë Farmer Collatz December 13, 2016 10 / 31
-
CU Boulder Applied Math
Figure: Directed Graph of the Collatz Sequence from 1 to 1000Zoë Farmer Collatz December 13, 2016 11 / 31
-
CU Boulder Applied Math
Figure: Directed Graph of the Collatz Sequence from 1 to 50Zoë Farmer Collatz December 13, 2016 12 / 31
-
CU Boulder Applied Math
What else can we look for?
• Maximal point achieved during iteration• Histogram of exit times for the first million numbers
Zoë Farmer Collatz December 13, 2016 13 / 31
-
CU Boulder Applied Math
Longest Chain
Figure: Problem 14 on ProjectEuler
This results in the number 837799 which has a chain 526 entries long.
Zoë Farmer Collatz December 13, 2016 14 / 31
-
CU Boulder Applied Math
Through a Chaos Theory Lens
Figure: Cobweb of Several Collatz Sequences
Zoë Farmer Collatz December 13, 2016 15 / 31
-
CU Boulder Applied Math
Stable Orbit?We seem to have a super-stable attractor at 1, which matches ourCollatz Conjecture.
Figure: Cobweb of Several More Collatz Sequences
Zoë Farmer Collatz December 13, 2016 16 / 31
-
CU Boulder Applied Math
But is it Chaotic?
Although no universally accepted mathematical definition of chaosexists, a commonly used definition originally formulated by Robert L.Devaney says that, to classify a dynamical system as chaotic, it musthave these properties:
1 it must be sensitive to initial conditions2 it must be topologically mixing3 it must have dense periodic orbits
Zoë Farmer Collatz December 13, 2016 17 / 31
-
CU Boulder Applied Math
Sensitive Dependence?
Figure: Initial Sensitivity
Zoë Farmer Collatz December 13, 2016 18 / 31
-
CU Boulder Applied Math
Dense Orbits?
Figure: Dense Orbits from 1 to 300
Zoë Farmer Collatz December 13, 2016 19 / 31
-
CU Boulder Applied Math
Lyapunov ExponentsWe can try to find these, but we immediately run into a problem.
Figure: Lyapunov Exponent Estimation
Zoë Farmer Collatz December 13, 2016 20 / 31
-
CU Boulder Applied Math
Generalization - To All IntegersThe same rules apply.
Zoë Farmer Collatz December 13, 2016 21 / 31
-
CU Boulder Applied Math
Where do all Integers end up??
Figure: Histogram of Orbits for all Points from −10, 000 to 10, 000
Zoë Farmer Collatz December 13, 2016 22 / 31
-
CU Boulder Applied Math
Large Cobweb
Zoë Farmer Collatz December 13, 2016 23 / 31
-
CU Boulder Applied Math
Generalization - To all Real Numbers
By noting that the two operations alternate, we can define a functionaccordingly.
f (x) = 12x cos2(π
2 x)+ (3x + 1) sin2
(π2 x
)
Zoë Farmer Collatz December 13, 2016 24 / 31
-
CU Boulder Applied Math
A More Accurate Cobweb
Figure: Collatz Conjecture Real Extension
Zoë Farmer Collatz December 13, 2016 25 / 31
-
CU Boulder Applied Math
Dense Sampling from 1 to 5
Figure: Orbits on the Real Collatz Map
Zoë Farmer Collatz December 13, 2016 26 / 31
-
CU Boulder Applied Math
Example Orbits
Figure: Orbits on the Real Collatz Map
Zoë Farmer Collatz December 13, 2016 27 / 31
-
CU Boulder Applied Math
Escaping?
Let’s find orbits that don’t escape.
1 Initialize a space of possible orbits called O.2 Set i = 1.3 Find the Collatz Sequence for Oi .4 If this sequence converges to an orbit, Oi is stable.5 Set i = i + 1 and go to 3.
Table: Finding Stable Orbits
Only 10% of the densely sampled orbits shown previously converge!
Zoë Farmer Collatz December 13, 2016 28 / 31
-
CU Boulder Applied Math
Fractals
This is well-behaved for complex numbers as well.
f (z) = 12z cos2(π
2 z)+ (3z + 1) sin2
(π2 z
)And since it shows this escaping behavior we can create a fractal inthe same way that Mandelbrot, etc. are created.The next slide shows a portion from −1 − i to 2.5 + i .
Zoë Farmer Collatz December 13, 2016 29 / 31
-
CU Boulder Applied Math
Final Thoughts
• It’s a fascinating one-dimensional map• I would hesitate to call it “chaotic” in the mathematical sense.• Is the conjecture true? Maybe... As far as I can tell yes.
Zoë Farmer Collatz December 13, 2016 31 / 31