Introduction to Algorithms
Week 1: Exercises

These are optional exercises for practicing the concepts we learned this week.

1. Powers of Two

What is the approximate value of

a) 214

b) 232

c) 88

2. Logarithms

What is the approximate value of

a) log2(8,000,000,000)

b) log16(16,000,000)

3. A Slow Connection

A notebook computer's disk holds 500 Gb of data. We would like to send the data across an extremely slow network that transfers only 1 byte/second. Approximately how long will the transfer take?

4. Squares Mod 4

Is this statement true or false?

For all n ∈ ℤ, n2 mod 4 < 2.

Prove your answer.

5. Bases

Calculate by hand:

6. Bases, Continued

Calculate by hand:

  1. What is 678 in base 10?

  2. What is 6710 in base 8?

  3. What is 237610 in base 100? In base 1000?