1 Lecture 2 Topics –Importance of this material Fundamental Limitations –Connecting Problems and Languages Problems –Search, function and decision problems.

Slides:



Advertisements
Similar presentations
College of Information Technology & Design
Advertisements

Character and String definitions, algorithms, library functions Characters and Strings.
YES-NO machines Finite State Automata as language recognizers.
The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
1 Lecture 4 Topics –Problem solving Subroutine Theme –REC language class The class of solvable problems Closure properties.
1 Module 3: Classifying Problems One of the main themes of this course will be to classify problems in various ways –By solvability Solvable, “half-solvable”,
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Lecture 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
1 Lecture 14 Language class LFSA –Study limits of what can be done with FSA’s –Closure Properties –Comparing to other language classes.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Lecture 2: Fundamental Concepts
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
Module 5 Topics Proof of the existence of unsolvable problems
1 Lecture 1: Course Overview Course: CSE 360 Instructor: Dr. Eric Torng TA: Huamin Chen.
1 Module 7 Halting Problem –Fundamental program behavior problem –A specific unsolvable problem –Diagonalization technique revisited Proof more complex.
1 Lecture 26 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
1 Module 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
1 Lecture 7 Halting Problem –Fundamental program behavior problem –A specific unsolvable problem –Diagonalization technique revisited Proof more complex.
1 Lecture 7 Halting Problem –Fundamental program behavior problem –A specific unsolvable problem –Diagonalization technique revisited Proof more complex.
1 Lecture 18 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
1 Module 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
1 Lecture 7 Topics –Problems about program behavior At least problem input is a program/algorithm –Halting Problem Fundamental problem about program behavior.
1 Lecture 23 Decision problems about regular languages –Programs can be inputs to other programs FSA’s, NFA’s, regular expressions –Basic problems are.
Chapter 11: Limitations of Algorithmic Power
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
1 Module 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
Copyright © Cengage Learning. All rights reserved.
Hardness Results for Problems
1 Lecture 6 Topics –Proof of the existence of unsolvable problems Problems/languages not in REC Proof Technique –There are more problems/languages than.
The Fundamentals: Algorithms, the Integers & Matrices.
Chapter 3: The Fundamentals: Algorithms, the Integers, and Matrices
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
Complexity 2-1 Problems and Languages Complexity Andrei Bulatov.
Randomized Turing Machines
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
MA/CSSE 474 Theory of Computation Decision Problems DFSMs.
A Universal Turing Machine
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
ALGORITHMS.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Computability and Complexity 2-1 Problems and Languages Computability and Complexity Andrei Bulatov.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
The Big Picture Chapter 3.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
The Big Picture Chapter 3. A decision problem is simply a problem for which the answer is yes or no (True or False). A decision procedure answers a decision.
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
August 2003 CIS102/LECTURE 9/FKS 1 Mathematics for Computing Lecture 9 LOGIC Chapter 3.
MA/CSSE 474 Theory of Computation Languages, prefixes, sets, cardinality, functions.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Module 7 Halting Problem –Fundamental program behavior problem –A specific unsolvable problem –Diagonalization technique revisited Proof more complex 1.
Data Representation COE 308 Computer Architecture
A Universal Turing Machine
Data Representation ICS 233
CIS Automata and Formal Languages – Pei Wang
Data Structures and Algorithms
Discrete Mathematics for Computer Science
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Data Representation COE 308 Computer Architecture
Presentation transcript:

1 Lecture 2 Topics –Importance of this material Fundamental Limitations –Connecting Problems and Languages Problems –Search, function and decision problems Languages –Encodings of Problems »Encode input instances of problem as strings –Language Recognition Problem »Is an input string in the language?

2 Importance: Philosophy Phil. of life –What is the purpose of life? –What is achievable in life? –What is NOT achievable in life? Phil. of computing –What is the purpose of programming? –What is solvable through programming? –What is NOT solvable through programming?

3 Importance: Science Physics –Study of fundamental physical laws and phenomenon like gravity and electricity Engineering –Governed by physical laws Our material –Study of fundamental computational laws and phenomenon like undecidability and universal computers Programming –Governed by computational laws

4 Problem Types We classify problems based on –range (output set) size infinite binary –mapping type function –unique output per input relation –more than one output per input

