Title: Nature
1Natures Monte Carlo BakeryThe Story of Life as
a Complex System
2Who am I?
- Hong Chong Ming, Kenneth
- B. Sc. (Hons.), 2002, NUS
- Teaching assistant
- Graduate student (part-time)
- Dept. of Physics
- Office Block S13, Room 04-03
- Tel 68742631
- Email phyhcmk_at_nus.edu.sg
- URL http//staff.science.nus.edu.sg/phyhcmk/
- Research Theoretical Physics
- (General relativity, Black hole solutions)
3Topics covered
- Fractals
- Fractal Dimensions
- Information Theory
- Numbering Scheme in CA
4Fractals
What is fractal?
A fractal is a geometric object with a fractal
dimension that is self-similar on all scales.
A self-similar object is exactly or approximately
similar to a part of itself.
A curve is said to be self-similar if, for every
piece of the curve, there is a smaller piece that
is similar to it.
Question Is circle a self-similar object?
Koch snowflake
5Fractals
What is fractal?
Fractals are generally irregular (not smooth) in
shape and tend to have significant detail,
visible at any arbitrary scale when there is
self-similarity, this can occur because 'zooming
in' simply shows similar pictures.
A normal Euclidean shape, such as a circle, looks
flatter and flatter as it is magnified. At
infinite magnification it is impossible to tell
the difference between a circle and a straight
line. Fractals are NOT like this.
It should be noted that not all self-similar
objects are fractals e.g., a straight line.
6Fractals
What is fractal?
Approximate fractals are easily found in nature.
These naturally occurring fractals include like
clouds, mountains, river networks, systems of
blood vessels and etc.
Mountain
Lightening
Broccoli
7Fractals
Example of Fractals
Mandelbrot Set
Source http//en.wikipedia.org
8Fractals
Example of Fractals
Cantor Set
9Fractals
Example of Fractals
Sierpinski carpet
Source http//en.wikipedia.org
10Fractals
Example of Fractals
Sierpinski triangle
Source http//en.wikipedia.org
11Fractals
Example of Fractals
Dragon Curve
12Fractals
Example of Fractals
Julia set
13Fractals
Example of Fractals
Hilbert curve
Peano curve
Source http//mathworld.wolfram.com
14Fractals
Example of Fractals
Waterfall
15Fractals
Example of Fractals
Clouds
16Fractals
Example of Fractals
Trees
17Fractals
Example of Fractals
Cauliflowers
18Fractals
Example of Fractals
Jupiter
19Fractals
Example of Fractals
Fern
Tree
20Fractal Dimensions
Concept of Dimensionality
The dimension of space is the minimum number of
coordinates needed to specify the location of a
point uniquely in this space.
Consider a sheet of paper, the minimum number of
coordinates needed to specify a point is 2.
Hence, this is a 2-dimensional space.
What is the dimensionality of the space we are
living in?
21Fractal Dimensions
Concept of Dimensionality
In a dynamical system, the dimensionality is
defined by the number of state variables
(temperatures, pressure, etc) needed to describe
the dynamics of the system.
The dimensions are both integers in these cases
and non-integer values cannot occur.
The concept of dimensionality can be generalized
to allow non-integer values. A fractal shape is
characterized by a non-integer dimension.
HOW??
22Fractal Dimensions
1-dimensioanal Object
Consider a 1-dimensional smooth curve of length
L. This line is covered by N(e) 1-dimensional
segments each of length e. Dots are used to
represent the boundaries of each of the segments.
23Fractal Dimensions
1-dimensional Object
e
N(e)
1
L
L/3
3
L/9
9
On the top line, eL and N(e)1. At the next
level, we have divided the line into three parts.
Here, eL/3 and N(e)3L/e. In general, for any
line subdivided in the same manner, N(e)L/e.
24Fractal Dimensions
2-dimensional Object
L
L
eL, N(e)1
eL/3, N(e)9
eL/9, N(e)81
Consider a 2-dimensional square of side L. We
will cover the square with identical boxes of
side e and again determine N(e), the number of
boxes needed to fill the square. In this case, we
find that, in general, N(e)L2/e2.
25Fractal Dimensions
D-dimensional Object
We have seen that N(e)L/e in 1-dimensional case
and N(e)L2/e2 in 2-dimensional case. In three
dimensions, we would obviously obtain N(e)L3/e3
and generalizing, in D-dimensions
Taking the logarithm and solving for D, we obtain
26Fractal Dimensions
Capacity Dimension
Taking the limit as e0, ln(1/e)gtgtlnL and we
define the capacity dimension
The definition of the capacity dimension agrees
with our normal concept of dimensions.
27Fractal Dimensions
Cantor Set
e
N(e)
1
1
1/3
2
1/9
4
We take L1 for simplicity and count the number
of line segments N(e) needed to cover the unit
interval, i.e., we do not count the empty
segments.
28Fractal Dimensions
Cantor Set
On the kth step, we have e(1/3)k and N(e)2k.
The capacity dimension is
It has a fractal dimension intermediate between a
point (a 0-dimensional object) and a continuous
line (a 1-dimensional object).
The Cantor set has a fractal dimension, which
makes intuitive sense as it is more than a
point but not quite a solid line!
29Information Theory
Conversion between base 2 and 10
What is the number 100 in binary?
This reads as we have the divisor 50 and the
remainder 0 when 100 is divided by 2.
Read in this direction!
Stop until you get 0!
0
The number 100 in binary is 1100100.
30Information Theory
Conversion between base 2 and 10
What is the number 1100100 in decimal?
Right to left!
0 x 20 0 x 21 1 x 22 0 x 23 0 x 24 1 x
25 1 x 26 0 x 1 0 x 2 1 x 4 0 x 8 0
x 16 1 x 32 1 x 64 0 0 4 0 0 32
64 100
31Information Theory
Number of bits required
How many bits does one need to encode any
position in a string of 800 symbols?
The position of the symbols goes like 1, 2, 3, 4,
5, .. 800. To determine the number of bits
needed to encode any position, we only need to
determine the number of bits required to encode
the highest position. The highest position in
this case is 800.
We just need to convert the number 800 in binary
and count the bits required! Answer 10 bits
32Information Theory
Optimal coding
Suppose you are given a four-sided biased dice
with probability of 1/8 to obtain a 1 or a 2,
a probability of 1/4 to obtain a 3 and a
probability of 1/2 to obtain a 4. What is the
optimal code for transmitting the throws of this
dice?
To solve this problem, we have to first determine
the number of bits required to encode each of the
symbols respectively according to the formula
log2P.
Next, based on these, design the coding scheme
wisely without ambiguity. These will be the
optimal code to transmit this information.
33Information Theory
Optimal coding
Number of bits required
For symbol 1 -log2(1/8) 3 bits For symbol
2 -log2(1/8) 3 bits For symbol 3
-log2(1/4) 2 bits For symbol 4 -log2(1/2)
1 bit
Based on these, we know that the optimal codes
for the symbol 1, 2, 3 and 4 are 3 bits,
3 bits, 2 bits and 1 bit respectively.
34Information Theory
Optimal coding
To design the optimal coding scheme, we always
start from the simplest one, i.e. the one
requires the minimum number of bits.
We could choose the following coding scheme
4 0, 3 10, 2 110, 1 111
Of course, the coding scheme is not unique. We
could also choose
4 1, 3 01, 2 001, 1 000
35Information Theory
Optimal coding
However, the following scheme is not correct
4 0, 3 11, 2 110, 1 111
Lets say we have the string 110. Should be
decode it to be the symbol 2 or 34?
Therefore, the design of the optimal code must be
careful so that no ambiguity would be caused!
36Information Theory
Optimal coding
In general, the pattern of the optimal codes
would be as follow.
Lets look at the case of 8 symbols
0 10 110 1110 11110 111110 1111110 1111111
1 01 001 0001 00001 000001 0000001 0000000
OR
Of course, these patterns depend on our
distribution of the probabilities 1/2, 1/4, 1/8,
1/16, 1/32, 1/64, 1/128, 1/128.
37Numbering Scheme in CA
4
7
6
5
The first thing to notice is that the top is
always the same.
This is the part that changes.
0
3
2
1
Value 2
Value 4
Value 1
If we say that black is one and grey is zero,
then we can see that the top is just counting
from 7 to 0.
4
Value 4
Value 2
Value 1
3
38Numbering Scheme in CA
How about the bottom? We can do exactly the same
thing but since we have 8 boxes on the bottom
its counting from 0 to 255.
Value 128
Value 64
Value 16
Value 32
281664 90
Value 1
Value 8
Value 4
Value 2
39Numbering Scheme in CA
Now, it would be easier to determine the
numbering scheme if we are given the rules.
What is the numbering scheme for the following
rule?
Value 128
Value 64
Value 16
Value 32
21664128 210
Value 1
Value 8
Value 4
Value 2
40Numbering Scheme in CA
How to design the rule from the given numbering
scheme?
First, we convert the numbering scheme into its
binary.
Add the binary number 0 from the leftmost till
the number of bits is 8!
Color the bottom boxes according to the binary
numbers.
0 ? grey 1 ? black
41Numbering Scheme in CA
Design the rule for the numbering scheme 100.
0 1 1 0 0 1 0 0
the extra 0 bit
0
1
1
0
0
0
1
0
0