David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 2: Modeling Computers.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
Advertisements

Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
1 Welcome to CS105 and Happy and fruitful New Year שנה טובה (Happy New Year)
David Evans CS200: Computer Science University of Virginia Computer Science Class 30: Models of Computation.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
David Evans CS200: Computer Science University of Virginia Computer Science Class 27: Modeling Computation.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
January 5, 2015CS21 Lecture 11 CS21 Decidability and Tractability Lecture 1 January 5, 2015.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Welcome to CSE105 and Happy and fruitful New Year
CS5371 Theory of Computation
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Languages and Finite Automata or how to talk to machines...
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
Turing Machines CS 105: Introduction to Computer Science.
Finite Automata Costas Busch - RPI.
Class 19: Undecidability in Theory and Practice David Evans cs302: Theory of Computation University of Virginia Computer.
David Evans CS200: Computer Science University of Virginia Computer Science Class 31: Universal Turing Machines.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Cs3102: Theory of Computation Class 17: Undecidable Languages Spring 2010 University of Virginia David Evans.
Cs3102: Theory of Computation Class 10: DFAs in Practice Spring 2010 University of Virginia David Evans.
Context-Free Languages Regular Languages Violates Pumping Lemma For RLs Violates Pumping Lemma For CFLs Described by CFG, PDA 0n1n0n1n 0n1n2n0n1n2n Described.
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
David Evans Turing Machines, Busy Beavers, and Big Questions about Computing.
Class 37: Computability in Theory and Practice cs1120 Fall 2011 David Evans 21 November 2011 cs1120 Fall 2011 David Evans 21 November 2011.
CS 390 Introduction to Theoretical Computer Science.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
CSCI 2670 Introduction to Theory of Computing August 24, 2005.
Cs3102: Theory of Computation Class 2: Problems and Finite Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
David Evans University of Virginia cs1120 Fall Lecture 38: Modeling Computing.
Cs3102: Theory of Computation Class 6: Pushdown Automata Spring 2010 University of Virginia David Evans TexPoint fonts used in EMF. Read the TexPoint manual.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
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.
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Undecidability and The Halting Problem
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
David Evans CS150: Computer Science University of Virginia Computer Science Class 32: Computability in Theory and Practice.
Cs3102: Theory of Computation (aka cs302: Discrete Mathematics II) Spring 2010 University of Virginia David Evans.
Theory of Computation. Introduction to The Course Lectures: Room ( Sun. & Tue.: 8 am – 9:30 am) Instructor: Dr. Ayman Srour (Ph.D. in Computer Science).
Finite Automata.
Languages.
Class 30: Models of Computation CS200: Computer Science
Lecture 37: A Universal Computer
Turing Machines, Busy Beavers, and Big Questions about Computing
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
CS21 Decidability and Tractability
Class 31: Universal Turing Machines CS200: Computer Science
Class 34: Models of Computation CS200: Computer Science
Class 26: Modeling Computing CS150: Computer Science
Presentation transcript:

David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 2: Modeling Computers

2 Lecture 2: Modeling Computation Menu Modeling Computers Course Organization Finite Automata

What can computers do?

4 Lecture 2: Modeling Computation What is a “computer”?

5 Lecture 2: Modeling Computation How should we model a Computer? Apollo Guidance Computer (1969) Colossus (1944) IBM 5100 (1975) Cray-1 (1976) Turing invented his model in What “computer” was he modeling?

6 Lecture 2: Modeling Computation “Computers” before WWII

7 Lecture 2: Modeling Computation Mechanical Computing

8 Lecture 2: Modeling Computation Modeling Pencil and Paper “Computing is normally done by writing certain symbols on paper. We may suppose this paper is divided into squares like a child’s arithmetic book.” Alan Turing, On computable numbers, with an application to the Entscheidungsproblem, 1936 #CSSA723 How long should the tape be?...

9 Lecture 2: Modeling Computation Modeling Brains Rules for steps Remember a little “For the present I shall only say that the justification lies in the fact that the human memory is necessarily limited.” Alan Turing

10 Lecture 2: Modeling Computation Turing’s Model A Start B Input: 0 Write: 1 Move:  Input: 0 Write: 1 Move:  H Input: 1 Write: 1 Move: Halt Input: 1 Write: 1 Move: 

