CSCE 235

Handout 25: Homework Problems on Complexity

Assigned April 30, 2003 

 

 

Due to time constraint, there will not be a homework assignment on the last topic: Complexity.  This handout shows some examples of what the homework problems would have been. 

 

1.   Show that .

     

      We need to find c and  such that

  for all .

      If we try , then we have

.

.

Thus, if we set  and , then we know that  for all .  Thus, we have shown that .

 

     

 

2.   Show that .

 

      We need to find c and  such that

  for all .

We know that .  So, now, we can try to show that  instead.  (So, we don’t have to worry about that +13 term.) 

.

, when  (for the equation to be defined)

Now, here’s the trick.  If , then , and thus .  We can then pick .  Thus if  and , then for all .  Thus, .

 

     

 

3.   Show that

      We need to find ,  and  such that

 

  for all .

 

Dividing by , we get

 

.

 

 holds for  and ;  holds for  and .  Thus, if , , and , then  for all .  Thus, we have shown that .

 

     

 

4.   In each case, find the smallest integer k such that  is .

      (a) 

      (b) 

      (c) 

      (d) 

 

      (a)  .  Given the observation that if  is  and  is , then

             is , we know that  is  where .  Note that 2 is the highest power.

      (b)  .  This is a little bit tricky and requires some experience to solve.  We know that  for .  Now, we also know that .  So, we know that !!!  We have found the highest power for the term.  Thus, is  where . 

      (c)  .  Now, this may look complicated.  But remember, divide and conquer!  We know that .  That is,  is a function of two functions:  and .  The highest power for the  is 3, and thus  is .  Now we need to find out about .  We know that  for .  Thus, .  So,  is .  Now, given the observation that if  is  and  is , then  is , we know that   is , where .

      (d)  .  This is a little bit tricky too.  The trick is this.  We know that ! So, .  Thus,  is  where .

 

     

 

5.   Show that n! is .

 

We know that .  Or,  .  Since , we know that .  So, .  And we know that .  Thus, we have shown that n! is .

 

     

 

Based on Prof. Chuck Cusack’s Notes and  (Ross and Wright 1988).