CS 3343/3341 Spring 2004
Assignment 1
Due dates:
Midnight, 20 January 2004 for full credit,
Midnight, 22 January 2004 for part (75%) credit
  1. Carry out the first gcd algorithm (the one with the mod or % function in it) by hand using numbers 24140 and 16762.

  2. Carry out the third gcd algorithm (the one that uses the prime factorization of the numbers) by hand using numbers 14820 and 3978.

  3. Text, page 25, problem 5 of Exercises 1.3. (Find Hamiltonian Circuit.)

  4. Text, page 38, problem 4, parts a and b, of Exercises 1.4. (A "complete" graph has an edge connecting each pair of vertices.)

  5. Give a diagram representing the rooted tree in Figure 1.11 (b) as a binary tree.

  6. Consider the following "mystery" program that sorts the N numbers in array A (not using element A[0]): The purpose of this problem is to show a completely incomprehesible algorithm, even though it looks simple. How do you suppose it works?