11 Lecture 2: Modeling Computation What makes a good model? Copernicus F = GM 1 M 2 / R 2 Newton Ptolomy

12 Lecture 2: Modeling Computation Questions about Computing Model How well does it match “real” computers? –Can it do everything they can do? –Can they do everything it can do? Does it help us understand and reason about computing? –What problems can computers solve? –How long will it take?

13 Lecture 2: Modeling Computation Universal Turing Machine A Start B Input: 0 Write: 1 Move:  Input: 2 Write: 1 Move:  Input: 0 Write: 2 Move:  Input: 1 Write: 2 Move:  Input: 2 Write: 1 Move:  Input: 1 Write: 2 Move: 

14 Lecture 2: Modeling Computation Course Organization

15 Lecture 2: Modeling Computation Assignments Reading: mostly from Sipser, some additional readings later Problem Sets (6 – first is due in 1 week) Exams (2 + final) Extra credit: –Challenge Problems –Communication Efforts

16 Lecture 2: Modeling Computation Help Available David Evans –Office hours (Olsson 236A): Mondays, 2-3pm –Coffee Hours (Wilsdorf): Wednesdays, 9:30-10:30am –Other times: open office door, or send to arrange Assistants: Suzanne Collier, Qi Mi, Joe Talbott, Wuttisak Trongsiriwat –Problem-Solving Sessions (Olsson 226D) –Mondays 5:30-6:30pm, Wednesdays 6-7pm First coffee hours and problem-solving session tomorrow

17 Lecture 2: Modeling Computation Honor Code Please don’t cheat! –If you’re not sure if what you are about to do is cheating, ask first On most problem sets: “Gilligan’s Island” collaboration policy –Encourages discussion in groups, but ensures you understand everything yourself –Don’t use found solutions On most exams: work alone, one page of notes allowed

18 Lecture 2: Modeling Computation Main Question What problems can particular machines solve? What is a problem? What is a machine? What does it mean for a machine to solve a problem?

19 Lecture 2: Modeling Computation Finite Problems Problems with a finite number of possible inputs Uninteresting: can be solved by a lookup machine Except for trick questions, all problems we are interested in in this class have infinitely many possible inputs.

20 Lecture 2: Modeling Computation Outputs How many possible outputs do you need for an interesting problem? 2 – “Yes” or “No” Most problems can be framed as decision problems: What is 1+1? vs. Is 1+1 = 3?

21 Lecture 2: Modeling Computation Decidable problems (problems that can be solved by some TM) Undecidable Problems Tractable problems (problems that can be solved by some TM in reasonable time) Context-Free Languages (can be recognized by a PDA) Regular Languages (can be recognized by a DFA)

22 Lecture 2: Modeling Computation Finite Automata (Finite State Machines)

23 Lecture 2: Modeling Computation Informal Example Recognize binary strings with an even number of “1”s What is a language? What does it mean to recognize a language?

24 Lecture 2: Modeling Computation Designing DFAs Example: design a DFA that recognizes the language of binary strings that are divisible by 3 Design tips: –Think about what the states represent (e.g., what is the current remainder) –Walk through what the machine should do on example inputs

25 Lecture 2: Modeling Computation Formal Definition A finite automaton is a 5-tuple: Q finite set (“states”)  finite set (“alphabet”)  Q x   Q (“transition function”) q 0  Q start state F  Q set of accepting states

26 Lecture 2: Modeling Computation Computation Model Define * as the “extended transition function” *: Q x *  Q Basis: *(q, ε) = q Induction: w = ax a  , x  * *(q, w) = *((q, a), x) w  L(A) iff  *(q 0, w)  F

27 Lecture 2: Modeling Computation Inductive Definitions code example: State nextState(State q, String w) { if (w.length() == 0) return q; else return (nextState (transition (q, w.charAt(0)), w.substring(1)); }

28 Lecture 2: Modeling Computation Regular Languages Definition: A language is a regular language if there is some Finite Automaton that recognizes it.

29 Lecture 2: Modeling Computation Complement Proof Prove: the set of regular languages is closed under complement.

30 Lecture 2: Modeling Computation Charge Remember to submit registration survey PS1 is posted on course website: due 1 week (- 73 minutes) from now Coffee hours tomorrow (9:30am) Problem-solving session tomorrow (6pm)