hw1 - invariant i.e a property of the boy-girl ordering of...

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

View Full Document Right Arrow Icon
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
Image of page 1
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 definitions: 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern