Cs3102: Theory of Computation (aka cs302: Discrete Mathematics II) Spring 2010 University of Virginia David Evans.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
CIT 596 Theory of computing Traditional course (CIS 511, CIS 262) and other similarly named courses in other universities are divided into 3 parts that.
What’s wrong with this proof? If you figure it out, don’t call it out loud – let others ponder it as well. 1. Let a and b be non-zero such thata = b 2.
Copyright © Cengage Learning. All rights reserved.
January 5, 2015CS21 Lecture 11 CS21 Decidability and Tractability Lecture 1 January 5, 2015.
CS21 Decidability and Tractability
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
Proof Points Key ideas when proving mathematical ideas.
CS 581: Introduction to the Theory of Computation Lecture 1 James Hook Portland State University
Theory of Computation What types of things are computable? How can we demonstrate what things are computable?
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 2: Modeling Computers.
CS 581: Introduction to the Theory of Computation Lecture 1 James Hook Portland State University
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning.
David Evans CS200: Computer Science University of Virginia Computer Science Class 31: Universal Turing Machines.
Cs3102: Theory of Computation Class 17: Undecidable Languages Spring 2010 University of Virginia David Evans.
Introduction to CS Theory Lecture 1 – Introduction Piotr Faliszewski
Cs3102: Theory of Computation Class 10: DFAs in Practice Spring 2010 University of Virginia David Evans.
Making an Argument The goal of communication is to achieve the desired affect on the target audience. Often we want to convince the audience of something.
Introduction to the Theory of Computation
Introduction Chapter 0. Three Central Areas 1.Automata 2.Computability 3.Complexity.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 2: Orders of Growth
MATH 224 – Discrete Mathematics
CS355 – Theory of Computation Dr. Aidan Mooney, September 2006 National University of Ireland, Maynooth Department of Computer Science.
CS 390 Introduction to Theoretical Computer Science.
Cs3102: Theory of Computation Class 2: Problems and Finite Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the.
© M. Winter COSC/MATH 4P61 - Theory of Computation COSC/MATH 4P61 Theory of Computation Michael Winter –office: J323 –office hours: Mon & Fri, 10:00am-noon.
Introduction to the Theory of Computation Fall Semester, School of Information, Renmin University of China.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
CSCI 2670 Introduction to Theory of Computing Instructor: Shelby Funk.
Welcome to CMPSC 360!. Today Introductions Student Information Sheets, Autobiography What is Discrete Math? Syllabus Highlights
CS 345: Chapter 8 Noncomputability and Undecidability Or Sometimes You Can’t Get It Done At All.
Introduction COMP283 – Discrete Structures. JOOHWI LEE Dr. Lee or Mr. Lee ABD Student working with Dr. Styner
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
Computational Structures Tim Sheard & James Hook Portland State University Class Preliminaries.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 36: Modeling Computing.
THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
1 CS 381 Introduction to Discrete Structures Lecture #1 Syllabus Week 1.
CMPT 308 — Computability and Complexity Fall 2004 Instructor: Andrei Bulatov, TA: Ramsay Dyer, Learning.
David Evans CS200: Computer Science University of Virginia Computer Science Class 32: The Meaning of Truth.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
Introduction to Automata Theory
Theory of Computation. Introduction We study this course in order to answer the following questions: What are the fundamental capabilities and limitations.
COMP 283 Discrete Structures
Introduction to the Theory of Computation
Busch Complexity Lectures: Reductions
Reductions.
Introduction to Automata Theory
Summary.
CSE 311 Foundations of Computing I
Class 33: Making Recursion M.C. Escher, Ascending and Descending
Class 31: Universal Turing Machines CS200: Computer Science
Class 26: Modeling Computing CS150: Computer Science
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

cs3102: Theory of Computation (aka cs302: Discrete Mathematics II) Spring 2010 University of Virginia David Evans

Computation is what Computers do, who needs theory? flickr: gastev [cc]Charles Babbage’s Difference Engine (1822, recreation)

“Engining” is what Engines do, who needs theory? Hero of Alexandria’s aeolipile steam engine Matthew Boulton and James Watt steam engine, 1817

Nicolas Carnot (1796 – 1832) “Is the potential work available from a heat source potentially unbounded?" “Can heat engines be improved by replacing the steam with some other fluid or gas?”

Carnot’s Answer Efficiency of an ideal engine depends only on the temperature difference between the reservoirs.

Does Theory Matter? Theory and Construction of a Rational Heat-engine to Replace the Steam Engine and Combustion Engines Known Today, Rudolf Diesel, 1893

Theory Drives Practice Drives Theory

Math Theorem vs. Science Theory

Math Theorem Starts with a simple, well- define model Deductive reasoning: Proven using logical deduction Useful it if provides deep insights Scientific Theory Starts with the complex, messy universe Inductive reasoning: “Proven” by lots of confirming observations and no non- conforming observations Useful if it makes reliable predictions and helps us understand the universe Even wrong theories are useful This class: mostly Math Theorems, but some Scientific Theories

Key Questions 1.“Is the potential work available from a heat source potentially unbounded?" 2.“Can heat engines be improved by replacing the steam with some other fluid or gas?” 1.“Is the potential work available from a heat source potentially unbounded?" 2.“Can heat engines be improved by replacing the steam with some other fluid or gas?” Carnot’s questions about heat engines Analogous questions about computers 1.“Can all problems be solved by computers?" 2.“Can computers solve more problems by changing their operation?” 1.“Can all problems be solved by computers?" 2.“Can computers solve more problems by changing their operation?”

