Question: 1. Prove that one can make change for any integer amount n>3 using only 2-dollar and 5-dollar bills. 2. a. Convert 12345 in base 6

 1. Prove that one can make change for any integer amount

1. Prove that one can make change for any integer amount n>3 using only 2-dollar and 5-dollar bills. 2. a. Convert 12345 in base 6 to base 3 . b. Find the greatest common divisor of x=430 and y=190 and express it as a linear combination of x,y. 3. Is f(x)=1/x on the reals invertible? 4. Describe an efficient algorithm to find if there is an integer in an array A[1,n] of integers such that the number of times it appears in A is equal to its value. What is the big-O complexity of your algorithm? Would you use the same algorithm if all integers in the array are in the range 1-100? Why? 5. A natural number is an Ulam number if it is 1 or 2 or it can be uniquely written as a sum of two different smaller Ulam numbers. For example: 3 is an Ulam number (3=1+2);4 is an Ulaim number (4=1+3;2+2 is not llowed ); but 5=1+4=2+3 is not an Ulam number. Show that the set of Ulam numbers is infinite. 6. Consider three sets A,B,C. Prove or disprove that (AB)C=A(BC). 7. Show that for any integer n there are n consecutive composite integers. 8. What is the most appropriate "big-O" expression for the complexity of the following loop (justify your answer): for I:=1 to n2 do for J:=1 to n do k:=j while k>0 do k:=k/2 end; end; end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!