Module 3 Worksheet In Class Questions

advertisement
Module 3 Worksheet
In Class Questions
1) (S9) Which of the following two problems is a function problem?
Problem 1
Problem 2
Input: Integer n
Input: Integers m and n
Output: An integer smaller than n
Output: Answer to “Is m < n?”
2) (S9) Convert the non-function problem above into a related function problem.
Input
Output
3) (S9) For the problem that is a function problem, what is the size of the set of outputs?
4) (S14) Convert the following function problem into a related decision problem using
the examples for multiplication and division as a guide.
Input: Integers x and y
Input:
Output: The sum of x and y (x+y)
Yes/No Question:
Take home review questions
1) What is the difference between a decision problem and a non-decision problem?
2) What is true about all problems that have only a finite domain (input set)?
3) Is the same thing true about all problems that have a finite range (output set)?
Download