Solution Found!
Describe an algorithm that determines whether a function
Chapter 2, Problem 23E(choose chapter or problem)
QUESTION:
Problem 23E
Describe an algorithm that determines whether a function from a finite set of integers to another finite set of integers is onto.
Questions & Answers
QUESTION:
Problem 23E
Describe an algorithm that determines whether a function from a finite set of integers to another finite set of integers is onto.
ANSWER:
Solution
Step 1:
Consider the two sets and , and .Then keep a count for each element in ,setting count to zero.For each compute and add one to count.If any b has count of 0 then it is not onto otherwise it is onto.