precept1sol

# precept1sol - Computer Science 340 Reasoning about...

• Homework Help
• PresidentHackerCaribou10582
• 2
• 100% (2) 2 out of 2 people found this document helpful

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

Computer Science 340 Reasoning about Computation Precept 1 Problem 1 Discuss the unstacking game from the Lehman Leighton notes, Section 3.3. Problem 2 Show that if you pick a subset S of size 501 from the set { 1 , 2 , . . . , 1000 } then there must exist two numbers a, b S such that a divides b . Solution: First observe that any positive integer x can be written as 2 α y where α 0 and y is odd. Here y is the largest odd divisor of x . Let’s group the numbers in S according to their largest odd divisors. Since the range of values for them is the set of odd numbers in [1 .. 1000], there are only 500 different possibilities. Thus, by pigeonhole principle, two numbers x x in S would have the same largest odd divisor y ; i.e., x = 2 α y and x = 2 α y . Diving x by x , we get 2 α α which is an integer. Problem 3 Discuss the number rearrangement puzzle from Lehman Leighton, Section 3.2. Problem 4 (Stirling’s Approximation) Prove the following inequality: e parenleftBig n e parenrightBig n n ! en

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

This is the end of the preview. Sign up to access the rest of the document.
• Fall '07
• CharikarandChazelle
• Negative and non-negative numbers, Prime number, Divisor, Lehman Leighton

{[ 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