890 likes | 1.05k Views
Showed video of mountain landscape generated by the 4k file on this page: http://pouet.net/prod.php?which=52938. Mountain Video. A Random Talk About Random. Dave Feinberg. Which has more information?. The outcome of 2 coin flips: heads heads The outcome of 3 coin flips: tails tails heads.
E N D
Showed video of mountain landscape generated by the 4k file on this page: http://pouet.net/prod.php?which=52938 Mountain Video
A Random Talk About Random Dave Feinberg
Which has more information? The outcome of 2 coin flips: heads heads The outcome of 3 coin flips: tails tails heads
Which has more information? The outcome of 10 coin flips: "HHTTHTHTTT" A strand of 10 DNA bases: "ATTGACATGG" 10 decimal digits: "7523104698"
Units of Information bit = binary digit a single "0" or "1" outcome of 1 binary decision like a coin flip ten coin flips -> ten bits
Bits • How many bits do I need to store the outcome of one home pregnancy test? • A home pregnancy test reveals 1 bit of information. It may be the most important life-changing bit of information, but it's still just 1 bit.
Representing in Binary "HHTTHTHTTT" "H" = 0 "T" = 1 0011010111 How can we represent "ATTGACATGG" in binary?
Representing in Binary 2 bits to represent 1 DNA base "A" = 00 "C" = 01 "G" = 10 "T" = 11 ATTGACATGG 00111110000100111010 How many bits?
Representing in Binary bits per symbol = log2(possible symbols) 4 symbols: ACGT log24 = 2 bits per symbol
Representing in Binary How much information in "7523104698"? 10 possible symbols log210 = approx 3.32 bits per symbol 10 decimal digits = approx 33.2 bits Bogus! How many bits does it really take to represent 10 possible symbols?
decimal digits in 4 bits each 0 = 0000 5 = 0101 1 = 0001 6 = 0110 2 = 0010 7 = 0111 3 = 0011 8 = 1000 4 = 0100 9 = 1001 Seems wasteful. Can we do better?
decimal digit = 3 or 4 bits 0 = 000 5 = 101 1 = 001 6 = 1100 2 = 010 7 = 1101 3 = 011 8 = 1110 4 = 100 9 = 1111 What number is "0101011100"? On average: 3.4 bits per digit.
Which contains most information? • Outcome of 6 coin flips: "HHTHTT" • 3 DNA bases: "ATG" • 2 decimal digits: "74"
Information • more bits = more information • Right?
Memorizing Volunteer to memorize 8 bits • 00011110 Volunteer to memorize 50 bits • 00000000000000000000000000000000000000000000000000 Which is easier to memorize? Which contains more information?
Memorizing 00000000000000000000000000000000000000000000000000 Another volunteer to memorize 50 bits 00100011001110100110110001010001100010101001111001 Which is easier to memorize? Which contains more information? Why?
Information: another definition • Amount of information = length of shortest program that outputs those bits.
Write a program to print 00000000000000000000000000000000000000000000000000 for i in range(50): print "0",
Write a program to print 00100011001110100110110001 010001100010101001111001 print "00100011001110100110110001 010001100010101001111001"
Memorizing Programs print "00100011001110100110110001 010001100010101001111001" is harder to memorize than for i in range(50): print "0",
Therefore 00100011001110100110110001 010001100010101001111001 contains more information than 00000000000000000000000000000000000000000000000000
Information • More random = more information
Pi and Information • 3.14159265358979323846264338327... • How much information is stored in the digits of pi?
Calculating Pi pi = 4/1 - 4/3 + 4/5 - 4/7 + ...
Calculating Pi sign = 1 n = 1 pi = 0 while True: pi = pi + sign * 4.0 / n print pi sign = 0 - sign n = n + 2
Information in Pi The digits of pi are output by a short program. Therefore, pi does not contain very much information. (Then what does???)
Programs That Print Numbers Write a program to print 0.1 print "0.1"
Programs That Print Numbers Write a program to print 0.11111... print "0.", while True: print "1",
Programs That Print Numbers Write a program to print 0.121212... print "0.", while True: print "12",
Programs That Print Numbers Write a program to print 0.12112111211112111112... print "0.", ones = 1 while True: for i in range(ones): print "1", ones = ones + 1 print "2",
Programs That Print Numbers • Although 0.121121112... requires an infinite number of decimal digits, • It can be printed by a program of finite length.
Programs That Print Numbers • Are there any numbers that cannot be printed by a computer program? • Yes!
Programs That Print Numbers • A number that can be printed by a computer program is called a computable number. • A number that cannot be printed by a computer program is called an uncomputable number. • Are there a lot of uncomputable numbers?
If I point to a random point on the number line, what is the probability that I will point to an integer? A rational (fraction)? A computable number? The Number Line -1 0 1 2
Information and Science • more random = more information. • randomness = disorder. • In science, what do we usually call the measure of the amount of disorder in a system? • information = randomness = disorder = entropy • 2nd Law of Thermodynamics: In a system, a process that occurs will tend to increase the total entropy of the universe. • Does this tell us anything about information?
Something Different ... • We'll come back to random/information ... • Let's make some pictures
Tiling Squares Rewrite rule: Add square to long side.
Another Redraw Rule Shrink and arrange 3 copies
Fractals • A fractal is: • "a rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole"--a property called self-similarity. --Wikipedia • Fractals are recursive structures.
Triangles? • Why is the sierpinski triangle full of little triangles? Where did the triangles come from?
Squares ... Shrink and arrange 3 copies
Squares ... Shrink and arrange 3 copies
Squares ... Shrink and arrange 3 copies
Squares ... Shrink and arrange 3 copies