Discrete Structures
Sept 26 2011
Assignment 5:
Due at beginning of class Monday, Oct 3rd
Prof. Hopcroft
*******Note: this homework is subject to the style guide on the website.
Points will be
deducted for homeworks not following the guidelines.********
*******Please print out and staple the grade sheet to the back of your homework!******
**********Remember Midterm this Friday!
We consider this homework to be a good
review.**********
1. Describe a method to store a set whose elements can be any 20digit integer. Describe how someone
using your solution can check whether or not a new element is in the set in constant time (see definitions
on course website for explanation of constant time).
Hint: your solution will need to deal with the
possibility of collisions.
2. I wish to calculate
mod 9 for very large numbers (e.g. 4756213912
mod 9). Prove that I can get the
correct answer by adding the digits of the large number and taking the result mod 9. That is to say,
if I write a number as 75 =
d
1
d
2
, where
d
1
= 7 and
d
2
= 5 then, 75
≡
12
mod 9
≡
3
mod 9 . In
general:
d
1
, d
2
. . . d
n
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 '07
 SELMAN
 Characteristic polynomial, Names of large numbers, Rational number, Recurrence relation

Click to edit the document details