Describe an algorithm that determines whether a function

Chapter 2, Problem 23E

(choose chapter or problem)

Get Unlimited 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.

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.

Add to cart


Study Tools You Might Need

Not The Solution You Need? Search for Your Answer Here:

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back