Discrete Mathematics I
MATH/CSCI 2112 Assignment 2 Due 25 Sept 2015
(1) Prove that the following argument is valid (use the statement symbols shown,
in brackets, at the end). If Jose took the jewellery or Mrs. Krasov lied, then a
crime was committed. Mr.
Discrete Mathematics I MATH/CSCI 2112 Fall 2014
Solutions to Assignment 5 Due Fri 31 Oct 2014 - no extensions
(1) Let a, b Z+ . Dene L = cfw_sa + tb | s, t, Z be the set of all linear combinations of a, b. Let L+ = cfw_x L | x > 0 (i) Verify gcd(a, b) L+
Discrete Mathematics I
MATH/CSCI 2112 Assignment 7 Due 24 Nov 2014
(1) Show F3n is even.
ANSWER:
For n = 1 , F3 = 2 hence even
Assume for k > 2, F3k is even.
F3(k+1) = F3k+3 = F3k+2 + F3k+1 = (F3k + F3k+1 ) + F3k+1 = F3k + 2 F3k+1
The rst term is even by
Discrete Mathematics I
Assignment 2 / Solutions / / MATH/CSCI 2112 / / Due: 25 Sept 2015
(1) Prove that the following argument is valid (use the statement symbols shown,
in brackets, at the end). If Jose took the jewellery or Mrs. Krasov lied, then a
crim
CSci/Math2112
(9)
Assignment 2
Due May 29, 2015
1. Negate the following statements:
(a) If for the integers x, y, z we know that x divides y and y divides z, then x divides z.
Solution: There exist integers x, y, and z such that x divides y and y divides
Discrete Mathematics I MATH/CSCI 2112 Fall 2014
Assignment 6 Solutions Due Fri 14 Nov 2014
(1) In his book Liber Abaci (1202), Leonardo of Pisa wrote: A pair of rabbits is placed
in a walled enclosure to nd out how many ospring this pair will produce in t
Discrete Mathematics I MATH/CSCI 2112 Lec 22 Oct Induction 1
Inductive thinking: 100 dumb (i.e. mute) logicians meet in a forest clearning at each toll of the bell. They each wear either a B hat or a G hat. They
can see everyone elses hat but not their o
Boolean Functions and Logic
Propositions
Propositional Logic is a static discipline of statements which
lack semantic content.
E.G. p = S. Harper is the PM
q = The list of Canadian PMs includes
Harper.
r = Lions like to sleep.
All p and q are no more clos
Discrete Mathematics I MATH/CSCI 2112 Winter 2016
Assignment 6 Due Fri 18 March 2016
(1) a, b, q, r Z 3 a = bq + r. Prove or disprove the following: (i) gcd(a, q) = gcd(q, r)
(ii) gcd(q, r) | b (iii) gcd(b, r) = gcd(a, q) (iv) gcd(a, r) | q
(2) Consider t
Discrete Mathematics I
MATH/CSCI 2112 Assignment 3 Due 9 Oct 2015
Please give an explanation with each answer for full points
(1) A chess club has 2n members. They need to pair up the members for chess
matches.(i) In how many ways can they pair up all the
Discrete Mathematics I MATH/CSCI 2112 Winter 2016
Assignment 2 Due Wed 27 Jan 2016
(1) For each statement below, give its negation and then determine if the statement or
its negation is true.
(a) a, b R, ab = a b
ANSWER: False - this only holds up to
Discrete Mathematics I
MATH/CSCI 2112 Assignment 3 Due: Friday 12 Feb 2016
(1) Consider the set cfw_1, 2, . . . , 10, 11. How many numbers do you need to pick, in the
worst case, to get a pair that adds up to 11?
ANSWER:
No number can pair with 11 so it i
Discrete Mathematics I MATH/CSCI 2112 Lec 17 Oct NT/Proofs 3
Finding gcd(a, b): The above denitions of gcd(m, n) (not both 0), are not
ecient for computing the gcd, but rst a detour:
Thm The Division Algorithm:
For a, b N q, r Z; q, r unique
b = aq + r;
Discrete Mathematics I MATH/CSCI 2112 09 Lec 10 Oct Proofs/NT 2
Defn: Q indicates the set of all Rational numbers.
Defn: x Q p, q Z, (q = 0)
x = p/q
Defn: A ratio p/q is in its lowest form i there is NO integer d such that xd/yq = p/q.
Ex. Prove that the
MATH/CSCI 2112
Discrete Mathematics I
Notes 08 Sept
Fall 2014
Some denitions to get us on our way:
A SET is a collection of objects. x A means object x belongs to A.
There is a unique set without elements - the empty or null set
Y is a subset of X if ev
Discrete Mathematics I MATH/CSCI 2112
Number Theory and RSA
Suppose you want to send your credit card number M to me , over an insecure network.
There are ways to encrypt the number M (henceforth called the message), that anyone can
do, but only I (the ve
IMPLICATIONS OF IMPLICATIONS
p
0
0
1
1
Given p q has the truth table:
q pq
0
1
1
1
0
0
1
1
We write the BF for p q using DNF (Disjunctive Normal Form):
p q = ( p q) ( p q) (p q)
Notice that p is common in the rst two brackets, so using the distributive ru
Lecture Summary: 10/09/14 MATH/CSCI 2112 Fall 2014
Covered in Class:
Recap Necessary conditions, sucient conditions: Examples
Ex1. If f is dierentiable at a then f is continuous at a. p q.
In this case, p : f is dierentiable at a is a sucient condition to
Lecture Summary: 10/09/14 MATH/CSCI 2112 Fall 2014
Covered in Class:
Recap Necessary conditions, sucient conditions: Examples
Ex1. If f is dierentiable at a then f is continuous at a. p q.
In this case, p : f is dierentiable at a is a sucient condition to
Lecture Summary: 17/01/14 MATH/CSCI 2112 Fall 2014
Quantiers
A proposition that has variables into which we can substitute values is called a
predicate. The truth value of the predicate depends on the values substituted
Ex. Q(n) : n2 + n + 41 is prime. N
Discrete Mathematics I MATH/CSCI 2112
Lecture 24-26/09 Counting 2
One more PHP problem:
Ex. In a class of n students, show that there must be at least two students
with the same number of friends in the class (friendship is a reexive relationship).
So f
Discrete Mathematics I MATH/CSCI 2112
Lecture 19/09 Counting
Count of subsets
How many subsets of does a of n elements have?
S = cfw_s1 , s2 , . . . sn
n
0
1
2
Subsets
# subsets
cfw_
1 = 20
cfw_, cfw_s1
2 = 21
cfw_, cfw_s1 , cfw_s1 , s2 4 = 22
.
.
Th
Discrete Mathematics I MATH/CSCI 2112 Lecture 29/09 Counting 3
Combinations: The number of ways to choose a subset of r objects out of a set
of n objects without repetition (0 r n) is:
n
r
=
n!
r! (n r)!
(N ote : If 0 n r then
n
r
= 0)
The combination sym
Discrete Mathematics I MATH/CSCI 2112 Lecture 6, 8 Oct Proofs
and Number theory 1
Direct Proofs:
Ex 1 Try your hand at solving this: There is a black box with 60 B balls and
a white box with 60 W balls. You take 20 W balls and mix tem into the black
box.
Discrete Mathematics I MATH/CSCI 2112 Lecture 29/09 Counting 3
Combinations: The number of ways to choose a subset of r objects out of a set
of n objects without repetition (0 r n) is:
n
r
=
n!
r! (n r)!
(N ote : If 0 n r then
n
r
= 0)
The combination sym
Discrete Mathematics I
MATH/CSCI 2112 Assignment 1 Due 20 Jan 2016
(1) (a) Given the implication p q, show that its converse and inverse are logically
equivalent.
ANSWER:
Converse: q p
Inverse: p q
Recall that p q is equivalent to the boolean expression p
Discrete Mathematics I
MATH/CSCI 2112 Assignment 4 Due: Mon 29 Feb 2016
(1) There are 18,500 residents in the town of Frostbite Falls. More of the residents have
a birthdate of 5 May than any other day. What is the minimum number of residents
of Frostbite
CSci/Math2112
(20)
Assignment 6
Due July 3, 2015
1. For the following, if the statement is true, prove it. If the statement is false, disprove it.
(a) (BoP 9 #4) For every natural number n, the integer n2 + 17n + 17 is prime.
Solution: This statement is f
Discrete Mathematics I MATH/CSCI 2112 Winter 2015
Bonus Assignment 7 Due Fri 10 April 2015
(1) (a) Write an (efficient) recursive algorithm Pow (a,n) than computes
an , a R, n Z+ cfw_0. Prove your algorithm correct.
n
(b) Write a recursive algorithm that
Discrete Mathematics I
MATH/CSCI 2112 Assignment 2 Solutions Due: 28 Sept 2016
(1) Let G represent the set of all T.V. game shows. Let P be the set of people in your
neighbourhood. Let C(p, g) be the predicate that the person p appeared on game
show g and
Boolean Functions and Logic
Propositional Logic
Modern mathematics is built on three
foundational structures: Symbolic Logic,
Set Theory and the Axiomatic Method.
Formal logic is the basis for any reasoned activity
(criminal investigations, scientific exp
Discrete Mathematics I
MATH/CSCI 2112 Assignment 1 Solutions 21 Sept 2016
(1) Write negations of each of the following (hint: first write each symbolically):
(a) Roses are red, violets are blue.
ANSWER: (Using de Morgans) Roses are not red or violets are
23/09 INFERENCE - EXAMPLES
MATH/CSCI 2112 FALL 2016
Ex. 1 Given the premises: (i) I am a famous NBA player, (ii) NBA players make a lot of
money, (iii) If I make a lot of money, you should do what I say (iv) I say you should buy
P.M. shoes. Prove that the
Discrete Mathematics I MATH/CSCI 2112 Lecture 23-26/01
Counting Read Ch. 3 Sec 3.1 - 3.3 BoP
Count of subsets
How many subsets of does a set of n elements have?
S = cfw_s1 , s2 , . . . sn
n
0
1
2
Subsets
# subsets
cfw_
1 = 20
cfw_, cfw_s1
2 = 21
cfw_,