3 questions: All 3 questions must be answered for full points. 5. Define fi R R
ID: 3554120 • Letter: 3
Question
3 questions:
All 3 questions must be answered for full points. 5. Define fi R R by the rule fox) x for all real num- bers x. Find of)(x). 9. Show that the set of all nonnegative integers is countable by exhibiting a one-to-one correspondence between Z and nonneg For each of the algorithm segments in 6-19, assume that n is a positive integer. (a) Compute the actual number of additions, subtractions, multiplications, divisions, and comparisons that must be performed when the algorithm segment is executed. For simplicity, however, count only comparisons that occur within if then statements; ignore those implied by for-next loops. (b) Use the theorem on polynomial orders to find an order for the algorithm segment. 7. max a[1] for 2 to n if maxExplanation / Answer
5 ) f(x) =-x for all x in R
( f o f ) (x) = f ( f(x) ) = f (-x ) = -(-x) = x
6) Since Z+ is basically set of N U {0} (N : set of natural numbers )
Define : h : N --------> Z+ by
h(n) = n , for n in N
Clearly h is one-one because
h(n1) = h(n1) , for n1, n2 in N
=> n1 = n2
Also, N is countable => Z+ is countable
7 ) Total number of times comparison will be done is n-1 (as length is n)
Order is O(n).
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.