Due Date: Monday Feb. 1
- Problem 1.0 (See back of text, page 393)
- Find the g.c.d. of a=377, b=610. Write down all iterations and count
their number. What is the worst case for the Euclideau Algorithm
(when will a and b require a maximal number of iterations)?
- Provide an algorithm for finding the median of 5 numbers. Try to
minimize the number of comparisions required by your algorithm.
Explain your ansers.
- How many comparisions are required by your algorithm in the worst
- Is it necessary to sort the 5 numbers in order to find the median?
- If only 3 numbers are given, is it necessary to sort them in order
to find their median?