Section 13.2 The Church-Turing Thesis The Church-Turing Thesis: Anything that is intuitively computable can be be computed by a Turing machine.
|
|
- Owen Simmons
- 5 years ago
- Views:
Transcription
1 Section 13.2 The Church-Turing Thesis The Church-Turing Thesis: Anything that is intuitively computable can be be computed by a Turing machine. It is a thesis rather than a theorem because it relates the informal notion of intuitively computable to the formal notion of a Turing machine. Computational Models A computational model is a characterization of a computing process that describes the form a program and describes how the instructions and are executed. Example. The Turing machine computational model describes the form of TM instructions and how to execute them. Example. If X is a programming language, the X computational model describes the form of a program and how each instruction is executed. Equivalence of Computational Models Two computational models are equivalent in power if they solve the same class of problems. Any piece of data for a program can be represented by a string of symbols and any string of symbols can be represented by a natural number. So even though computational models may process different kinds of data, they can still be compared with respect to how they process natural numbers. We ll make the assumption that there is an unlimited amount of memory available. So we can represent any natural number or any finite string. Each of the following models of computation is equal in power to the TM model. 1
2 The Simple Programming Language This imperative programming model processes natural numbers. The language is defined as follows: Variables have type N. Assignment statements: X := 0; X := succ(y); X := pred(y). (assume pred(0) = 0) Composition of statements: S 1 ; S 2. while X 0 do S od. This simple language model has the same power as the Turing machine model. For input and output use the values of the variables before and after execution. Example/Quiz. To demonstrate the power of this language, define the following macros. Some Macros Macro Expansion X := Y X := 2 Z := Z + X Z := X + Y Z := X monus Y while X < Y do S od if X 0 then S 1 else S 2 fi X := succ(y); X := pred(x). X := 0; X := succ(x); X := succ(x). C := X; while C 0 do Z := succ(z); C := pred(c) od. Z := X; C := Y; while C 0 do Z := succ(z); C := pred(c) od. Z := X; C := Y; while C 0 do Z := pred(z); C := pred(c) od. T := Y monus X; while T 0 do S; T := Y monus X od. U := X; V := 1; while U 0 do S 1 ; V := 0; U := 0 od; while V 0 do S 2 ; V := 0 od. 2
3 Partial Recursive Functions This model consists of a set of functions that take natural numbers as arguments and as values. The functions are defined as follows, where x can represent zero or more arguments. Initial functions: zero(x) = 0, succ(n) = n + 1, and projections (e.g., p 2 (a, b, c) = b). Composition: e.g., ƒ(x) = h(g 1 (x),, g m (x)), where h, g 1,, g m are partial recursive. Primitive recursion: ƒ(x, 0) = h(x) (h is partial recursive) ƒ(x, succ(y)) = g(x, y, ƒ(x, y)) (g is partial recursive). Unbounded search (minimalization): ƒ(x) = min(y, g(x, y) = 0) (g is total partial recursive). This means that ƒ(x) = y is the minimum y such that g(x, y) = 0, if such a y exists. This model for constructing functions has the same power as the Turing machine model. Example. The predecessor and monus functions are partial recursive as follows: pred(0) = 0 pred(succ(y)) = y, which can be written in the form p 1 (y, pred(y)). monus(x, 0) = x monus(x, succ(y)) = pred(monus(x, y)), which can be written pred(p 3 (x, y, monus(x, y))). Quiz. Show that pred(monus(x, y)) = monus(pred(x), y)). Proof: The equation is true if x = 0 or y = 0. So assume x > 0 and y > 0. Then we have: pred(monus(x, y)) = if x > y then x y 1 else 0 monus(pred(x), y)) = if x 1 > y then x 1 y else 0. Although x > y and x 1 > y are different, the if-then-else values are equal. QED. 3
4 Quiz. Let p and q be partial recursive with p(x), q(x) {0, 1}, for false and true. Show that the logical operations p(x) q(x), p(x), and p(x) q(x), are partial recursive functions. Solutions: p(x) q(x) = p(x)q(x) p(x) = monus(1, p(x)) p(x) q(x) = p(x) + monus(1, p(x))q(x). Examples (Unbounded Search, Minimalization) ƒ(x) = min(y, xy = 0) defines ƒ(x) = 0. ƒ(x) = min(y, x + y = 0) defines ƒ(x) = if x = 0 then 0 else undefined. ƒ(x) = min(y, monus(x, y) = 0) defines ƒ(x) = x. ƒ(x) = min(y, monus(y, x) = 0) defines ƒ(x) = 0. ƒ(x, y) = min(z, monus(x + z, y) = 0) defines ƒ(x, y) = if x y then 0 else undefined Example/Quiz. For y 0, let ƒ(x, y) = min(z, monus(x, yz) = 0). What function does ƒ compute? Answer: ƒ(x, y) = x / y. To see this, notice that the definition ƒ(x, y) = min(z, monus(x, yz) = 0) means that ƒ(x, y) = z is the smallest natural number such that monus(x, yz) = 0. The definition of monus tells us that monus(x, yz) = 0 means that x yz. So z is the smallest natural number such that x yz. In other words, we have y(z 1) < x yz. Divide by y to obtain z 1 < x/y z. Therefore z = x / y. 4
5 Markov Algorithms This model processes strings. An algorithm consists of a finite, ordered, sequence of productions of the form x y, where x, y A* for some alphabet A. Any production can be suffixed with (halt) although this is not required. Execution Given an input string w A*, perform the following execution step repeatedly. Scan the productions x y sequentially to see whether x occurs as a substring of w. If so, replace the leftmost occurrence of x in w by y and reset w to this string. Otherwise halt. If the x y is labeled with (halt), then halt. Assumption: w = Λw. So a production of the form Λ y would transform w to yw. The Markov algorithm model has the same power as the Turing machine model. Example. The Markov algorithm consisting of the single production a Λ will delete all a s from any string. Example. A more instructive Markov algorithm to delete all a s from any string over {a, b} can be written as the following sequence of productions (# is an extra symbol). 1. #a # 2. #b b# 3. # Λ (halt) 4. Λ #. An example trace: abab (input) #abab (by 4) #bab (by 1) b#ab (by 2) b#b (by 1) bb# (by 2) bb (by 3, halt). 5
6 Quiz (1 minute). Find a Markov algorithm to replace each a with aa in strings over {a, b}. Answer. Modify the previous example: 1. #a aa# 2. #b b# 3. # Λ (halt) 4. Λ #. Example/Quiz. Find a Markov algorithm to delete the rightmost b from strings over {a, b}. Solution: 1. #a a# 2. #b b# b@ Λ (halt) Λ (halt) 7. Λ #. Example/Quiz. Find a Markov algorithm to implement succ(x), where x is a natural number represented in binary. Assume no leading zeros (except 0 itself). Solution: 1. #0 0# 2. #1 1# 3. 0# 1 (halt) @ 1 (halt) 1 (halt) 8. Λ #. 6
7 Post Algorithms This model processes strings. An algorithm consists of a finite set of productions of the form s t where s and t are strings over the union of an input alphabet A with a set of variables and other symbols. Restriction: If a variable X occurs in t then X occurs in s. A production can be suffixed with (halt) although this is not required. Execution Given an input string w A*, perform the following execution step repeatedly. Find a production x y such that w matches x. If so, use the match and y to construct a new string w. Otherwise halt. If the x y is labeled with (halt), then halt. Assumption: A variable may match Λ. Example. If the input string is 1, then 1 matches 1X. So a production like 1X 1X0 would transform 1 into 10. The Post algorithm model has the same power as the Turing machine model. Example. A Post algorithm with the single production XaY XY will delete all a s from any string. Notice the nondeterminism. Example. A Post algorithm to replace each a with aa in strings over {a, b}. Solution: X#aY Xaa#Y 4. X#bY Xb#Y X (halt). 7
8 Example. A Post algorithm to delete the rightmost b from any string over {a, b}. Solution: 1. Xb X (halt) 2. Xa X#a@ 3. Xa#Y X#aY 4. Xb#Y@ XY (halt) 5. #X@ X (halt). Example/Quiz. Find a Post algorithm to implement succ(x), where x is a natural number represented in binary. Assume no leading zeros (except 0 itself). Solution: 1. X0 X1 (halt) 2. X1 X#0# 3. X1#Y# X#0Y# 4. X0#Y# X1Y (halt) 5. #Y# 1Y (halt). Post Systems This model generates a set of strings from axioms (a given set of strings) and inference rules (a given set of productions that map strings to strings by matching). Execution: Match the left side of a production with an axiom string or a string that has already been constructed. Then use the match and the right side to construct a new string. Example. A Post system to generate the binary representations of natural numbers: Axioms: 0, 1 Inference Rules: 1X 1X0 1X 1X1. The system generates the set {0, 1, 10, 11, 100, 101, 110, 111, }. 8
9 Quiz. Find a Post system to generate {a}*. Solution: Axiom: Λ Inference rule: X ax. Quiz. Find a Post system to generate the set {a n b n c n n N}. One of Many Solutions: Axioms: Λ, abc Inference rule: axbcy aaxbbccy. The Post system model has the same power as the Turing machine model in the following sense: A function ƒ : A* A* is Post-computable if there is a Post system to compute the function as a set of ordered pairs in the form {x#ƒ(x) x A*}. Post-computable functions coincide with Turing-computable functions. Example/Quiz. Generate the function ƒ : {a}* {a}* where ƒ(a n ) = a 2n. Solution: Axiom: Λ#Λ Inference rule: X#Y Xa#Yaa (or the simpler X axaa) This system generates the set {Λ#Λ, a#aa, aa#aaaa,, a n #a 2n, }. Example/Quiz. Generate the function ƒ : N N defined by ƒ(n) = n 2, where n is represented as a string over {a} of length n. A Solution: Axiom: Λ#Λ Inference rule: X#Y Xa#YXXa. Proof: In terms of natural numbers, from the pair n#n 2 we must construct (n + 1)#(n + 1) 2. We can write (n + 1) 2 = n 2 + 2n + 1 = n 2 + n + n + 1. So from n#n 2 we must get (n + 1)#(n 2 + n + n + 1). In terms of strings over {a}, we transform X#Y into Xa#YXXa. QED. 9
Recursive Functions. Recursive functions are built up from basic functions by some operations.
Recursive Functions Recursive functions are built up from basic functions by some operations. The Successor Function Let s get very primitive. Suppose we have 0 defined, and want to build the nonnegative
More informationPrim Rec, Decidable, Undecidable, and Beyond. William Gasarch-U of MD
Primitive Recursive An attempt to pin down the set of functions that are computable. A function f is Primitive Recursive 1) f (x 1,..., x n ) = 0 OR f (x 1,..., x n ) = x i + c, c N. 2) If g 1 (x 1,...,
More informationCOMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS
COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS JOSHUA LENERS Abstract. An algorithm is function from ω to ω defined by a finite set of instructions to transform a given input x to the desired output
More informationRecursive Functions. 6.1 Primitive Recursive Functions
6 Recursive Functions The intuitive notion of an effectively computable function is the notion of a function for which there are definite, explicit rules, following which one could in principle compute
More informationNotions of Computability
Notions of Computability Many notions of computability have been proposed, e.g. (Type 0 a.k.a. Unrestricted or context sensitive) Grammars Partial Recursive Functions Lambda calculus Markov Algorithms
More informationLecture 7: Primitive Recursion is Turing Computable. Michael Beeson
Lecture 7: Primitive Recursion is Turing Computable Michael Beeson Closure under composition Let f and g be Turing computable. Let h(x) = f(g(x)). Then h is Turing computable. Similarly if h(x) = f(g 1
More informationTAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function
TAFL 1 (ECS-403) Unit- V 5.1 Turing Machine 5.2 TM as computer of Integer Function 5.2.1 Simulating Turing Machine by Computer 5.2.2 Simulating Computer by Turing Machine 5.3 Universal Turing Machine 5.4
More informationTheory of Computer Science
Theory of Computer Science D4. Primitive Recursion and µ-recursion Malte Helmert University of Basel April 26, 2017 Overview: Computability Theory Computability Theory imperative models of computation:
More informationLanguages and Strings. Chapter 2
Languages and Strings Chapter 2 Let's Look at Some Problems int alpha, beta; alpha = 3; beta = (2 + 5) / 10; (1) Lexical analysis: Scan the program and break it up into variable names, numbers, etc. (2)
More informationTheory of Computer Science. Theory of Computer Science. D4.1 Introduction. D4.2 Basic Functions and Composition. D4.3 Primitive Recursion
Theory of Computer Science April 27, 2016 D4. Primitive Recursion and µ-recursion Theory of Computer Science D4. Primitive Recursion and µ-recursion Malte Helmert University of Basel April 27, 2016 D4.1
More informationCOMP 382: Reasoning about algorithms
Spring 2015 Unit 2: Models of computation What is an algorithm? So far... An inductively defined function Limitation Doesn t capture mutation of data Imperative models of computation Computation = sequence
More information(a) Give inductive definitions of the relations M N and M N of single-step and many-step β-reduction between λ-terms M and N. (You may assume the
COMPUTER SCIENCE TRIPOS Part IB 205 Paper 6 4 (AMP) (a) Give inductive definitions of the relations M N and M N of single-step and many-step β-reduction between λ-terms M and N. (You may assume the definition
More informationTuring Machine Languages
Turing Machine Languages Based on Chapters 23-24-25 of (Cohen 1997) Introduction A language L over alphabet is called recursively enumerable (r.e.) if there is a Turing Machine T that accepts every word
More informationComputability via Recursive Functions
Computability via Recursive Functions Church s Thesis All effective computational systems are equivalent! To illustrate this point we will present the material from chapter 4 using the partial recursive
More informationSolution Set 8 Date: 1 December, 1992
Burt Rosenberg Math 688: Theory of Computability and Complexity 1 Solution Set 8 Date: 1 December, 1992 1. Prove the following functions are primitive recursive, (a) x < y. The functions sgn(n) and monus(x,
More information05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability.
05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability. 1. Turing Machines A Turing machine (TM) consists of (Turing 1936): Alan Turing 1. An unbounded tape. Divided into squares,
More informationLecture 5: The Halting Problem. Michael Beeson
Lecture 5: The Halting Problem Michael Beeson Historical situation in 1930 The diagonal method appears to offer a way to extend just about any definition of computable. It appeared in the 1920s that it
More informationCAS 701 Presentation. Ackermann's Function. Qinglei Zhang, Nov. 20, 2008.
CAS 701 Presentation Ackermann's Function Qinglei Zhang, Nov. 20, 2008. History The belief in the early 1900s: every computable function was also primitive recursive A strict subset of the recursive functions:
More informationMATH Iris Loeb.
MATH 134 http://www.math.canterbury.ac.nz/math134/09/su1/c Iris Loeb I.Loeb@math.canterbury.ac.nz Office Hours: Thur 10.00-11.00, Room 703 (MSCS Building) The Limits of Formal Logic We now turn our attention
More informationComputability Theory
CSC 438F/2404F Notes (S. Cook) Fall, 2008 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10. Other references:
More informationLecture T4: Computability
Puzzle ("Post s Correspondence Problem") Lecture T4: Computability Given a set of cards: N card types (can use as many of each type as possible) Each card has a top string and bottom string Example : N
More informationCISC 4090 Theory of Computation
CISC 4090 Theory of Computation Turing machines Professor Daniel Leeds dleeds@fordham.edu JMH 332 Alan Turing (1912-1954) Father of Theoretical Computer Science Key figure in Artificial Intelligence Codebreaker
More informationIntroduction to the Lambda Calculus
Introduction to the Lambda Calculus Overview: What is Computability? Church s Thesis The Lambda Calculus Scope and lexical address The Church-Rosser Property Recursion References: Daniel P. Friedman et
More informationAutomatic Reasoning (Section 8.3)
Automatic Reasoning (Section 8.3) Automatic Reasoning Can reasoning be automated? Yes, for some logics, including first-order logic. We could try to automate natural deduction, but there are many proof
More informationDoes this program exist? Limits of computability. Does this program exist? A helper function. For example, if the string program is
Does this program exist? For example, if the string program is Limits of computability public void abc(string s) { if( s == "abc" ) { print "Hello world!"; } else { print "Whatever"; }} then test called
More informationPhil 320 Chapter 7: Recursive sets and relations Note: 0. Introduction Significance of and main objectives for chapter 7:
Phil 320 Chapter 7: Recursive sets and relations (Note: We cover only section 7.1.) 0. Introduction Significance of and main objectives for chapter 7: 1. Chapter 7 generalizes the notion of recursive (or
More informationFunctional Programming and λ Calculus. Amey Karkare Dept of CSE, IIT Kanpur
Functional Programming and λ Calculus Amey Karkare Dept of CSE, IIT Kanpur 0 Software Development Challenges Growing size and complexity of modern computer programs Complicated architectures Massively
More informationCHAPTER 4. COMPUTABILITY AND DECIDABILITY
CHAPTER 4. COMPUTABILITY AND DECIDABILITY 1. Introduction By definition, an n-ary function F on N assigns to every n-tuple k 1,...,k n of elements of N a unique l N which is the value of F at k 1,...,k
More informationQUESTION BANK. Unit 1. Introduction to Finite Automata
QUESTION BANK Unit 1 Introduction to Finite Automata 1. Obtain DFAs to accept strings of a s and b s having exactly one a.(5m )(Jun-Jul 10) 2. Obtain a DFA to accept strings of a s and b s having even
More informationIntroduction to Computers & Programming
16.070 Introduction to Computers & Programming Theory of computation 5: Reducibility, Turing machines Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT States and transition function State control A finite
More informationEnumerations and Turing Machines
Enumerations and Turing Machines Mridul Aanjaneya Stanford University August 07, 2012 Mridul Aanjaneya Automata Theory 1/ 35 Finite Sets Intuitively, a finite set is a set for which there is a particular
More informationAutomata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81%
Automata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81% 1. (2 pts) See text. You can t be sloppy defining terms like this. You must show a bijection between the natural numbers
More informationCMPSCI 250: Introduction to Computation. Lecture #28: Regular Expressions and Languages David Mix Barrington 2 April 2014
CMPSCI 250: Introduction to Computation Lecture #28: Regular Expressions and Languages David Mix Barrington 2 April 2014 Regular Expressions and Languages Regular Expressions The Formal Inductive Definition
More informationCS 275 Automata and Formal Language Theory. First Problem of URMs. (a) Definition of the Turing Machine. III.3 (a) Definition of the Turing Machine
CS 275 Automata and Formal Language Theory Course Notes Part III: Limits of Computation Chapt. III.3: Turing Machines Anton Setzer http://www.cs.swan.ac.uk/ csetzer/lectures/ automataformallanguage/13/index.html
More informationFinite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur
Finite Automata Dr. Nadeem Akhtar Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur PhD Laboratory IRISA-UBS University of South Brittany European University
More informationUNIT I PART A PART B
OXFORD ENGINEERING COLLEGE (NAAC ACCREDITED WITH B GRADE) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS YEAR/SEM: III/V STAFF NAME: Dr. Sangeetha Senthilkumar SUB.CODE: CS6503 SUB.NAME:
More informationSolution Set 2 Date: 22 September, 1992
Burt Rosenberg Math 688: Theory of Computability and Complexity 1 Solution Set 2 Date: 22 September, 1992 1. Problem 2.1.2: Show that the flow diagram of every while-program is a flowchart program. The
More informationDenotational semantics
1 Denotational semantics 2 What we're doing today We're looking at how to reason about the effect of a program by mapping it into mathematical objects Specifically, answering the question which function
More informationThe Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems
The Turing Machine Unsolvable Problems Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical machine
More informationCMSC 330, Fall 2013, Practice Problem 3 Solutions
CMSC 330, Fall 2013, Practice Problem 3 Solutions 1. OCaml and Functional Programming a. Define functional programming Programs are expression evaluations b. Define imperative programming Programs change
More informationWe can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack.
Other Automata We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack. From all of this information we decide what state
More informationFormal Languages and Automata
Mobile Computing and Software Engineering p. 1/3 Formal Languages and Automata Chapter 3 Regular languages and Regular Grammars Chuan-Ming Liu cmliu@csie.ntut.edu.tw Department of Computer Science and
More informationMultiple Choice Questions
Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Formal Language and Automata Theory Subject Code: CS 402 Multiple Choice Questions 1. The basic limitation of an FSM
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/ Today's learning goals Sipser sec 3.2 Describe several variants of Turing machines and informally explain why they
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Operational Semantics CMSC 330 Summer 2018 1 Formal Semantics of a Prog. Lang. Mathematical description of the meaning of programs written in that language
More informationNotes for Comp 454 Week 2
Notes for Comp 454 Week 2 This week we look at the material in chapters 3 and 4. Homework on Chapters 2, 3 and 4 is assigned (see end of notes). Answers to the homework problems are due by September 10th.
More informationCS402 - Theory of Automata Glossary By
CS402 - Theory of Automata Glossary By Acyclic Graph : A directed graph is said to be acyclic if it contains no cycles. Algorithm : A detailed and unambiguous sequence of instructions that describes how
More informationChapter 18: Decidability
Chapter 18: Decidability Peter Cappello Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 cappello@cs.ucsb.edu Please read the corresponding chapter before
More informationCS21 Decidability and Tractability
CS21 Decidability and Tractability Lecture 9 January 26, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis decidable, RE, co-re languages Deciding and Recognizing
More informationM. Snyder, George Mason University LAMBDA CALCULUS. (untyped)
1 LAMBDA CALCULUS (untyped) 2 The Untyped Lambda Calculus (λ) Designed by Alonzo Church (1930s) Turing Complete (Turing was his doctoral student!) Models functions, always as 1-input Definition: terms,
More information1.3 Functions and Equivalence Relations 1.4 Languages
CSC4510 AUTOMATA 1.3 Functions and Equivalence Relations 1.4 Languages Functions and Equivalence Relations f : A B means that f is a function from A to B To each element of A, one element of B is assigned
More informationModule 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur
Module 6 Knowledge Representation and Logic (First Order Logic) Lesson 15 Inference in FOL - I 6.2.8 Resolution We have introduced the inference rule Modus Ponens. Now we introduce another inference rule
More informationDVA337 HT17 - LECTURE 4. Languages and regular expressions
DVA337 HT17 - LECTURE 4 Languages and regular expressions 1 SO FAR 2 TODAY Formal definition of languages in terms of strings Operations on strings and languages Definition of regular expressions Meaning
More informationTheory of Computation Dr. Weiss Extra Practice Exam Solutions
Name: of 7 Theory of Computation Dr. Weiss Extra Practice Exam Solutions Directions: Answer the questions as well as you can. Partial credit will be given, so show your work where appropriate. Try to be
More informationWe show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.
219 Lemma J For all languages A, B, C the following hold i. A m A, (reflexive) ii. if A m B and B m C, then A m C, (transitive) iii. if A m B and B is Turing-recognizable, then so is A, and iv. if A m
More informationSemantical Characterization of unbounded-nondeterministic ASMs
Semantical Characterization of unbounded-nondeterministic ASMs Berlin, 26/27 Feb 2007 Andreas Glausch Humboldt-Universität zu Berlin Department of Computer Science Abstract State Machines (ASMs) state
More informationSkyup's Media. PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table.
Code No: XXXXX JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.Tech II Year I Semester Examinations (Common to CSE and IT) Note: This question paper contains two parts A and B. Part A is compulsory
More informationSeptember 18, B Math Test Chapter 1 Name: x can be expressed as: {y y 0, y R}.
September 8, 208 62B Math Test Chapter Name: Part : Objective Questions [ mark each, total 2 marks]. State whether each of the following statements is TRUE or FALSE a) The mapping rule (x, y) (-x, y) represents
More informationProblems, Languages, Machines, Computability, Complexity
CS311 Computational Structures Problems, Languages, Machines, Computability, Complexity Lecture 1 Andrew P. Black Andrew Tolmach 1 The Geography Game Could you write a computer program to play the geography
More informationAlphabets, strings and formal. An introduction to information representation
Alphabets, strings and formal languages An introduction to information representation 1 Symbols Definition: A symbol is an object endowed with a denotation (i.e. literal meaning) Examples: Variables are
More informationDiagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?
Diagonalization Cardinalities The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? We say that a set S has at least as great cardinality as set T, written S T, if
More informationChapter 11 :: Functional Languages
Chapter 11 :: Functional Languages Programming Language Pragmatics Michael L. Scott Copyright 2016 Elsevier 1 Chapter11_Functional_Languages_4e - Tue November 21, 2017 Historical Origins The imperative
More informationCOMP Logic for Computer Scientists. Lecture 25
COMP 1002 Logic for Computer Scientists Lecture 25 B 5 2 J Admin stuff Assignment 4 is posted. Due March 23 rd. Monday March 20 th office hours From 2:30pm to 3:30pm I need to attend something 2-2:30pm.
More informationTheory of Computations Spring 2016 Practice Final
1 of 6 Theory of Computations Spring 2016 Practice Final 1. True/False questions: For each part, circle either True or False. (23 points: 1 points each) a. A TM can compute anything a desktop PC can, although
More informationMidterm Practice Exam Sample Solutions
Name: SID: CS 620 Theory of Computation Fall 2017 Instructor: Marc Pomplun Midterm Practice Exam Sample Solutions Duration: 1 hour and 15 minutes You only need your writing utensils to complete this exam.
More informationVariants of Turing Machines
November 4, 2013 Robustness Robustness Robustness of a mathematical object (such as proof, definition, algorithm, method, etc.) is measured by its invariance to certain changes Robustness Robustness of
More informationRecursive Function Theory
The Initial Functions The Building Operations Composition Primitive Recursion Minimization Summary Recursive Function Theory Peter Suber, Philosophy Department, Earlham College Recursive function theory,
More informationPower Set of a set and Relations
Power Set of a set and Relations 1 Power Set (1) Definition: The power set of a set S, denoted P(S), is the set of all subsets of S. Examples Let A={a,b,c}, P(A)={,{a},{b},{c},{a,b},{b,c},{a,c},{a,b,c}}
More informationSpecifications and Assertions
Specifications and Assertions Jan van Eijck Master SE, 29 September 2010 Abstract As a start, we give further examples of Alloy specifications. Next we turn to specification of imperative programs. Assertions
More informationCS 242. Fundamentals. Reading: See last slide
CS 242 Fundamentals Reading: See last slide Syntax and Semantics of Programs Syntax The symbols used to write a program Semantics The actions that occur when a program is executed Programming language
More information5. Introduction to the Lambda Calculus. Oscar Nierstrasz
5. Introduction to the Lambda Calculus Oscar Nierstrasz Roadmap > What is Computability? Church s Thesis > Lambda Calculus operational semantics > The Church-Rosser Property > Modelling basic programming
More informationPHIL 240, Introduction to Logic, Sections Fall 2011 FINAL EXAM 14 December Name (5 points): Section (5 points):
Section I True / False questions (2 points each) 1. TRUE Any argument that is sound is also valid. 2. FALSE_ If the premises of an argument are all true, then that argument is sound. 3. TRUE Every universal
More informationCHAPTER TWO LANGUAGES. Dr Zalmiyah Zakaria
CHAPTER TWO LANGUAGES By Dr Zalmiyah Zakaria Languages Contents: 1. Strings and Languages 2. Finite Specification of Languages 3. Regular Sets and Expressions Sept2011 Theory of Computer Science 2 Strings
More informationGlynda, the good witch of the North
Strings and Languages It is always best to start at the beginning -- Glynda, the good witch of the North What is a Language? A language is a set of strings made of of symbols from a given alphabet. An
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Lecture 15 Ana Bove May 23rd 2016 More on Turing machines; Summary of the course. Overview of today s lecture: Recap: PDA, TM Push-down
More informationn λxy.x n y, [inc] [add] [mul] [exp] λn.λxy.x(nxy) λmn.m[inc]0 λmn.m([add]n)0 λmn.n([mul]m)1
LAMBDA CALCULUS 1. Background λ-calculus is a formal system with a variety of applications in mathematics, logic, and computer science. It examines the concept of functions as processes, rather than the
More informationWhat computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora
What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora Administrivia In class midterm in midterms week; Thurs Mar 13 (closed book;? No lab in midterms week; review session instead. What computers
More information6. Advanced Topics in Computability
227 6. Advanced Topics in Computability The Church-Turing thesis gives a universally acceptable definition of algorithm Another fundamental concept in computer science is information No equally comprehensive
More informationIntroduction to the Lambda Calculus. Chris Lomont
Introduction to the Lambda Calculus Chris Lomont 2010 2011 2012 www.lomont.org Leibniz (1646-1716) Create a universal language in which all possible problems can be stated Find a decision method to solve
More informationI have read and understand all of the instructions below, and I will obey the Academic Honor Code.
Midterm Exam CS 341-451: Foundations of Computer Science II Fall 2014, elearning section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all
More informationR10 SET a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA?
R1 SET - 1 1. a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA? 2. a) Design a DFA that accepts the language over = {, 1} of all strings that
More informationCMSC 132: Object-Oriented Programming II
CMSC 132: Object-Oriented Programming II Regular Expressions & Automata Department of Computer Science University of Maryland, College Park 1 Regular expressions Notation Patterns Java support Automata
More information15.4 Longest common subsequence
15.4 Longest common subsequence Biological applications often need to compare the DNA of two (or more) different organisms A strand of DNA consists of a string of molecules called bases, where the possible
More informationCpSc 421 Final Solutions
CpSc 421 Final Solutions Do any eight of the ten problems below. If you attempt more than eight problems, please indicate which ones to grade (otherwise we will make a random choice). This allows you to
More informationProof Techniques Alphabets, Strings, and Languages. Foundations of Computer Science Theory
Proof Techniques Alphabets, Strings, and Languages Foundations of Computer Science Theory Proof By Case Enumeration Sometimes the most straightforward way to prove that a property holds for all elements
More informationCIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)
By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable
More informationλ-calculus Lecture 1 Venanzio Capretta MGS Nottingham
λ-calculus Lecture 1 Venanzio Capretta MGS 2018 - Nottingham Table of contents 1. History of λ-calculus 2. Definition of λ-calculus 3. Data Structures 1 History of λ-calculus Hilbert s Program David Hilbert
More informationReview. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals
Review CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics e ::= λx. e x ee c v ::= λx. e c (λx. e) v e[v/x] e 1 e 2 e 1 e 2 τ ::= int τ τ Γ ::= Γ,x : τ e 2 e 2 ve 2 ve 2 e[e /x]:
More informationWhat does my program mean?
September 16, 2015 L02-1 What does my program mean? Armando Solar Lezama Computer Science and Artificial Intelligence Laboratory M.I.T. Adapted from Arvind 2010. Used with permission. September 16, 2015
More information4/19/2018. Chapter 11 :: Functional Languages
Chapter 11 :: Functional Languages Programming Language Pragmatics Michael L. Scott Historical Origins The imperative and functional models grew out of work undertaken by Alan Turing, Alonzo Church, Stephen
More informationThe Eval/Apply Cycle Eval. Evaluation and universal machines. Examining the role of Eval. Eval from perspective of language designer
Evaluation and universal machines What is the role of evaluation in defining a language? How can we use evaluation to design a language? The Eval/Apply Cycle Eval Exp & env Apply Proc & args Eval and Apply
More informationContext-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5
Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5 1 Not all languages are regular So what happens to the languages which are not regular? Can we still come up with a language recognizer?
More informationRegular Expressions & Automata
Regular Expressions & Automata CMSC 132 Department of Computer Science University of Maryland, College Park Regular expressions Notation Patterns Java support Automata Languages Finite State Machines Turing
More informationCS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011
CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics Dan Grossman Spring 2011 Review e ::= λx. e x e e c v ::= λx. e c τ ::= int τ τ Γ ::= Γ, x : τ (λx. e) v e[v/x] e 1 e 1 e 1 e
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Sipser Ch 2, 3.1 State and use the Church-Turing thesis. Describe several variants of Turing
More informationUniversity of Nevada, Las Vegas Computer Science 456/656 Fall 2016
University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 The entire examination is 925 points. The real final will be much shorter. Name: No books, notes, scratch paper, or calculators. Use pen
More informationRecursive definition of sets and structural induction
CS2209A 2017 Applied Logic for Computer Science Lecture 21, 22 Recursive definition of sets and structural induction Instructor: Marc Moreno Maza 1 Tower of Hanoi game Rules of the game: Start with all
More informationTheory of Computations Spring 2016 Practice Final Exam Solutions
1 of 8 Theory of Computations Spring 2016 Practice Final Exam Solutions Name: Directions: Answer the questions as well as you can. Partial credit will be given, so show your work where appropriate. Try
More information1. [5 points each] True or False. If the question is currently open, write O or Open.
University of Nevada, Las Vegas Computer Science 456/656 Spring 2018 Practice for the Final on May 9, 2018 The entire examination is 775 points. The real final will be much shorter. Name: No books, notes,
More information2.8 Universal Turing Machines and the Halting Problem
2.8 Universal Turing Machines and the Halting Problem Through the hierarchy of Slide 74 we indirectly get a sense that Turing Machines are at least as computationally powerful as any other known model
More information