hw5 - Homework 5 Discrete Mathematics Q1 Exercise 2 p 229...

This preview shows pages 1–3. Sign up to view the full content.

Homework 5 Discrete Mathematics Q1. Exercise 2, p. 229 O(n 2 ) Q2. Exercise 16, p.230, a) For this exercise, you can use a calculator, but if the result is too large for the calculator, just express the result as a mathematical formula. log(n) = 8.64*10 15 too big to calculate Q3. Exercise 16, p.230, b) For this exercise, you can use a calculator, but if the result is too large for the calculator, just express the result as a mathematical formula. 1000n =8.64*10 15 n=8640000000000 Q4. Exercise 16, p.230, f) For this exercise, you can use a calculator, but if the result is too large for the calculator, just express the result as a mathematical formula. 2 n =8.64*10 15 Log 2 (8.64*10 15 )= n N=13.098295324461283 Q5. Exercise 40, p.231, a) The worst-case complexity of bubble sort is Θ(n 2 ) when size=n since 1/2n 2 -1/2n When the size is double from n to 2n, the number of comparison changes to: ½(2n) 2 -1/2(2n) = 2n 2 -n

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Q6. Using the definition of divisibility, prove the following: If a, b, and c are integers, where a ≠0, such that a | b and a | c, then a | mb + nc whenever m and n are integers.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern