42
play

42 42-ness is something whos successor is 43-ness forty-two - PDF document

Glue, Photons, P=NP? Glue, Photons, P=NP? Summer CS Classes CS 4630 Defense against the Dark Arts Aaron Bloomfield, M-F 10:30am - 12:45 CS 2110 Software Development Methods Mark Sherriff, M -W 10:30am 12:45 You


  1. Glue, Photons, P=NP? Glue, Photons, P=NP? Summer CS Classes • CS 4630 – Defense against the Dark Arts – Aaron Bloomfield, M-F 10:30am - 12:45 • CS 2110 – Software Development Methods – Mark Sherriff, M -W 10:30am – 12:45 – You should probably take CS 2220 with Dave Evans in the fall instead, but taking CS 2110 instead will work for the CS major • CS 1010 – Introduction to Information Technology – Kinga Dobolyi, M-F 1pm – 3:15pm – Tell your friends! – Small class, easy way to satisfy some requirements DNA Helix Photomosaic from cover of Nature , 15 Feb 2001 (made by Eric Lander) #2 One-Slide Summary Lambda Calculus is a Universal Computer? • The lambda calculus is a universal, fundamental model of computation. You can view it as “the essence of Scheme”. It z z z z z z z z z z z z z z z z z z z z contains terms and rules describing variables, function abstraction, and function application. • Read/Write Infinite Tape • It is possible to encode programming concepts, such as true, Mutable Lists ), X, L ¬ ), #, R false, if, numbers, lists, etc., in the lambda calculus. Lambda ¬ (, #, L • Finite State Machine 2: 1 look for ( calculus can simulate Turing machines. Numbers Start (, X, R • Processing • Quantum computers and non-determinsitic Turing machines HAL T #, 0, - #, 1, - Way to make decisions (if) can try many options at once. They are not more powerful Finite State Machine Way to keep going than normal Turing machines. • The Complexity Class P contains tractable problems that can be solved in polynomial time. The Complexity Class NP contains problems for which solutions can be verified in polynomial time. • Does P = NP? We don't know! $1+ million if you know. #3 #4 What is 42? Meaning of Numbers 42 • “42-ness” is something who’s successor is “43-ness” forty-two • “42-ness” is something who’s predecessor is “41-ness” XLII • “Zero” is special. It has a successor “one-ness”, but no predecessor . cuarenta y dos #5 #6

  2. Is this enough? Meaning of Numbers Can we define add with pred , succ , zero? pred (succ N ) → N and zero ? succ (pred N ) → N succ (pred (succ N )) → succ N add ≡ λ xy. if ( zero? x ) y zero? zero → T ( add ( pred x ) ( succ y )) zero? (succ zero ) → F #7 #8 Numbers are Lists... Can we define lambda terms zero? ≡ null? that behave like pred ≡ cdr zero , zero? , pred and succ ? succ ≡ λ x . cons F x Hint: what if we had cons , car and cdr ? The length of the list corresponds to the number value. #9 #10 Liberal Arts Trivia: Making Pairs Religious Studies •In Sunni Islam, the Five Pillars of (define ( make-pair x y) Islam are five duties incumbent ( lambda (selector) ( if selector x y))) on Muslims. They include the (define ( car-of-pair p) (p #t)) Profession of Faith, Formal (define ( cdr-of-pair p) (p #f)) Prayers, and Giving Alms. Name the remaining two pillars. A pair is just an if statement that chooses between the car (then) and the cdr (else). #11 #12

  3. cons and car cdr too! cons ≡ λ x. λ y. λ z.zxy cons ≡ λ xyz.zxy Example: cons M N = ( λ x. λ y. λ z.zxy ) M N car ≡ λ p.p T → β ( λ y. λ z.z M y ) N cdr ≡ λ p.p F → β λ z.z MN T ≡ λ xy . x car ≡ λ p.p T Example: cdr (cons M N) Example: car (cons M N) ≡ car ( λ z.z MN) ≡ ( λ p.p T ) ( λ z.z MN) → β ( λ z.z MN) T → β T MN cdr λ z.z MN = ( λ p.p F) λ z.z MN → β ( λ xy . x ) MN → β ( λ z.z MN) F → β ( λ y . M)N → β FMN → β M → β N #13 #14 Null and null? Null and null? null ≡ λ x. T null ≡ λ x. T null? ≡ λ x. ( x λ y. λ z. F ) null? ≡ λ x. ( x λ y. λ z. F ) Example: Example: null? null → λ x. ( x λ y. λ z. F ) ( λ x. T ) null? (cons M N) → λ x. ( x λ y. λ z. F ) λ z.z MN → β ( λ x. T ) ( λ y. λ z. F ) → β ( λ z.z MN) ( λ y. λ z. F ) → β T → β ( λ y. λ z. F ) MN → β F #15 #16 42 = λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y Counting λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y 0 ≡ null λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. 1 ≡ cons F 0 ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y 2 ≡ cons F 1 λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) 3 ≡ cons F 2 λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y ... λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. succ ≡ λ x . cons F x ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) λ xy . y λ xy. ( λ z.z xy ) pred ≡ λ x . cdr x λ xy . y λ x. T #17 #18

  4. Equivalent Computers! Lambda Calculus is a Universal Computer z z z z z z z z z z z z z z z z z z z z ... z z z z z z z term = variable | term term ), X, L ¬ ), #, R | ( term ) ¬ (, #, L 2: | λ variable . term 1 look for ( ), X, L • Read/Write Infinite Tape ¬ ), #, R Start ¬ (, #, L (, X, R  Mutable Lists 2: look can simulate 1 for ( Start HAL λ y . M ⇒ α λ v . ( M [ y → v ]) • Finite State Machine T #, 0, - #, 1, - (, X, R Finite State Machine  Numbers to keep track of state where v does not occur in M . HAL T #, 0, - can simulate #, 1, - • Processing Finite State Machine ( λ x . M ) N ⇒ β M [ x → N ]  Way of making decisions (if)  Way to keep going Lambda Calculus Turing Machine #19 #20 Liberal Arts Trivia: Universal Computer Biology, Chemistry • Lambda Calculus can simulate a Turing • While rendered fat obtained form pigs is Machine known as lard, rendered beef or mutton fat is – Everything a Turing Machine can compute, known as this . It is used to make animal feed Lambda Calculus can compute also and soap. Historically, it was used to make • Turing Machine can simulate Lambda candles: it provided a cheaper alternative to Calculus (we didn’t prove this) wax. Before switching to vegetable oil in – Everything Lambda Calculus can compute, a 1990, McDonald's cooked fries in 93% this and Turing Machine can compute also 7% cottonseed oil. • Church-Turing Thesis : this is true for any other mechanical computer also #21 #22 Quantum Physics What about “non-mechanical” for Dummies computers? • Light behaves like both a wave and a particle at the same time • A single photon is in many states at once • Can’t observe its state without forcing it into one state • Schrödinger’s Cat – Put a live cat in a box with cyanide vial that opens depending on quantum state – Cat is both dead and alive at the same time until you open the box #23 #24

  5. Quantum Computing Qubit • Feynman, 1982 • Regular bit: either a 0 or a 1 • Quantum particles are in all possible states • Quantum bit : 0, 1 or in between • Can try lots of possible computations at once – p% probability it is a 1 with the same particles • A single qubit is in 2 possible states at once • In theory, can test all possible • If you have 7 bits, you can represent any factorizations/keys/paths/etc. and get the one of 2 7 different states right one! • If you have 7 qubits, you have 2 7 different • In practice, very hard to keep states states (at once!) entangled: once disturbed, must be in just one possible state #25 #26 Quantum Computers Today Nondeterministic Computing • Several quantum algorithms ... ... # 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 # – Shor’s algorithm: factoring using a quantum computer • Actual quantum computers There can be multiple Input: 1 – 5-qubit computer built by IBM (2001) Input: 1 Write: 1 transitions on the same – Implemented Shor’s algorithm to factor: Start Write: 1 Move: → input. Nondeterministic • “World’s most complex quantum computation” Move: → 15 (= 5 * 3) TM takes all of them at – D-Wave 16-qubit quantum computer (2007) once. Each gets its 1 2 own independent copy • Solves Sudoku puzzles of the tape. If any path • To exceed practical normal computing need > 50 finds halting state, that qubits Input: # is the result. 3 Write: # – Adding another qubit is more than twice as hard Move: → #27 #28 Two Ways of Thinking about Computability Nondeterminstic Computing • Omniscient (all-knowing): machine always Is a nondeterministic TM more guesses right (the right guess is the one powerful than a deterministic TM? that eventually leads to a halting state) • Omnipotent (all-powerful): machine can split in two every step, all resulting machines execute on each step, if one of the machines halts its tape is the output #29 #30

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend