MATH/CSE 1019 Final Examination
Fall 2011
December 17, 2011
Instructor: S. Datta
1. (2 points) Evaluate the innite geometric series
9
9
9
+
+
+ .
10 100 1000
Note that the left hand side is 0.99 . . . Use the answer above to ll in the blank below
Solution

MATH/EECS 1019: Discrete Math for Computer Science
Fall 2014
Assignment 3 Solutions
Question 1
[2+2 points] Functions
1. Find g 1 (3) given g(x) =
3x+1
.
2x+g(x)
Solution: We have to nd the value of x such that g(x) = 3. So we can substitute
g(x) = 3 and

MATH/EECS 1019: Discrete Math for Computer Science
Fall 2014 Solutions
Question 1
[5 points] Prove that 8n3 +
n (n3 ).
Solution: First let us prove the () part. Since 8n3 + n > 8n3 for n 1, we can use
c = 8, n0 = 1 in the denition of ().
Next we prove the

Mathematical Induction
Very simple
Very powerful proof technique
Guess and verify strategy
9/29/2014
1
Basic steps
Hypothesis: P(n) is true for all positive
integers n
Base case/basis step (starting value)
Inductive step
Formally:
[ P(1) k (P(k) P(k

More proof exercises
If n+1 balls are distributed among n bins
prove that at least one bin has more
than 1 ball
1
Meaningful diagrams
Pythagoras
2
1
Meaningful diagrams - 2
Sum of an arithmetic series (from
http:/www.tonydunford.com/images/math-andgeom

MATH/CSE 1019 Third test
Fall 2011
Nov 21, 2011
Instructor: S. Datta
Name (LAST, FIRST):
Student number:
Instructions:
1. If you have not done so, put away all books, papers, cell phones and pagers. Write your name and student
number NOW!
2. Check that th

MATH/CSE 1019 Second test
Fall 2011
Oct 31, 2011
Instructor: S. Datta
Name (LAST, FIRST):
Student number:
Instructions:
1. If you have not done so, put away all books, papers, cell phones and pagers. Write your name and student
number NOW!
2. Check that t

Homework #1
MATH 1019N
Please answer the each of the following questions. Make sure to justify your answers. An answer (even a correct
one) without proper justification may not receive credit. You may work on these problems with others, but please
make su

CS 1050B: Constructing Proofs
Problem Set 2 : Induction and Recursion
Due Friday, Sept 22nd, after the class
Problem 1 : Rosen 4.1: 3, 4, 17
1. Let P (n) be the statement that 12 + 22 + + n2 =
n(n+1)(2n+1)
6
for the positive integer n.
a) Plugging in n =

Homework #2
MATH 1019N
Please answer the each of the following questions. Make sure to justify your answers. An answer (even a correct
one) without proper justification may not receive credit. You may work on these problems with others, but please
make su

MATH/EECS 1019: Discrete Math for Computer Science
Fall 2014
Assignment 1 (Released September 10 , 2014)
Submission deadline: 6:45 pm, Sept 22, 2014
Notes:
1. The assignment can be handwritten or typed. It MUST be legible.
2. You must do this assignment i

Solving Linear Recurrence
Relations
Niloufar Shafiei
Review
A recursive definition of a sequence specifies
Initial conditions
Recurrence relation
Example:
a0=0 and a1=3
Initial conditions
an = 2an-1 - an-2
Recurrence relation
an = 3n
Solution
1
Linear rec

MATH/EECS 1019 Second test (version 2)
Fall 2014
Solutions
Instructor: S. Datta
1. (6 points) Sets
(a) (1+2 points) Construct Venn diagrams for each of these combinations of the sets A, B, C.
(i) A (B C) (ii) A B
Solution:
(b) (3 points) Prove that there

Recursion
Today:
Ch 8.1 Applications of Recurrence
relations
Ch 8.2 Solving Recurrence relations
Ch 8.3 Divide and conquer algorithms
12/1/2014
1
Applications of Recurrence relations
The Tower of Hanoi puzzle:
Move all but the bottom disk to peg 2
Mo

MATH/EECS 1019 Third test (version 2) Fall 2014
Solutions
1. (3 points) If x is an integer and 7 divides 3x + 2, prove that 7 also divides 15x2 11x 14.
Solution:
This is a direct proof. One can factorize the given expression, 15x2 11x 14 = 5x(3x +
2) 7(3x

ProofTechniques
NiloufarShafiei
Definition
Mathematicalproof:
Aconvincingargumentexpressedin
mathematics
2
Conditionalstatement(review)
pimpliesq.
Ifp,thenq.
pq
hypothesisconclusion
3
Conditionalstatement
pq
p
T
T
F
F
q
T
F
T
F
pq
T
F
T
T
Howtoprovepimpli

Predicates and Quantifiers
Niloufar Shafiei
Review
Proposition:
1. It is a sentence that declares a fact.
2. It is either true or false, but not both.
Examples:
2 + 1 = 3.
True Proposition
Toronto is the capital of Canada.
False Proposition
x + 1 = 2.
Nei

Counting the number of elements
What is counting?
Labeling with integers
Correspondence with integers
11/4/2014
CSE 2001, Fall 2013
1
Cardinality
A set S has k elements if and only if there exists
a bijection between S and cfw_1,2,k.
S and cfw_1,k have

MATH/EECS 1019 Second test (version 1)
Fall 2014
Solutions
Instructor: S. Datta
1. (6 points) Sets
(a) (1+2 points) Construct Venn diagrams for each of these combinations of the sets A, B, C.
(i) A (B C) (ii) A B C
Solution:
(b) (3 points) Recall that the

Analysis of Algorithms
Measures of efficiency:
Running time
Space used
others
Efficiency as a function of input size (NOT value!)
Number of data elements (numbers, points)
Number of bits in an input number
e.g. Find the factors of a number n,
Determine i

Sets
Unordered collection of elements, e.g.,
Single digit integers
Nonnegative integers
faces of a die
sides of a coin
students enrolled in 1019N, W 2007.
Equality of sets
Note: Connection with data types
1
Describing sets
English description
Set bui

Divide-and-Conquer Algorithms
and Recurrence Relations
Niloufar Shafiei
Divide-and-conquer algorithms
Divide-and-conquer algorithms:
1. Dividing the problem into smaller sub-problems
2. Solving those sub-problems
3. Combining the solutions for those small

Recurrence Relations
Niloufar Shafiei
Review
A recursive definition of a sequence specifies
one or more initial terms
a rule for determining subsequent terms
from those that precede them.
Example:
a0=3
a1=5
an= an-1 - an-2
a2 = a1 - a0 = 5 - 3 = 2
1
Revie

Last Name:
First Name:
Student Number:
MATH/EECS 1019 (Fall 2016)
Test 1
Instructions:
The exam is 80 minutes long
You cannot use books, notes, cell phones or any other materials
Please write your answers next to the questions and not on a separate sheet