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”,

Slides:



Advertisements
Similar presentations
CS211 Problems: unsolvable, unfeasible and unsolved Topic 3: P and NP.
Advertisements

Types of Algorithms.
Greedy Algorithms Be greedy! always make the choice that looks best at the moment. Local optimization. Not always yielding a globally optimal solution.
Functions.
1 Lecture 4 Topics –Problem solving Subroutine Theme –REC language class The class of solvable problems Closure properties.
1 Lecture 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
Lecture 9 Recursive and r.e. language classes
1 Module 9 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
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 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 2 Topics –Importance of this material Fundamental Limitations –Connecting Problems and Languages Problems –Search, function and decision problems.
1 Lecture 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
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
1 Module 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
1 Lecture 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
1 Strings and Languages Operations Concatenation Exponentiation Kleene Star Regular Expressions.
1 Module 10 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
Hardness Results for Problems
Jeopardy RelationsDiscrete/Conti nuous Function? Domain/ Range Misc. $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final Jeopardy.
Function: Definition A function is a correspondence from a first set, called the domain, to a second set, called the range, such that each element in the.
Algorithms: Selected Exercises Goals Introduce the concept & basic properties of an algorithm.
College Algebra Acosta/Karwowski. Chapter 5 Inverse functions and Applications.
Function Lab Chapter 9. Does the table represent a function? YES or NO XY Remember: The “X”s are all different if it is a function Remember:
Functions Teacher Twins©2014.
 Let A and B be any sets A binary relation R from A to B is a subset of AxB Given an ordered pair (x, y), x is related to y by R iff (x, y) is in R. This.
Lesson 1.2 – Page 17 Desk Standards: Reason quantitatively and use units to solve problems.
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
Functions and Relations Not relationships Relations.
Ch Relations and Functions Objective: To be able to determine whether a given relation is a function.
Functions. Warm Up Solve each equation. 1.2x – 6 = x = X + 29 = x – 5 – 4x = 17 x = 14 x = - 7 x = -15 x = 11.
1.2 Represent Functions as Rules and Tables EQ: How do I represent functions as rules and tables??
5.2 Relations & Functions. 5.2 – Relations & Functions Evaluating functions Remember, the DOMAIN is the set of INPUT values and the RANGE is the set of.
Rational Numbers and Fields
MATH 224 – Discrete Mathematics
Math – What is a Function? 1. 2 input output function.
FUNCTIONS Relation – a set of ( x, y ) points Function – a set of ( x, y ) points where there is only one output for each specific input – x can not be.
Bell Ringer 10/30/ Objectives The student will be able to: 1. identify the domain and range of a relation. 2. show relations as sets and mappings.
Section 7.1: Functions and Representations of Functions.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
Review Algebra 1 Chapter
Write a function rule for a graph EXAMPLE 3 Write a rule for the function represented by the graph. Identify the domain and the range of the function.
Tuesday, January 29, 2013 Agenda: TISK, No MM Lesson 12-4: Functions Homework: Ch 12 HW Packet #2, §12-4 problems TISK Problems 1. Write an equation in.
Lesson 31 Relations and Functions NCSCOS Obj.: 2.01 Daily Objectives TLW identify the domain and range of a relation. TLW show relations as sets and mappings.
1.1 - Functions. Ex. 1 Describe the sets of numbers using set- builder notation. a. {8,9,10,11,…}
Notes:Relations and Functions Section 1-6 Student Objective: The students will be able to identify relations and functions and evaluate functions. 1.Definitions:
Data Structures and Algorithms
Copyright © 2016, 2013, and 2010, Pearson Education, Inc.
EXAMPLE 1 Represent relations
Notes Over 2.1 Function {- 3, - 1, 1, 2 } { 0, 2, 5 }
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
Function Rules and Tables.
*Copy & paste this into “notes”*
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
Functions Teacher Twins©2014.
2.1: Represent Relations and Functions HW: p.76 (4-20 even, all)
Functions Teacher Twins©2014.
RELATIONS & FUNCTIONS CHAPTER 4.
Relation (a set of ordered pairs)
Graph the function and it’s inverse On the same graph f(x) = 2x + 10
Presentation transcript:

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”, unsolvable We will focus our study on decision problems –function (one correct answer for every input) –finite range (yes or no is the correct output)

2 Classification Process Take some set of problems and partition it into two or more subsets of problems where membership in a subset is based on some shared problem characteristic Set of Problems Subset 1Subset 2Subset 3

3 Classify by Solvability Criteria used is whether or not the problem is solvable –that is, does there exist a C++ program which solves the problem? Set of All Problems Solvable ProblemsUnsolvable Problems

4 Function Problems We will focus on problems where the mapping from input to output is a function Set of All Problems Non-Function ProblemsFunction Problems

5 General (Relation) Problem the mapping is a relation –that is, more than one output is possible for a given input Inputs Outputs

6 Criteria for Function Problems mapping is a function –unique output for each input Inputs Outputs

7 Example Non-Function Problem Divisor Problem –Input: Positive integer n –Output: A positive integral divisor of n Inputs Outputs

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

9 Another Example * Maximum divisor problem –Input: Positive integer n –Output: size of maximum divisor of n smaller than n Inputs Outputs

10 Decision Problems We will focus on function problems where the correct answer is always yes or no Set of Function Problems Non-Decision ProblemsDecision Problems

11 Criteria for Decision Problems Output is yes or no –range = {Yes, No} Note, problem must be a function problem –only one of Yes/No is correct Inputs Outputs Yes No

12 Example Decision sorting –Input: list of integers –Yes/No question: Is the list in nondecreasing order? Inputs Outputs Yes No (1,3,2,4) (1,2,3,4)

13 Another Example Decision multiplication –Input: Three integers x, y, z –Yes/No question: Is xy = z? Inputs Outputs Yes No (3,5,14) (3,5,15)

14 A Third Example * Decision Divisor Problem –Input: Two integers x and y –Yes/No question: Is y a divisor of x? Inputs Outputs Yes No (14,5) (14,7)

15 Focus on Decision Problems Set of All Problems Solvable ProblemsUnsolvable Problems Decision Problems Other Probs When studying solvability, we are going to focus specifically on decision problems –There is no loss of generality, but we will not explore that here

16 Finite Domain Problems These problems have only a finite number of inputs Set of All Problems Finite Domain ProblemsInfinite Domain Problems

17 Lack of Generality Set of All Problems Solvable ProblemsUnsolvable Problems All finite domain problems can be solved using “table lookup” idea Finite Domain Infinite Domain Empty

18 Table Lookup Program int main(string x) { switch x { case “Bill”: return(3); case “Judy”: return(25); case “Tom”: return(30); default: cerr << “Illegal input\n”; }

19 Key Concepts Classification Theme Decision Problems –Important subset of problems –We can focus our attention on decision problems without loss of generality –Same is not true for finite domain problems Table lookup