CSCI 3104 - Algorithms - Fall 2010

Problem Set #2

Due: 3pm, Sep 13th, 2010



1. Suppose you wanted to determine if a decimal number is divisible by 99. Give a quick method for doing this. (Hint: convert the number to base-100 by grouping pairs of digits together, then use the same approach we used for testing for divisibility by 3.) Justify your answer.

2. Text problem 1.12. Use only paper. Show your work.

3. Text problem 1.13. Use only paper. Show your work.

4. One of the largest natural integer constants we know of is M=808017424794512875886459904961710757005754368000000000. This is the size of an object of mathematics that is just there (humans didn't invent it).
Just for fun, compute MM mod (M-1). Use a computer for this one; include source code with your solution.

5. Text problem 1.18. Show your work.