CISC 320 Algorithms and Advanced Programming, Spring 2001

Homework set #4

Assigned: May 3, 2001
Due date: May 15, 2001

Note: This assignment is worth 8% of the course grade. It is due in class on May 15, Late submissions will not be accepted since sketches of the solutions will be handed out. This homework consists of 4 exercises.

  1. (2%) Exercise 9.15.
    See page 427 for the definitions of the two kinds of transitive closure. Interpret "Show that ... one matrix multiplication ..." to mean

  2. (2%)
    Illustrate that the n'th fibonacci number can be computed using O(lg(n)) arithmetic operations (ambition, distraction, uglification, and derision). Do so by computing A32 using 5 matrix squarings, where A is the matrix of exercise 12.17. Apply the result to the vector of initial values (fib(1), fib(2))t. Which two fibonacci numbers do you then get?

    The numbers get big. For this exercise it is sufficient to compute the units digit only of the numbers. Note that you can find the units digit of computed values such as a*b, a+b, a-b from knowing only the units digits of the inputs a and b.

  3. (2%) Exercise 13.49

  4. (2%) Exercise 13.50