5 I) Search Problems (countably) infinite range the mapping may be a relation Inputs Outputs

6 Examples Divisor –Input: Integer n –Output: An integral divisor of n Inputs Outputs

7 II) Function Problems (countably) infinite range mapping is a function –unique solution per input Inputs Outputs

8 Examples Sorting Multiplication Problem –Input: 2 integers x and y –Output: xy Inputs Outputs 2,5 10

9 Examples Maximum divisor problem –Input: Integer n –Output: size of maximum divisor of n smaller than n Inputs Outputs

10 III) Decision Problems Output is yes or no –range = {Yes, No} unique solution –only one of Yes/No is correct Inputs Outputs Yes No

11 Examples Decision sorting –Input: list of numbers –Yes/No question: Is list in nondecreasing order? Inputs Outputs Yes No (1,3,2,4) (1,2,3,4)

12 Examples Decision multiplication –Input: Three numbers x,y, z –Yes/No question: Is xy = z? Inputs Outputs Yes No (3,5,14) (3,5,15)

13 Examples Decision Divisor Problem –Input: Two numbers x and y –Yes/No question: Is y a divisor of x? Inputs Outputs Yes No (14,5) (14,7)

14 What about finite domain problems? Note all problems described above have infinite domains (input set) –size of range varies from 2 to countably infinite What happens if we had a problem with only a finite domain? –“Table lookup”

15 Table Lookup Program string x; cin >> x; switch x { case “Kona”: cout << 3; break; case “Eric”: cout << 31; break; case “Cliff”: cout << 36; break; default: cout << “Illegal input\n”; }

16 Generality of Decision Problems We now show that we can focus only on decision problems –Having yes/no outputs is not limiting. –If we can solve a decision version of a problem, we can typically solve the function and search versions of the same problem as well

17 Example Decision divisor problem –Input: Integers x and y –Yes/No Question: Is y a divisor of x? –Assumption: Alg. A solves this problem Function divisor problem –Input: Integer x –Output: Largest divisor of x that is not x –Goal: Construct alg. A’ to solve this problem

18 Program A’ integer x, max, j; cin >> x; max = 1; for (j=2; j<x; j++) if (A(x,j))// using A as a procedure max = j; return max;

19 Connecting Problems and Languages Start with any problem P Convert P to equivalent decision problem P’ Convert P’ to equiv set membership problem SP –Reinterpret P’ Convert SP to language recognition problem L –Encoding scheme

20 Set Membership Problem Setting –Universe U –set S subset of U Input –Element x in U Yes/No Question –Is x in S?

21 Decision Problems to Set Membership Problems Reformulate/interpret a decision problem as a set membership problem –Universe U: set of all input instances –Set S: either set of all YES or all NO input instances

22 Example Decision divisor problem –Input: Integers x and y –Yes/No Question: Is y a divisor of x? Set membership problem –Universe U = {(x,y) | x and y are integers} –Set S = {(x,y) | y divides x}

23 Sets to Languages How do we represent an input instance of a set membership problem? –We use an encoding scheme Each input instance is mapped to a unique string over some finite alphabet  Think ASCII Corresponding language L: the set of strings corresponding to yes instances

24 Decision multiplication problem Alphabet  1  = {0,1,2,3,4,5,6,7,8,9,;} –7;10;25 NO instance –3;4;12 YES instance Binary Alphabet  2 = {0,1} –Encode alphabet  1 11 characters in  1 4 bits per character of  1 –Encoding of 3;4;

25 Decision divisor problem Fill in

26 Language recognition problem (LRP) Input Instance Description –Finite length string x in  * (why finite?) Yes/No Question –Is input string x in language L? How does the language recognition problem for L relate to corresponding set membership problem?

27 Decision Addition Problem Illegal strings easily recognized –Thus two problems essentially identical ** YesNo 3;4;7 1;1;3 ;;1111;3 1;1;2 7;5;1 111;1111 Illegal

28 Every decision problem can be formulated as an LRP First convert to set membership problem Then convert to language recognition problem using an encoding scheme –Illegal strings easily recognized

29 Key Concepts Different types of problems –always countably infinite domain Decision problems –binary range = {YES, NO} –still general despite limited range Set membership problem Language recognition problem –encoding scheme