David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science.

Slides:



Advertisements
Similar presentations
Class 3: Rules of Evaluation David Evans cs1120 Fall 2009.
Advertisements

David Evans CS200: Computer Science University of Virginia Computer Science Class 38: Intractable Problems (Smiley Puzzles.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 13: Of On and Off Grounds Sorting.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 3: Rules of Evaluation.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 18: The Story So Far.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 16: Quicker Sorting.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 20: Sex, Religion, and Politics.
Lecture 26: Sex, Religion, and Politics University of Virginia cs1120 Fall 2009 David Evans.
Computer Science Prof. Bill Pugh Dept. of Computer Science.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 11: 1% Pure Luck Make-up lab hours:
Cs1120 Fall 2009 David Evans Lecture 20: Programming with State.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 5: Recursing Recursively Richard Feynman’s.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 4: Introducing Recursive Definitions.
CS 376 Introduction to Computer Graphics 04 / 30 / 2007 Last Lecture :( Instructor: Michael Eckmann.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 12: Decrypting Work Circle Fractal.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 2: Orders of Growth
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 11: CS Logo, by Lincoln Hamilton and.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Encryption: A Brief History Author: Margery Waldron.
David Evans Curing Cancer with Your Cell Phone: Why all Sciences are Becoming Computing Sciences.
The Scientific Method. iSkylab Went really well! Data 10, Form 3, Questions 7, explain ½, wrt, etc. Type and repeat questions! Moon phases are NOT due.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
15 October 2003Computer Science1 David Evans ComputerScience.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 18: Think Globally, Mutate Locally.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 3: Rules of Evaluation.
David Evans CS200: Computer Science University of Virginia Computer Science Class 17: Mutation M. C. Escher, Day and Night.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 10: Puzzling Pegboards.
David Evans Class 19: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science.
PLTL AT UW-MADISON WES-CS (Wisconsin Emerging Scholars – CS) Susan Horwitz University of Wisconsin - Madison.
Class 37: Secret of Life CS200: Computer Science
Class 21: Introducing Complexity David Evans cs302: Theory of Computation University of Virginia Computer Science.
David Evans Class 21: The Story So Far (Quicksort, Continuing Golden Ages) CS200: Computer Science University of Virginia.
David Evans Lecture 13: Astrophysics and Cryptology CS200: Computer Science University of Virginia Computer Science.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 12: QuickSorting Queen’s University,
David Evans CS200: Computer Science University of Virginia Computer Science Class 16: Mutation M. C. Escher, Day and Night.
David Evans Class 16: NP-Completeness / The Story so Far CS150: Computer Science University of Virginia Computer Science.
Cultural Achievements of the Middle Ages Chapter 10, Section 3.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 9: Of On and Off Grounds Sorting Coffee.
Cs1120 Fall 2009 David Evans Lecture 18: Changing State Sounds of Colossus:
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
David Evans Class 15: P vs. NP (Smiley Puzzles and Curing Cancer) CS150: Computer Science University of Virginia Computer.
David Evans CS200: Computer Science University of Virginia Computer Science Class 32: The Meaning of Truth.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
Lecture 3: Rules of Evaluation CS150: Computer Science
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 14: P = NP?
David Evans CS200: Computer Science University of Virginia Computer Science Class 32: The Meaning of Truth.
Pancakes, Puzzles, and Polynomials: Cracking the Cracker Barrel Game Christopher Frost Michael Peck.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 8: Recursing Recursively Richard Feynman’s.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 23: Intractable Problems (Smiley Puzzles.
1-2-Multiple Mr. Hudson Computer Science 1 Objective : Learn and be able to identify 1-way, 2-way, and Multiple- way sections.
David Evans CS150: Computer Science University of Virginia Computer Science Class 32: Computability in Theory and Practice.
David Evans CS200: Computer Science University of Virginia Computer Science Class 26: Halting Problem It is plain at any.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 8: Cons car cdr sdr wdr.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 9: Recursing Recursively Richard Feynman’s.
Lecture 1: Introduction Background just got here last week
David Evans Lecture 41: P = NP? I will have extra office hours after class today (1-3pm). To be eligible to present Monday,
Lecture 4: Evaluation Rules Recursion CS200: Computer Science
Lecture 13: Quicksorting CS200: Computer Science
Class 30: Models of Computation CS200: Computer Science
Lecture 7: List Recursion CS200: Computer Science
Lecture 20: Sex, Religion, and Politics CS150: Computer Science
Class 14: Intractable Problems CS150: Computer Science
Lecture 25: Metalinguistics > (meval '((lambda (x) (* x x)) 4)
Lecture 22: P = NP? CS200: Computer Science University of Virginia
Lecture 24: Metalinguistics CS200: Computer Science
Class 34: Models of Computation CS200: Computer Science
Lecture 3: Rules of Evaluation CS200: Computer Science
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science

21 February 2003CS 200 Spring Science’s Endless Golden Age

21 February 2003CS 200 Spring 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)(n3) When we double the size of the simulation, the work octuples! (Just like oceanography octopi simulations)

21 February 2003CS 200 Spring Orders of Growth bubblesort simulating universe insertsort-tree

21 February 2003CS 200 Spring Astrophysics and Moore’s Law Simulating universe is  ( n 3 ) 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?

21 February 2003CS 200 Spring ;;; doubling every 18 months = ~1.587 * every 12 months (define (computing-power nyears) (if (= nyears 0) 1 (* (computing-power (- nyears 1))))) ;;; Simulation is  (n 3 ) 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

21 February 2003CS 200 Spring (define (computing-power nyears) (if (= nyears 0) 1 (* (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

21 February 2003CS 200 Spring > (find-knowledge-of-universe 0) 1.0 > (find-knowledge-of-universe 1) > (find-knowledge-of-universe 2) > (find-knowledge-of-universe 5) > (find-knowledge-of-universe 10) > (find-knowledge-of-universe 15) 2.0 > (find-knowledge-of-universe 30) > (find-knowledge-of-universe 60) > (find-knowledge-of-universe 80) 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

21 February 2003CS 200 Spring Any Harder Problems? Understanding the universe is  ( n 3 ) Are there any harder problems?

21 February 2003CS 200 Spring Who’s the real genius?

21 February 2003CS 200 Spring 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 …

21 February 2003CS 200 Spring Possible Moves Start Peg board game n = number of holes Initially, there are n-1 pegs. Cracker Barrel’s game has n = 15 Assume there are always exactly 2 possible moves, how many possible games are there?

21 February 2003CS 200 Spring 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 = 2 n-2 For n = 15, there are 2 13 = 8192

21 February 2003CS 200 Spring All Cracker Barrel Games (starting with peg 2 1 missing) Pegs Left Number of Ways Fraction of Games IQ Rating “You’re Genius” “You’re Purty Smart” “Just Plain Dumb” “Just Plain Eg-no-ra-moose”

21 February 2003CS 200 Spring 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) (2n)

21 February 2003CS 200 Spring 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

21 February 2003CS 200 Spring Orders of Growth bubblesort simulating universe insertsort-tree peg board game

21 February 2003CS 200 Spring Orders of Growth bubblesort simulating universe insertsort-tree peg board game

Orders of Growth 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)

21 February 2003CS 200 Spring Any other procedures we’ve seen that are more work than simulating the Universe?

21 February 2003CS 200 Spring Break Lorenz Cipher Procedure Try all possible wheel settings How many possible wheel settings: 5choices for first wheel * 5choices for second wheel * 5 choices for third wheel What is n ? –The number of wheels There are 5 n possible wheel settings

21 February 2003CS 200 Spring Lorenz Deciphering For PS4: you had 3 wheels, each with 5 possible settings: 5 3 = 125 possible combinations to try For WWII: Nazis has 12 wheels, each with more than 5 settings (up to 61 settings) 5 12 = possible combinations

21 February 2003CS 200 Spring PS4 Bletchley Park’s cryptographers had to solve a problem that is 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!

21 February 2003CS 200 Spring 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.

21 February 2003CS 200 Spring The Real Golden Rule? Why do fields like astrophysics, medicine, biology and computer science (?) have “endless golden ages”, but fields like –music ( ) –rock n’ roll ( , or whatever was popular when you were 16) –philosophy (400BC-350BC?) –art ( ?) –soccer ( ) –baseball ( ) –movies ( ) have short golden ages?

Average Goals per Game, FIFA World Cups Changed goalkeeper passback rule Goal-den age

21 February 2003CS 200 Spring 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)?

21 February 2003CS 200 Spring Grade Inflation or Scale Compression? 2.00average GPA in 1970 (“gentleman’s C”?) * 2better students * 2better students * 3admitting women, non-whites (1971) * 1.54 population increase * 0.58increase in enrollment Virginia 19704,648,494 Virginia 20007,078,515 Average GPA today should be: 21.4 CS200 has only the best of the best students, and only the 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 ,000 Students ,848 (12,595 UG)

21 February 2003CS 200 Spring The Liberal Arts Trivium (3 roads) language Quadrivium (4 roads) numbers GrammarRhetoricLogicArithmetic Geometry Music Astronomy From Lecture 1:

21 February 2003CS 200 Spring 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 Trivium Quadrivium From Lecture 1:

21 February 2003CS 200 Spring 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 –Shakespeare will be known a thousand years from now, but no one will have heard of any 21 st century playwright