Spring 2011
CMSC 198I: Homework 1
Khuller
Due at the start of class Mon, Feb 13, 2012.
Problem 1. Run the stable marriage algorithm on the following instance to create a stable
marriage. Show all your steps.
Instance: There are 4 men, m1 , m2 , m3 , m4 an

Spring 2012
CMSC 198I: Homework 2
Khuller
Due in class on Monday Feb 20, 2012.
Problem 1. Find the GCD of 391 and 68 using Euclids GCD algorithm. Show all your
steps.
Problem 2. What is the maximum number of edges in a simple graph of 7 vertices? A
simple

Spring 2012
CMSC 198I: Homework 3
Khuller
Due in class on Monday Feb 27, 2012.
Problem 1. Compute the square root of your birth date using the algorithm covered in
class, upto 3 decimal places. For example, if your birthday is on the 17th of January,
comp

Spring 2012
CMSC 198I: Homework 4
Khuller
Due at the start of class Wed, Mar 14, 2012.
Problem 1. What is the relationship of ROT13 with Caesars cipher?
Problem 2. The algorithm for encrypting data we studied today uses a secret keyword
where we used each

Spring 2012
CMSC 198I: Homework 5
Khuller
Due at the start of class, Apr 2, 2012.
Problem 1. Write a Ruby program to print out the following pattern (the pattern shown
is when the input is 5). Provide a screen shot listing your code and output.
You need t

Spring 2012
CMSC 198I: Homework 6
Khuller
Due at the start of class, Apr 9, 2012.
Problem 1. Prove using induction that for all N 1, the following holds:
N
i2 =
i=1
N (N + 1)(2N + 1)
6
Problem 2. Give a 3 coloring of the following graph. Use letters R, G

Spring 2012
CMSC 198I: Homework 7
Khuller
This is an unusual homework. You will work with your team (4 in each team) to do
some research and then each pair will give a 5 min presentation on their viewpoint (taking
10 minutes total for each project) leavin

On the Science Behind Computing (Part I)
Samir Khuller
1 Mathematical Induction
Induction is a rather elegant way of proving a lot of mathematical theorems, and in addition, it
is a key ingredient to establishing the correctness of many algorithms so its

On the Science Behind Computing (Part I)
Samir Khuller
1 More on Mathematical Induction
Let us consider two simple examples. Consider the following summation. (If you write out the
sum of the rst N cubes, then you can see that they are all perfect square,