ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 7 Generating functions, Number Theory, Cryptography
1. Compute by hand, the smallest positive integers x, y, u, v such that ax = bu =
by
av
gcd(a,b) for each pair a,
CS123
Spring 2010
Solution to Homework 4
Problem 1 (25 points)
Let (B, +, , , 0, 1) be a Boolean algebra. Dene the following operations and : x y = xy + x y ,
and x y = (x + y ) .
a) Prove that x y = (x + y )(x + y )
Solution:
(x + y )(x + y ) = xx + xy +
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 7 Generating functions, Number Theory, Cryptography
1. Compute by hand, the smallest positive integers x, y, u, v such that axby = buav =
gcd(a,b) for each pair a, b
ARSDIGITA UNIVERSITY
MONTH 2: DISCRETE MATHEMATICS
PROFESSOR SHAI SIMONSON
PROBLEM SET 5 SOLUTIONS COMBINATORICS AND COUNTING
(1) Given ten points in the plane with no three colinear,
(a) How many dierent segments joining two points are there?
10
2
= 45
(
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 5 Combinatorics and Counting
1. Given ten points in the plane with no three collinear,
a. How many different segments joining two points are there?
b. How many ways a
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 5 Combinatorics and Counting
1. Given ten points in the plane with no three collinear,
a. How many different segments joining two points are there?
b. How many ways a
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 4 Induction and Recurrence Equations
Thanks to Jerey Radclie and Joe Rizzo for many of the solutions.
Pasted together and modied by Dimitri Kountourogiannis
1. Whats
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 4 Induction and Recurrence Equations
1. Whats wrong with the following proofs by induction?
a. Every binary string contains identical symbols. The proof is by inducti
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 4 Induction and Recurrence Equations
1. Whats wrong with the following proofs by induction?
a. All binary strings are identical. The proof is by induction on the size
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 4 Induction and Recurrence Equations
1. Whats wrong with the following proofs by induction?
a. All binary strings are identical. The proof is by induction on the size
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 4 Induction and Recurrence Equations
1. Whats wrong with the following proofs by induction?
a. Every binary string contains identical symbols. The proof is by inducti
; Discrete math PS-3
;=
; Exercise 2
;=
; 4-peg Tower of Hanoi - toh4-sloppy
; if n is odd, the top-half gets an extra disk
(define (toh4-sloppy n from to using1 using2)
(let (top-half (ceiling (/ n 2)
(bottom-half (floor (/ n 2)
(cond (= n 1)
(display (l
; permutation
(define (p n r)
(define (helper product n r)
(if (< r 1)
product
(helper (* n product)
(dec n)
(dec r)
(helper 1 n r)
(define (c n r)
(define (helper p-product r-product n r)
(if (< r 1)
(/ p-product r-product)
(helper (* n p-product)
(* r r
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Problem Set 6 Combinatorics and Discrete Probability
1. Assume someone is throwing three dice of different colors.
a. How many ways are there to roll the dice?
b. Make a chart sh
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Final Examination 100 points
Show all work for partial credit. You may use three hours for this exam. After two
hours, raise your hand if you feel that the time constraint will b
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Final Examination 100 points
Show all work for partial credit. You may use three hours for this exam. After two
hours, raise your hand if you feel that the time constraint will b
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Examination 3 100 points
Show all work for partial credit. You may use two hours for this exam. After one hour,
raise your hand if you feel that the time constraint will be too t
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Examination 2 100 points
Show all work for partial credit. You may use two hours for this exam. After one
hour, raise your hand if you feel that the time constraint will be too t
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Examination 2 100 points
Show all work for partial credit. You may use two hours for this exam. After one
hour, raise your hand if you feel that the time constraint will be too t
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Examination 1 100 points
Show all work for partial credit. You may use two hours for this exam. After one
hour, raise your hand if you feel that the time constraint will be too t
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Examination 1 100 points
Show all work for partial credit. You may use two hours for this exam. After one
hour, raise your hand if you feel that the time constraint will be too t
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Lecture Notes
What is Discrete Math?
Example of continuous math Given a fixed surface area, what are the dimensions of a cylinder
that maximizes volume?
Example of Discrete Math
ArsDigita University
Month 2: Discrete Mathematics - Professor Shai Simonson
Lecture Notes
What is Discrete Math?
Example of continuous math Given a fixed surface area, what are the dimensions of a cylinder
that maximizes volume?
Example of Discrete Math
; Discrete Math PS-7
; Shyam Visweswaran
; Exercise 2
(define (extended-gcd a b)
(cond
(= b 0) (list a 1 0)
(else
(let (lst (extended-gcd b (remainder a b)
(list (car lst)
(caddr lst)
(- (cadr lst) (* (quotient a b) (caddr lst)
(extended-gcd 233987973 411