![Page 1: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/1.jpg)
David Evanshttp://www.cs.virginia.edu/evans
Class 15: Golden Ages and Astrophysics CS200: Computer Science
University of VirginiaComputer Science
![Page 2: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/2.jpg)
21 February 2003 CS 200 Spring 2003 2
Science’s Endless Golden Age
![Page 3: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/3.jpg)
21 February 2003 CS 200 Spring 2003 3
Astrophysics• “If you’re going to use your computer to simulate
some phenomenon in the universe, then it only becomes interesting if you change the scale of that phenomenon by at least a factor of 10. … For a 3D simulation, an increase by a factor of 10 in each of the three dimensions increases your volume by a factor of 1000.”
• How much work is astrophysics simulation (in notation)?
(n3)When we double the size of the simulation, the work octuples! (Just like oceanography octopi simulations)
![Page 4: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/4.jpg)
21 February 2003 CS 200 Spring 2003 4
Orders of Growth
0
200
400
600
800
1000
1200
1 2 3 4 5 6 7 8 9 10
logn n
nlogn n̂ 2
n̂ 3
bubblesort
simulatinguniverse
insertsort-tree
![Page 5: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/5.jpg)
21 February 2003 CS 200 Spring 2003 5
Astrophysics and Moore’s Law• Simulating universe is (n3)• Moore’s law: computing power
doubles every 18 months• Tyson: to understand something
new about the universe, need to scale by 10x
• How long does it take to know twice as much about the universe?
![Page 6: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/6.jpg)
21 February 2003 CS 200 Spring 2003 6
;;; doubling every 18 months = ~1.587 * every 12 months(define (computing-power nyears) (if (= nyears 0) 1 (* 1.587 (computing-power (- nyears 1)))))
;;; Simulation is (n3) work(define (simulation-work scale) (* scale scale scale))
(define (log10 x) (/ (log x) (log 10))) ;;; log is base e;;; knowledge of the universe is log 10 the scale of universe
;;; we can simulate(define (knowledge-of-universe scale) (log10 scale))
Knowledge of the Universe
![Page 7: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/7.jpg)
21 February 2003 CS 200 Spring 2003 7
(define (computing-power nyears) (if (= nyears 0) 1 (* 1.587 (computing-power (- nyears 1))))) ;;; doubling every 18 months = ~1.587 * every 12 months(define (simulation-work scale) (* scale scale scale)) ;;; Simulation is O(n^3) work(define (log10 x) (/ (log x) (log 10))) ;;; primitive log is natural (base e)(define (knowledge-of-universe scale) (log10 scale)) ;;; knowledge of the universe is log 10 the scale of universe we can simulate
(define (find-knowledge-of-universe nyears) (define (find-biggest-scale scale) ;;; today, can simulate size 10 universe = 1000 work (if (> (/ (simulation-work scale) 1000) (computing-power nyears)) (- scale 1) (find-biggest-scale (+ scale 1)))) (knowledge-of-universe (find-biggest-scale 1)))
Knowledge of the Universe
![Page 8: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/8.jpg)
21 February 2003 CS 200 Spring 2003 8
> (find-knowledge-of-universe 0)1.0> (find-knowledge-of-universe 1)1.041392685158225> (find-knowledge-of-universe 2)1.1139433523068367> (find-knowledge-of-universe 5)1.322219294733919> (find-knowledge-of-universe 10)1.6627578316815739> (find-knowledge-of-universe 15)2.0> (find-knowledge-of-universe 30)3.00560944536028> (find-knowledge-of-universe 60)5.0115366121349325> (find-knowledge-of-universe 80)6.348717927935257
Will there be any mystery left in the Universe when you die?
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Albert Einstein
![Page 9: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/9.jpg)
21 February 2003 CS 200 Spring 2003 9
Any Harder Problems?
• Understanding the universe is (n3)
• Are there any harder problems?
![Page 10: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/10.jpg)
21 February 2003 CS 200 Spring 2003 10
Who’s the real genius?
![Page 11: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/11.jpg)
21 February 2003 CS 200 Spring 2003 11
Solving the Peg Board Game
• Try all possible moves
• Try all possible moves from the positions you get after each possible first move
• Try all possible moves from the positions you get after trying each possible move from the positions you get after each possible first move
• …
![Page 12: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/12.jpg)
21 February 2003 CS 200 Spring 2003 12
Possible Moves
StartPeg board gamen = number of holesInitially, there are n-1 pegs.
Cracker Barrel’s game hasn = 15
Assume there arealways exactly 2 possible moves,how many possiblegames are there?
![Page 13: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/13.jpg)
21 February 2003 CS 200 Spring 2003 13
Cracker Barrel Game
• Each move removes one peg, so if you start with n-1 pegs, there are up to n-2 moves
• Assume (conservatively) there are just two possible choices for every move.
2 * 2 * 2 * 2 * … * 2 = 2n-2
• For n = 15, there are 213 = 8192
![Page 14: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/14.jpg)
21 February 2003 CS 200 Spring 2003 14
All Cracker Barrel Games(starting with peg 2 1 missing)
Pegs Left
Number of Ways
Fraction of Games
IQ Rating
1 1550 0.01 “You’re Genius”2 20686 0.15 “You’re Purty Smart”3 62736 0.46 “Just Plain Dumb”4 46728 0.33
“Just Plain
Eg-no-ra-moose”
5 5688 0.04
6 374 0.0027
7 82 0.00058
10 2 0.00001
![Page 15: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/15.jpg)
21 February 2003 CS 200 Spring 2003 15
How much work is our straightforward peg board
solving procedure?
Note: I don’t know if this is the best possible procedure for solving the peg board puzzle. So the peg board puzzle problem might not be harder than understanding the Universe (but it probably is.)
(2n)
![Page 16: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/16.jpg)
21 February 2003 CS 200 Spring 2003 16
True Genius?“Genius is one percent inspiration, and ninety-nine percent perspiration.”
Thomas Alva Edison
“Genius is one percent sheer luck, but it takes real brilliance to be a true eg-no-ra-moose.”
Cracker Barrel
“80% of life is just showing up.”Woody Allen
![Page 17: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/17.jpg)
21 February 2003 CS 200 Spring 2003 17
Orders of Growth
0
200
400
600
800
1000
1200
1 2 3 4 5 6 7 8 9 10
logn n
nlogn n̂ 2
n̂ 3 2̂ n
bubblesort
simulatinguniverse
insertsort-tree
peg board game
![Page 18: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/18.jpg)
21 February 2003 CS 200 Spring 2003 18
Orders of Growth
0
10000
20000
30000
40000
50000
60000
70000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
logn n
nlogn n̂ 2
n̂ 3 2̂ n
bubblesort
simulatinguniverse
insertsort-tree
peg board game
![Page 19: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/19.jpg)
Orders of Growth
0
200000
400000
600000
800000
1000000
1200000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
logn n
nlogn n̂ 2
n̂ 3 2̂ n
simulating universe
peg board game
“tractable”
“intractable”
I do nothing that a man of unlimited funds, superb physical endurance, and maximum scientific knowledge could not do. – Batman (may be able to solve intractable problems, but computer scientists can only solve tractable ones for large n)
![Page 20: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/20.jpg)
21 February 2003 CS 200 Spring 2003 20
Any other procedures we’ve seen that are more work than
simulating the Universe?
![Page 21: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/21.jpg)
21 February 2003 CS 200 Spring 2003 21
Break Lorenz Cipher Procedure
• Try all possible wheel settings
• How many possible wheel settings: 5 choices for first wheel
* 5 choices for second wheel
* 5 choices for third wheel
• What is n?– The number of wheels
• There are 5n possible wheel settings
![Page 22: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/22.jpg)
21 February 2003 CS 200 Spring 2003 22
Lorenz Deciphering
• For PS4: you had 3 wheels, each with 5 possible settings:
53 = 125 possible combinations to try
• For WWII: Nazis has 12 wheels, each with more than 5 settings (up to 61 settings)
512 = 244 140 625 possible combinations
![Page 23: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/23.jpg)
21 February 2003 CS 200 Spring 2003 23
PS4• Bletchley Park’s cryptographers had to
solve a problem that is 1 953 125 times harder than PS4!– And they also had to figure out the structure
of the Lorenz machine themselves!
• But…having bombs dropping on you is at least 1 million times more motivating than getting a gold star!
![Page 24: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/24.jpg)
21 February 2003 CS 200 Spring 2003 24
The Endless Golden Age
• Golden Age – period in which knowledge/quality of something doubles quickly
• At any point in history, half of what is known about astrophysics was discovered in the previous 15 years!
• Moore’s law today, but other advances previously: telescopes, photocopiers, clocks, etc.
![Page 25: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/25.jpg)
21 February 2003 CS 200 Spring 2003 25
The Real Golden Rule?Why do fields like astrophysics, medicine, biology and computer science (?) have “endless golden ages”, but fields like– music (1775-1825)– rock n’ roll (1962-1973, or whatever was popular when you
were 16)– philosophy (400BC-350BC?)– art (1875-1925?)– soccer (1950-1974)– baseball (1925-1950)– movies (1930-1940)
have short golden ages?
![Page 26: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/26.jpg)
0
1
2
3
4
5
6
1930
1934
1938
1950
1954
1958
1962
1966
1970
1974
1978
1982
1986
1990
1994
1998
2002
Ave
rage
Goa
ls p
er G
ame,
FIF
A W
orld
Cup
s
Changed goalkeeperpassback rule
Goal-den age
![Page 27: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/27.jpg)
21 February 2003 CS 200 Spring 2003 27
Endless Golden Age and “Grade Inflation”
• Average student gets twice as smart and well-prepared every 15 years– You had grade school teachers (maybe
even parents) who went to college!
• If average GPA in 1970 is 2.00 what should it be today (if grading standards didn’t change)?
![Page 28: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/28.jpg)
21 February 2003 CS 200 Spring 2003 28
Grade Inflation or Scale Compression?
2.00 average GPA in 1970 (“gentleman’s C”?)* 2 better students 1970-1985* 2 better students 1985-2003* 3 admitting women, non-whites (1971)* 1.54 population increase* 0.58 increase in enrollment
Virginia 1970 4,648,494
Virginia 2000 7,078,515
Average GPA today should be:
21.4 CS200 has only the best of the best students, and onlythe best 35/40 of them stayed in the course after PS1, so the
average grade in CS200 should be 21.4*2*2*40/35 = 98.0
Students 1970 11,000Students 2002 18,848
(12,595 UG)
![Page 29: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/29.jpg)
21 February 2003 CS 200 Spring 2003 29
The Liberal Arts
Trivium (3 roads)
language
Quadrivium (4 roads)
numbers
Grammar Rhetoric Logic Arithmetic
Geometry
Music
Astronomy
From Lecture 1:
![Page 30: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/30.jpg)
21 February 2003 CS 200 Spring 2003 30
Liberal Arts• Grammar: study of meaning in written
expression
• Rhetoric: comprehension of verbal and written discourse
• Logic: argumentative discourse for discovering truth
• Arithmetic: understanding numbers
• Geometry: quantification of space
• Music: number in time
• Astronomy
BNF replacement rules for describing languages, rules of evaluation for meaning
Not yet… Interfaces between components, program and user
Rules of evaluation, if, recursive definitions
Not much yet…wait until April
Curves as procedures, fractals
Yes, even if we can’t figure out how to play“Hey Jude!”
Yes: Neil deGrasse Tyson says so
Triv
ium
Qua
driv
ium
From Lecture 1:
![Page 31: David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science](https://reader036.vdocument.in/reader036/viewer/2022081506/56649e4d5503460f94b434e1/html5/thumbnails/31.jpg)
21 February 2003 CS 200 Spring 2003 31
Charge• Enough with all the liberal arts stuff, every
problem on Exam 1 is about money!
• No problem in Exam 1 is as hard as simulating the universe
• If you want to do something important and be remembered, work in a field that has a short golden age from 2003-2018– Shakespeare will be known a thousand years
from now, but no one will have heard of any 21st century playwright