# hw1 - Computer Science 340 Reasoning about Computation...

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

This preview shows page 1. Sign up to view the full content.

Computer Science 340 Reasoning about Computation Homework 1 Due at the beginning of class on Wed, September 26, 2007 Problem 1 Prove that if x ≥ - 1, then for any integer n 0, (1 + x ) n > nx . Problem 2 Show that at a party of n people, there are two people who have the same number of friends in the party. (Friendship is symmetric) Problem 3 There are two children sitting on a (very long) bench. The child on the left is a boy, the child on the right is a girl. Every minute, either two children arrive and sit down next to each other on the bench (possibly squeezing between two children who are already sitting), or two children who had been sitting next to each other get up off the bench and leave. Furthermore, the arriving and departing pairs of children are always of the same sex (i.e., either both boys or both girls). Is it possible, after some amount of time, that there will be only two children remaining on the bench with a girl on the left and a boy on the right? Hint: Try to find an
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: invariant , i.e., a property of the boy-girl ordering of the children that does not change with time. Problem 4 Arrange the following functions in increasing order of growth rate, so that for two con-secutive functions f ( n ) , g ( n ) in your sequence, either f ( n ) = o ( g ( n )) or f ( n ) = Θ( g ( n )) . Explain the relationships of all adjacent pairs of functions in your order. Assume here that log is a logarithm to base 2 and ln is a logarithm to base e . n ! , log n, log( n 2 ) , n 5 , ln n, ± n 10 ² , 2 log n , 2 ln n , (log n ) n , n (log n ) . Note: We discussed big-Oh notation O ( .. ) in class. This problem requires you to know two other commonly used symbols in comparing the relative growth rate of functions. Here are their deﬁnitions: We say that f ( n ) = o ( g ( n )) if lim n →∞ f ( n ) g ( n ) = 0. We say that f ( n ) = Θ( g ( n )) if f ( n ) = O ( g ( n )) and g ( n ) = O ( f ( n ))....
View Full Document

• Fall '07
• CharikarandChazelle
• Natural logarithm, Binary logarithm, relative growth rate, commonly used symbols

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