46
Introduction Background Programmatic approach Future Goals Converging on the Area of the Mandelbrot set Daniel Bittner and Winston Cheong Rowan University November 20, 2013 Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Presentation: Converging on the Area of the Mandelbrot Set

  • Upload
    rowan

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Introduction Background Programmatic approach Future Goals

Converging on the Area of the Mandelbrot

set

Daniel Bittner and Winston Cheong

Rowan University

November 20, 2013

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Outline1 Introduction2 Background

Mandelbrot SetLaurent series method

3 Programmatic approachCalculation specsLanguage ChoiceOptimizations

4 Future GoalsMathematical

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Student Research (Summer 2013)

Daniel Bittner - CS Major.

Winston Cheong - Math and CS Major.

Done in collaboration with Dr. Hieu Nguyen

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Outline1 Introduction2 Background

Mandelbrot SetLaurent series method

3 Programmatic approachCalculation specsLanguage ChoiceOptimizations

4 Future GoalsMathematical

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

Definitions

Definition (Mandelbrot set)

The set of values c ∈ C where the sequence {zn}, defined by

zn+1 = z2n + c, z0 = 0,

remains bounded.

Definition (Bounded)

A sequence {zn} is bounded if there exists some real number Lsuch that

|zn| 6 L

for all n.

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

Pictoral Representation

Figure: Pixels arecolored according tohow rapidly thesequence diverges

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

The open problem

What is the exact area of the Mandelbrot set?

Approaches Pixel counting - 1.5065918849(28)(Thorsten Forstemann 2012)Laurent series - 1.72 using 500K terms(Ewing, Schober)

Our goal Improve the estimates of the upper bound of thearea using the Laurent series method bycalculating 1 million b terms.

Result 1.(697) using 1.7M terms (B-C-N)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

The open problem

What is the exact area of the Mandelbrot set?

Approaches Pixel counting - 1.5065918849(28)(Thorsten Forstemann 2012)

Laurent series - 1.72 using 500K terms(Ewing, Schober)

Our goal Improve the estimates of the upper bound of thearea using the Laurent series method bycalculating 1 million b terms.

Result 1.(697) using 1.7M terms (B-C-N)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

The open problem

What is the exact area of the Mandelbrot set?

Approaches Pixel counting - 1.5065918849(28)(Thorsten Forstemann 2012)Laurent series - 1.72 using 500K terms(Ewing, Schober)

Our goal Improve the estimates of the upper bound of thearea using the Laurent series method bycalculating 1 million b terms.

Result 1.(697) using 1.7M terms (B-C-N)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

The open problem

What is the exact area of the Mandelbrot set?

Approaches Pixel counting - 1.5065918849(28)(Thorsten Forstemann 2012)Laurent series - 1.72 using 500K terms(Ewing, Schober)

Our goal Improve the estimates of the upper bound of thearea using the Laurent series method bycalculating 1 million b terms.

Result 1.(697) using 1.7M terms (B-C-N)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

The open problem

What is the exact area of the Mandelbrot set?

Approaches Pixel counting - 1.5065918849(28)(Thorsten Forstemann 2012)Laurent series - 1.72 using 500K terms(Ewing, Schober)

Our goal Improve the estimates of the upper bound of thearea using the Laurent series method bycalculating 1 million b terms.

Result 1.(697) using 1.7M terms (B-C-N)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mandelbrot Set

The open problem

What is the exact area of the Mandelbrot set?

Approaches Pixel counting - 1.5065918849(28)(Thorsten Forstemann 2012)Laurent series - 1.72 using 500K terms(Ewing, Schober)

Our goal Improve the estimates of the upper bound of thearea using the Laurent series method bycalculating 1 million b terms.

Result 1.(697) using 1.7M terms (B-C-N)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

How it works

Theorem ([Ewing-Schober, 1992])

Area is given by

Ar = π

[1 −

∞∑m=1

m|bm|2

]

with bm = β0,m+1, where βn,m is defined as

βn,0 = 1

βn,m = 0 (1 < m < 2n+1 − 1,n > 1)

βn,m =1

2

