what can be computed
play

What can be computed What is a computation? by a computer? - PowerPoint PPT Presentation

Theory of Computer Science April 18, 2016 D1. Turing-Computability Theory of Computer Science D1.1 Computations D1. Turing-Computability D1.2 Reminder: Turing Machines Malte Helmert D1.3 Turing-Computable Functions University of Basel


  1. Theory of Computer Science April 18, 2016 — D1. Turing-Computability Theory of Computer Science D1.1 Computations D1. Turing-Computability D1.2 Reminder: Turing Machines Malte Helmert D1.3 Turing-Computable Functions University of Basel D1.4 Examples April 18, 2016 D1.5 Summary M. Helmert (Univ. Basel) Theorie April 18, 2016 1 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 2 / 27 Overview: Course Main Question contents of this course: ◮ logic � ⊲ How can knowledge be represented? Main question in this part of the course: ⊲ How can reasoning be automated? ◮ automata theory and formal languages � What can be computed ⊲ What is a computation? by a computer? ◮ computability theory ⊲ What can be computed at all? ◮ complexity theory ⊲ What can be computed efficiently? M. Helmert (Univ. Basel) Theorie April 18, 2016 3 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 4 / 27

  2. Overview: Computability Theory Further Reading (German) Computability Theory ◮ imperative models of computation: Literature for this Chapter (German) D1. Turing-Computability D2. LOOP- and WHILE-Computability D3. GOTO-Computability ◮ functional models of computation: Theoretische Informatik – kurz gefasst D4. Primitive Recursion and µ -Recursion by Uwe Sch¨ oning (5th edition) D5. Primitive/ µ -Recursion vs. LOOP-/WHILE-Computability ◮ Chapter 2.1 ◮ undecidable problems: ◮ Chapter 2.2 D6. Decidability and Semi-Decidability D7. Halting Problem and Reductions D8. Rice’s Theorem and Other Undecidable Problems Post’s Correspondence Problem Undecidable Grammar Problems G¨ odel’s Theorem and Diophantine Equations M. Helmert (Univ. Basel) Theorie April 18, 2016 5 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 6 / 27 D1. Turing-Computability Computations Further Reading (English) Literature for this Chapter (English) D1.1 Computations Introduction to the Theory of Computation by Michael Sipser (3rd edition) ◮ Chapter 3.1 Notes: ◮ Sipser does not cover all topics we do. ◮ His definitions differ slightly from ours. M. Helmert (Univ. Basel) Theorie April 18, 2016 7 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 8 / 27

  3. D1. Turing-Computability Computations D1. Turing-Computability Computations Computation Formal Models of Computation What is a computation? Formal Models of Computation ◮ intuitive model of computation (pen and paper) ◮ Turing machines ◮ vs. computation on physical computers ◮ LOOP, WHILE and GOTO programs ◮ vs. formal mathematical models ◮ primitive recursive and µ -recursive functions In the following chapters we investigate In the next chapters we will models of computation for partial functions f : N k 0 → p N 0 . ◮ get to know these models and ◮ no real limitation: arbitrary information ◮ compare them according to their power. can be encoded as numbers German: M¨ achtigkeit German: Berechnungsmodelle M. Helmert (Univ. Basel) Theorie April 18, 2016 9 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 10 / 27 D1. Turing-Computability Computations D1. Turing-Computability Reminder: Turing Machines Church-Turing Thesis Church-Turing Thesis D1.2 Reminder: Turing Machines All functions that can be computed in the intuitive sense can be computed by a Turing machine. German: Church-Turing-These ◮ cannot be proven (why not?) ◮ but we will collect evidence for it M. Helmert (Univ. Basel) Theorie April 18, 2016 11 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 12 / 27

  4. D1. Turing-Computability Reminder: Turing Machines D1. Turing-Computability Reminder: Turing Machines Formal Models of Computation Reminder: Deterministic Turing Machine (DTM) Definition (Deterministic Turing Machine) A deterministic Turing machine (DTM) is given by a 7-tuple M = � Q , Σ , Γ , δ, q 0 , � , E � with: Formal Models of Computation ◮ Q finite, non-empty set of states ◮ Turing machines ◮ Σ � = ∅ finite input alphabet ◮ LOOP, WHILE and GOTO programs ◮ Γ ⊃ Σ finite tape alphabet ◮ primitive recursive and µ -recursive functions ◮ δ : ( Q \ E ) × Γ → Q × Γ × { L , R , N } transition function ◮ q 0 ∈ Q start state ◮ � ∈ Γ \ Σ blank symbol ◮ E ⊆ Q end states M. Helmert (Univ. Basel) Theorie April 18, 2016 13 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 14 / 27 D1. Turing-Computability Reminder: Turing Machines D1. Turing-Computability Turing-Computable Functions Reminder: Configurations and Computation Steps How do Turing Machines Work? ◮ configuration: � α, q , β � with α ∈ Γ ∗ , q ∈ Q , β ∈ Γ + D1.3 Turing-Computable Functions ◮ one computation step: c ⊢ c ′ if one computation step can turn configuration c into configuration c ′ ◮ multiple computation steps: c ⊢ ∗ c ′ if 0 or more computation steps can turn configuration c into configuration c ′ ( c = c 0 ⊢ c 1 ⊢ c 2 ⊢ · · · ⊢ c n − 1 ⊢ c n = c ′ , n ≥ 0) (Definition of ⊢ , i.e., how a computation step changes the configuration, is not repeated here. � Chapter C7) M. Helmert (Univ. Basel) Theorie April 18, 2016 15 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 16 / 27

  5. D1. Turing-Computability Turing-Computable Functions D1. Turing-Computability Turing-Computable Functions Computation of Functions? Turing Machines: Computed Function Definition (Function Computed by a Turing Machine) How can a DTM compute a function? A DTM M = � Q , Σ , Γ , δ, q 0 , � , E � computes the (partial) function ◮ “Input” x is the initial tape content f : Σ ∗ → p Σ ∗ for which: ◮ “Output” f ( x ) is the tape content (ignoring blanks for all x , y ∈ Σ ∗ : f ( x ) = y iff � ε, q 0 , x � ⊢ ∗ � � . . . � , q e , y � . . . � � at the left and right) when reaching an end state ◮ If the TM does not stop for the given input, with q e ∈ E . (special case: initial configuration � ε, q 0 , � � if x = ε ) f ( x ) is undefined for this input. German: DTM berechnet f Which kinds of functions can be computed this way? ◮ What happens if symbols from Γ \ Σ (e. g., � ) occur in y ? ◮ directly, only functions on words: f : Σ ∗ → p Σ ∗ ◮ What happens if the read-write head is not ◮ interpretation as functions on numbers f : N k 0 → p N 0 : on the first symbol of y at the end? encode numbers as words ◮ Is f uniquely defined by this definition? Why? M. Helmert (Univ. Basel) Theorie April 18, 2016 17 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 18 / 27 D1. Turing-Computability Turing-Computable Functions D1. Turing-Computability Turing-Computable Functions Turing-Computable Functions on Words Encoding Numbers as Words Definition (Encoded Function) Let f : N k 0 → p N 0 be a (partial) function. The encoded function f code of f is the partial function f code : Σ ∗ → p Σ ∗ with Σ = { 0 , 1 , # } and f code ( w ) = w ′ iff Definition (Turing-Computable, f : Σ ∗ → p Σ ∗ ) ◮ there are n 1 , . . . , n k , n ′ ∈ N 0 such that A (partial) function f : Σ ∗ → p Σ ∗ is called Turing-computable ◮ f ( n 1 , . . . , n k ) = n ′ , if a DTM that computes f exists. ◮ w = bin ( n 1 ) # . . . # bin ( n k ) and German: Turing-berechenbar ◮ w ′ = bin ( n ′ ). Here bin : N 0 → { 0 , 1 } ∗ is the binary encoding (e. g., bin (5) = 101 ). German: kodierte Funktion Example: f (5 , 2 , 3) = 4 corresponds to f code ( 101#10#11 ) = 100 . M. Helmert (Univ. Basel) Theorie April 18, 2016 19 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 20 / 27

  6. D1. Turing-Computability Turing-Computable Functions D1. Turing-Computability Examples Turing-Computable Numerical Functions D1.4 Examples Definition (Turing-Computable, f : N k 0 → p N 0 ) A (partial) function f : N k 0 → p N 0 is called Turing-computable if a DTM that computes f code exists. German: Turing-berechenbar M. Helmert (Univ. Basel) Theorie April 18, 2016 21 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 22 / 27 D1. Turing-Computability Examples D1. Turing-Computability Examples Example: Turing-Computable Functions (1) Example: Turing-Computable Functions (2) Example The following numerical functions are Turing-computable: Example ◮ succ : N 0 → p N 0 with succ ( n ) := n + 1 Let Σ = { a , b , # } . � The function f : Σ ∗ → p Σ ∗ with f ( w ) = w # w for all w ∈ Σ ∗ n − 1 if n ≥ 1 ◮ pred 1 : N 0 → p N 0 with pred 1 ( n ) := is Turing-computable. 0 if n = 0 � � blackboard n − 1 if n ≥ 1 ◮ pred 2 : N 0 → p N 0 with pred 2 ( n ) := undefined if n = 0 � blackboard/exercises M. Helmert (Univ. Basel) Theorie April 18, 2016 23 / 27 M. Helmert (Univ. Basel) Theorie April 18, 2016 24 / 27

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