Precise Definitions Needed What is a problem?What is a computer? What problems can a computer solve? (Computability) What does it mean for a computer to solve a problem? What problems can a computer solve in a reasonable time? (Complexity) Two Key Questions How do we measure time?

What problems can a computer solve? Answered (for a model) by Church and Turing (1930s) “During the last six months I have been contriving another engine of far greater power... I am myself astonished at the powers I have given it.” Charles Babbage, 1835 “It will not slice a pineapple.” Charles Babbage, 1852 Note: Babbage wasn’t actually talking about the Analytical Engine when he said this.

There’s an app for that?

What problems can real computers solve in a reasonable time? I can't find an efficient algorithm, but neither can all these famous people. Theoretical version: ( P = NP ) posed by Stephen Cook in 1971 Open problem Pragmatic version: do all computers in our universe have these limitations? Open problem We (probably) won’t answer these questions in this class (but if you do you get an automatic A+!). But we will develop tools for understanding what answers might look like.

Topics in cs3102 Classes 1-18 Classes What problems can a computer solve? (Computability) What problems can computers solve in a reasonable time? (Complexity) January - March Problem Sets 1-5 April, May Problem Sets 6-7

Models of Computation Machine-likeLanguage-like Finite Automata (Class 2-6)Regular Expressions Pushdown Automata (add a stack) (Classes 7-8) Context-free Grammar (Classes 9-11) Turing machine (add an infinite tape) (Classes 12-28) Unrestricted Grammar, Lambda Calculus + add nondeterminism to each of these!

Course Organization

Help Available David Evans Office hours (Olsson 236A): Mondays, 1:15-3pm Thursdays (including today), right after class Assistant: Sonali Parthasarathy Registration Survey: asks if you can make these office hours

Course Blog: Four things to do after class today: 1.Register for the course blog 2.Complete course registration survey 3.Subscribe to Posts and Comments RSS feeds 4.Download Problem Set 1 Four things to do after class today: 1.Register for the course blog 2.Complete course registration survey 3.Subscribe to Posts and Comments RSS feeds 4.Download Problem Set

Assignments Reading: mostly from Sipser, some additional readings later Problem Sets (7): PS1 is posted now, due Tuesday, Feb 2 Exams (2 + final): – First exam will be in-class March 2, one page of notes allowed – Second exam will (probably) be take home, April 8-13 – Final exam

Honor Code Please don’t cheat! If you’re not sure if what you are about to do is cheating, ask first Collaboration on problem sets: “Gilligan’s Island” collaboration policy (described on PS1 handout) – Encourages discussion in groups, but ensures you understand everything yourself – Don’t use found solutions Exams: work alone – Exam 1: in-class, one page of notes allowed

Late Policy

My Goals for the Course Charles Babbage’s Brain

Definitions and Proofs

Language of Computer Science Sets Natural Numbers Strings Languages What makes a good definition?

Defining the Natural Numbers Ellipsis definition: N = {1, 2, 3,...} Theorem: There is no largest natural number. Proof: The meaning of “...” goes on forever.

Defining the Natural Numbers Recursive definition: Base: 1 is a natural number Induction: if i is a natural number, i +1 is a natural number Theorem: There is no largest natural number. Proof: Suppose there is some largest natural number x. By the induction part of the definition, x+1 is a natural number. Since x+1 > x, no such x exists. Proof: Suppose there is some largest natural number x. By the induction part of the definition, x+1 is a natural number. Since x+1 > x, no such x exists.

What is a Proof? An argument that a statement is true that is convincing to a “reasonable” person Mathematical proofs are convincing if they follow established techniques: Proof by Contradiction Proof by Construction Proof by Induction Proof by Reduction

Proof by Contradiction Assume the logical opposite of the statement. Show it leads to a contradiction. Theorem: There is no largest natural number. Proof by Contradiction: Suppose there is some largest natural number x. By the induction part of the definition, x+1 is a natural number. Since x+1 > x, no such x exists. Proof by Contradiction: Suppose there is some largest natural number x. By the induction part of the definition, x+1 is a natural number. Since x+1 > x, no such x exists. What are all the (unstated) assumptions in this proof?

Proof by Induction To show something is true for an infinite set of objects: – Define the set recursively (often assumed, but important to be explicit) – Show the property is true for the base case – Show that the induction case preserves the property: assume it holds for incoming objects prove it holds for created objects This is a form of Deductive reasoning, not Inductive reasoning!

Theorem: The sum of two natural numbers is a natural number.

Natural Numbers: Base: 1 is a natural number Induction: if i is a natural number, i +1 is a natural number Theorem: The sum of two natural numbers is a natural number. The sum of two natural numbers, A + B, is a natural number. Proof: By induction on the value of B : Base case: B = 1. By the definition, since A is a natural number, A+1 is a natural number. Induction case: B = i + 1 for some natural number i. Induction hypothesis: A + i is a natural number. Since A + i is a natural number, A + i + 1 = A + B is a natural number.

Set A group of objects. Base:  (the empty set) is a set Induction: if S is a set, adding one object to S produces a set. Alphabet A finite set of symbols String A sequence of symbols from an alphabet,  Base:  (the empty string) is a string Induction: if s is a string, and a , sa is a string Language A set of strings In CS theory, this is the definition of a language.

Proofs about Strings and Languages Prove there is no longest string. Prove the set of strings is closed under concatenation. Prove these two languages are the same: A = [ab]* B is defined by:   B if s  B then sa  B and sb  B

Charge Before Sunday: Register for course blog, submit survey, subscribe to RSS feeds Before Tuesday: Read Sipser Chapter 0 and Section 1.1 Start Problem Set 1 I have office hours now.