[βn+1,m −

m−2n+1+1∑k=2n+1−1

βn,kβn,m−k − β0,m−2n+1+1

]when (m > 2n+1 − 1,n > 0)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

βn,m Values

n \m 0 1 2 3 4 5 6 7 8 9 10

0 1 − 12

18 − 1

415128 0 − 47

1024 − 116

98732768 0 − 3673

262144

1 1 0 0 − 12

14 − 1

16 0 − 47256

116

152048 0

2 1 0 0 0 0 0 0 − 12

14 − 1

1618

3 1 0 0 0 0 0 0 0 0 0 0

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

Necessary Terms

A calculation up to 1,000,000 terms must contain

Zeros 2,048,536 zeros

β Values 17,951,464 values

β0,m Value calls 1,000,001,000,000 calls

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

Calculation Example

β1,10

β2,10

β3,103∑

k=7β1,kβ1,10−k

β0,3

7∑k=3

β1,kβ1,10−kβ0,7

β1,76∑

k=1β0,kβ0,7−k

β0,4

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

Visualizing the β series

n \m 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

0 1 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

1 1 0 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

2 1 0 0 0 0 0 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ∗ ∗

βn,m1

2( βn+1,m -

m−2n+1+1∑k=2n+1−1

βn,kβn,m−k - β0,m−2n+1+1 )

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

Visualizing the β series

n \m 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

0 1 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

1 1 0 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

2 1 0 0 0 0 0 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ∗ ∗

βn,m =1

2( βn+1,m -

m−2n+1+1∑k=2n+1−1

βn,kβn,m−k - β0,m−2n+1+1 )

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

Iterative Method

N\M 0 1 2 3 4 5 6 7 8

0 1 β0,1 β0,2 β0,3 β0,4 β0,5 β0,6 β0,7 β0,8

1 1 0 0 β1,3 β1,4 β1,5 β1,6 β1,7 β1,8

2 1 0 0 0 0 0 0 β2,7 β2,8

3 1 0 0 0 0 0 0 0 0

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

Known results

Theorem ([Ewing-Schober, 1992])

1 If m = (2k+ 1)2v, with k, v ∈ Z, k > 0, 2v > k+ 3,then bm = 0.

2 If m = (2v+1 − 3)2v and v > 1, then bn = −1

m

(2v−3/2

2v−1

).

Theorem (Ahmed-N)

Let n and m be integers such that n > 0 and2n+1 − 1 6 m 6 2n+2 − 3. Then for every p ∈ N, we have

βn,m = βn+p,m+2n+1(2p−1) = −1

2β0,m−2n+1+1

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

New results I

Theorem

Let n be a non-negative integer. Thenβn,2n+2−2 = −1

2(β0,2n+1−1 +

14)

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

New results II

Proof.Recall that βn,m = −1

2β0,m−2n+1+1 for n > 0 and

2n+1 − 1 6 m 6 2n+2 − 3. We have

βn,2n+2−2 =1

2

βn+1,2n+2−2 −

2n+1−1∑k=2n+1−1

βn,kβn,2n+2−2−k − β0,2n+1−1

=

1

2

[0 − β2

n,2n+1−1 − β0,2n+1−1

]=

1

2

[−

1

4β20,0 − β0,2n+1−1

]= −

1

2

[β0,2n+1−1 +

1

4

]Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

New results III

Theorem

Let n be a non-negative integer. Then βn,2n+2 = 116

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

New results IV

Proof.Recall that βn,m = −1

2β0,m−2n+1+1 for n > 0 and

2n+1 − 1 6 m 6 2n+2 − 3. We have

βn,2n+2 =1

2

βn+1,2n+2 −

2n+1+1∑k=2n+1−1

βn,kβn,2n+2−k − β0,2n+1+1

=

1

2

[−

1

2β0,1 − 2βn,2n+1−1βn,2n+1+1 − β

2n,2n+1 − b0,2n+1

]=

1

2

[−

1

2β0,1 −

1

2β0,0β0,2 −

1

4β20,1 − 0

]=

1

2

[−

1

2(−1/2) −

1

2(1)(1/8) −

1

4(−1/2)2

]= 1/16

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Laurent series method

New results V

Theorem

Let n > 2 be an integer. Then βn,2n+2+2 = −12β0,2n+1+3.

Let n > 2 be an integer. Then βn,2n+2+4 = −12β0,2n+1+5.

Let n > 3 be an integer. Then βn,2n+2+6 = −12β0,2n+1+7.

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Outline1 Introduction2 Background

Mandelbrot SetLaurent series method

3 Programmatic approachCalculation specsLanguage ChoiceOptimizations

4 Future GoalsMathematical

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Calculation specs

Processing Power

cc1.rowan.edu, Rowan cluster, 8 quad-core processers, 32GB of ram

2 GB 800 MHz DDR2 SDRAM, 2.13 Ghz Intel Core 2Duo, Mac OS X 10.6.8

32 GB 1066 MHz DDR3 RAM, 3.2 Ghz quad-core IntelXeon, Mac OS X 10.7.5

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Calculation specs

Procedure

Calculated β values are stored into a file

Stored as double-precision floating point decimal

Terms calculated in batches of 10,000 or 100,000

Batches begin by reading stored values to rebuild thedata structure and resume calculation.

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Language Choice

Language comparison

Language Execution Typing Scripting Compiling

C++ Compiled Static Procedural,Functional,Obj Oriented

Machine Code

Java Compiled Static Obj Oriented BytecodePython Interpretative Dynamic Procedural,

FunctionalNon-compiled

Table: Language comparison

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Language Choice

Language Timings Table

Terms bm Python(sec) Java(sec) C++(sec) Terms bm Python(sec) Java(sec) C++(sec)100 0.01 0.04 0.02 1100 15.47 6.41 5.78200 0.05 0.11 0.11 1200 21.95 8.66 7.45300 0.16 0.33 0.27 1300 30.10 11.86 9.43400 0.39 0.47 0.51 1400 40.23 15.35 11.54500 0.81 0.74 0.85 1500 52.49 19.67 13.88600 1.55 1.01 1.30 1600 67.49 25.15 16.55700 2.70 1.61 1.88 1700 85.27 31.68 19.61800 4.43 2.23 2.59 1800 106.36 39.10 23.29900 6.96 3.17 3.46 1900 131.02 47.62 27.58

1000 10.55 4.70 4.50 2000 159.725 58.17 32.49

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Language Choice

Memoization

Each βn,m calculation requires m− 2n+1 + 2 otherβ terms.

Storing and calling previously computed β values from a datastructure reduces calculation time

Terms bm pure recursion(sec) Terms bm stored values(sec)10 2.56 1000 6.1711 9.20 1100 7.0312 43.26 1200 9.6013 164.38 1300 11.9514 594.49 1400 13.63

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Half Convolution

Definition (Half Convolution)

m−2n+1+1∑k=2n+1−1

βn,kβn,m−k

=

2(

m/2−1∑k=2n+1−1

βn,kβn,m−k) + (βn,m/2)2 if m even

2((m−1)/2∑k=2n+1−1

βn,kβn,m−k) if m odd

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Half Convolution

Example

β1,10 convolution = β1,3β1,7 + β1,4β1,6 + β1,5β1,5

+ β1,6β1,4 + β1,7β1,3

β1,10 half convolution = 2(β1,3β1,7 + β1,4β1,6) + β1,5β1,5

The half convolution will calculate at most m/2 + 1 terms ofthe convolution for a non-zero convolution

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Convolution Timings

Terms bm Convolution(sec) Half Convolution(sec)1000 1.31 0.702000 6.46 3.733000 17.94 12.154000 36.18 25.545000 61.35 44.146000 94.28 67.057000 135.56 96.318000 186.10 131.429000 246.01 170.17

10000 315.54 214.26

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Precision

Theorem (Ewing-Schober)

22m+3−2(n+2)βn,m is an integer for n > 0 and m > 1

22m+1bm is an integer for m > 0

If we set Bn,m = 22m+3−2(n+2)βn,m, then

Definition (Ewing-Schober)

Bn−1,m = 22n+1−1Bn,m

− 22n+1−4

m−2n+1∑k=2n−1

Bn−1,kBn−1,m−k

− 2B0,m−2n+1

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Doubles and Unlimited Precision Integers

Definition (β and B)

β0,50 = 0.002286919608197B0,50 = 890433596703485058699231232

Integers quickly reach 100’s of digits long

10,000 integers - 5 MB file size

10,000 doubles - 2.9 MB file size

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Precision Timings

Terms bm Integers(sec) Doubles(sec)1000 4.68 3.612000 33.52 16.253000 133.78 39.194000 365.65 73.685000 777.67 119.376000 1438.78 177.657000 2441.06 248.638000 3880.82 330.539000 5854.09 423.86

10000 8479.87 529.62

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Multithreading and Parallelization

Definition (Single-Threaded)

Each calculation is executed in order one-by-one

This is how processing is normally handled

Time is lost waiting for independent calculations to complete

Definition (Multi-Threading)

Multiple calculations are run simultaneously

Requires multiple processor cores

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

Visualizing MultiThreading

N/M . . . 15 16 17 18 19

0 . . . β0,15 β0,16 β0,17 β0,18 β0,19

1 . . . β1,15 β1,16 β1,17 β1,18 β1,19

2 . . . β2,15 β2,16 β2,17 β2,18 β2,19

3 . . . β3,15 β3,16 β3,17 β3,18 β3,19

4 . . . 0 0 0 0 0

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

MultiThreaded Implementation

Thread Handles a single column βn,m to β0,m run inparallel with adjacent columns

Mutex Locks calculation of β0,m until β0,m−1 has beencalculated

Boost C++ Multi-threading library used to handle the threadgeneration

Results

Multi-Threading is faster once column calculation time savingsexceeds absolute cost of thread creation

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

SingleThreaded and MultiThreading Comparision

At small m, initial time and resource costs of threadcreation have relatively high cost. Single threaded wasfaster.

With large m, total time longer, lowering relative cost ofthread creation. MultiThreading becomes preferredapproach.

At approximately 30,000 terms, a single threaded andmulti threaded approach will calculate the next 1000terms in the same amount of time

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Optimizations

MultiThreading Timings

Terms SingleThreaded per 1000 MultiThreaded per 1000 Terms SingleThreaded per 1000 MultiThreaded per 100021000 79.57 79.57 86.67 86.67 61000 334.43 334.43 317.45 317.4522000 166.41 86.84 183.82 97.15 62000 675.78 341.35 645.51 328.0623000 258.72 92.31 287.14 103.32 63000 1024.23 348.45 975.33 329.8224000 358.61 99.89 395.01 107.87 64000 1376.50 352.27 1307.46 332.1325000 477.39 118.78 510.37 115.36 65000 1738.57 362.07 1644.9 337.4426000 592.79 115.4 629.30 118.93 66000 2107.39 368.82 1990.25 345.3527000 713.81 121.02 756.41 127.11 67000 2484.35 376.96 2340.24 349.9928000 836.34 122.53 886.59 130.18 68000 2894.49 410.14 2693.84 353.6029000 969.25 132.91 1022.9 136.31 69000 3355.43 460.94 3055.19 361.3530000 1111.76 142.51 1164.45 141.55 70000 3823.92 468.49 3423.97 368.78

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Outline1 Introduction2 Background

Mandelbrot SetLaurent series method

3 Programmatic approachCalculation specsLanguage ChoiceOptimizations

4 Future GoalsMathematical

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mathematical

β properties

Conjecture

Let n > 0 and m > 2n+2 − 2. Write m in the formm = 2n + 2qk where q is a non-negative integer q and k is

an odd positive integer. Set p =⌈2m+3−2n+2

2q+1−1

⌉. Then 2pβn,m

is an integer.

We see a fractal nature in both the b and β values.

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mathematical

Future Goals

Continue calculating additional terms of the series

Implementation of MPI (Message Passing Interface) formultiple processors

Inter-processor communication between 4 processors onthe CC cluster.

Daniel Bittner and Winston Cheong Area of the Mandelbrot set

Introduction Background Programmatic approach Future Goals

Mathematical

J. Ewing and G. Schober.The area of the Mandelbrot set.Numerische Mathematik, 61 (1992), 59 - 72.

Daniel Bittner and Winston Cheong Area of the Mandelbrot set