Discrete Mathematics I
(
(
(
(1
MATH/CSCI 2112 Assignment 5 Solutions Due: (
Wed
Mar Fri 3 Mar 2017
(1) (a) Write the converse of: If x and y are odd, then xy is even. Is the statement
that you wrote down T or F? Prove your answer.
ANSWER:
Converse: If x
CSCI 1101
Computer Science II
PRACTICE SET FOR TEST NO.1
SOLUTIONS
1 . For each of the following questions, select the most appropriate answer.
1. A class in java is like
a. a variable
b. an object
c. an instantiation of an object
d. a blueprint for creat
Lecture Summary: 16/01/17 MATH/CSCI 2112 Winter 2017
Covered in Class:
Recap Necessary & sufficient conditions: Examples
Ex 1. If f is differentiable at a then f is continuous at a. p q.
In this case, p : f is differentiable at a is a sufficient condition
Discrete Mathematics I MATH/CSCI 2112 Lecture 30/01n 01/02
Counting 3: Combinations continued and the Pigeon-hole principle
Combinations: Number of ways to choose a subset of r objects out of a set of n
objects without repetition (0 r n) is:
n
n!
n
=
Discrete Mathematics I MATH/CSCI 2112 Lecture 23-25/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_,
THE IMPLICATIONS OF IMPLICATIONS
MATH/CSCI2112
03 Lec 13/01
To review why an implication (p q) is true when both
the antecedent/premise (p) and the consequent/conclusion (q) are false:
Consider: If this card is a Heart then it is a Queen. Under what circu
Lecture Summary: 20/01/17 MATH/CSCI 2112 Winter 2017
Quantifiers
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 prim
Discrete Mathematics I MATH/CSCI 2112 Lecture 30/01n 01/02
Counting 3: Combinations continued and the Pigeon-hole principle
Combinations: Number of ways to choose a subset of r objects out of a set of n
objects without repetition (0 r n) is:
n
n!
n
=
MATH/CSCI 2112 Test 1 Review problems.
Here are some problems that cover the range of material covered.
The list below assumes that you have worked on the in class problems AND looked at assignment solutions.
This list is meant as a guide only.
` cfw_ in
Discrete Mathematics I
MATH/CSCI 2112 Assignment 8 Due 8 April 2016
(1) ('3) Obtain and prove the rule for divisibility by 3 (ii) Obtain and prove the
rule for divisibility by 9
ANSWER:
Let n I (dkdk_1 ' ' ' Gilda) Z (ilk X 10k + dk_1 X 10k'1 + dk_2 X 10"
(1)
(2)
Discrete Mathematics I MATH/CSCI 2112 Winter 2016
Assignment 7 Due Wed 30 March 2016
In the lecture notes (29/02 - 2 f 03 Proofs: Number Theory 2), we obtained a rule for
an integer to be divisible by 11. However, the rule was obtained by the obse
Discrete Mathematics I
MATH/CSCI 2112 Assignment 5 Due: Mon 7 March 2016 (hard deadline)
(1) (a)
(b)
(2) (a)
(b)
In the previous assignment, you showed: (12 even => (1 even.
Use the result to show (13 even => (1 even.
ANSWER:
cfw_13 even .e.cfw_a2 -a) eve
Discrete Mathematics I MATH/CSCI 2112 Winter 2016
Assignment 6 Due Fri 18 March 2016
(1) a, b, (1,? E Z 3 a = bq+ 'r'. Prove or disprove the following: cfw_1' gcd(a, q) = gcd(q, 1')
(ii) scdmm) | 0 (iii) sedan 5) = gcd(a,q) (iv) gcdm, 'r) | q
ANSWER: (2')
Class notes, Jan 16 and 18. Chapter 4 in Principles and Techniques in Combinatorics.
Inclusion/exclusion
Problem: How many permutations of all letters of the alphabet contain the word
CAT? How many contain the word CAT or the word DOG? How many contain th
MATH/CSCI 2113: Solutions to Assignment 4
1. [2] Read the three mini projects on Counting binary words (3a, 3b and 3c, on
Brightspace).
(a) [0] Which of the three most clearly explains the topic? Briefly motivate your
answer.
(b) [2] Consult document 3b.
Class notes, Jan 2330.
Section 1.6 in Principles and Techniques in Combinatorics, Wiki page on
Pr
ufer sequences, Wiki page on Tree traversals.
Relations, Functions and Bijective proofs
Relations
The Carthesian product of sets A and B is the set
A B = cfw
MATH/CSCI 2113 Assignment 1 Solutions
1. Consider the Enigma machine, as seen in class. (a) In a later edition, a fourth rotor was
added. In the new machine, there were four rotors, chosen out of seven. How did this
impact the number of possible settings?
MATH/CSCI 2113: Solutions to Assignment 3
1. [2] Read the two mini projects on Combinations without consecutive integers (1a
and 1b, on Brightspace).
(a) [0] Which of the two most clearly explains the topic? Briefly motivate your answer.
(b) [2] In the pr
MATH/CSCI 2113 Assignment 2 Solutions
1. Solution:
This is equivalent to finding the smallest n N such that 1404 2n (Since there are
2n binary words of length n). Notice that 210 = 1024 < 1404 < 211 = 2048. So n = 11.
(This value can also be found simply
Discrete Mathematics I
MATH/CSCI 2112 Assignment 3 Solutions 1 Feb 2017
(1) The digits 0, . . . , 5 are to be used to make 4-digit numbers. Explain and find
how many such numbers can be made if:
(a) . . . repetition is allowed?
ANSWER:
The leftmost positi
Discrete Mathematics I
MATH/CSCI 2112 Assignment 2
Due: 27 Jan 2017/Start of Class
(1) (a) Show, s (q r) (s q) r using the definition of implication and
Boolean algebra.
ANSWER:
s (q r) ( s ( q r) ( s q) r (s q) r
(s q) r
(For practice, name each of the
Discrete Mathematics I
MATH/CSCI 2112 Assignment 1 Due in class, 20 Jan 2017
(1) (a) Write negations of each of the following:
(i) Roses are red and violets are blue.
ANSWER:
(Using de Morgans) Roses are not red or violets are not blue.
(ii) The bus is la
Discrete Mathematics I MATH/CSCI 2112 Lec 2 & 4 Nov Induction I
Inductive thinking - two puzzles to start:
100 dumb (i.e. mute) logicians meet in a forest clearining at each toll of the
bell. They each wear either a B hat or a G hat. They see everyone el
Discrete Mathematics I MATH/CSCI 2112 Lec 16/18 11 Mathematical
Induction II
In Liber abaci, the author, Leonardo of Pisa (1175 - 1250) (better known as Fibonacci) poses a problem:
A pair of rabbits is placed in a walled enclosure to find out how many off
Discrete Mathematics I MATH/CSCI 2112 Fall 2016
Assignment 6 Due Wed 16 Nov 2016
(1) Consider the proposition P (n) = n2 + 5n + 1 even00
(Note: For this problem, please answer (a) before attempting (b) etc)
(a) Prove that P (k) P (k + 1), k N
(b) For whic
Discrete Mathematics I MATH/CSCI 2112 Fall 2016
Assignment 7 Due: 23 Nov 2016
(1) (a) The government of Elbonia has decided to issue currency only in 5 @ and 9 @ denominations. Show that there is largest @ value that Elbonians cannot pay with this
denomin
Discrete Mathematics I MATH/CSCI 2112 Fall 2016
Assignment 5
Due: 28 Oct, in class.
(1) (a) Negate a Z a > 2 (a - b a - (b + 1).
(b) Prove a Z a > 2 (a - b a - (b + 1) Hint: see (a)
(2) (a) Prove that
if p is not divisible by 5 then p2 is not divisible b
Discrete Mathematics I MATH/CSCI 2112 Fall 2014
Solutions to Assignment 5 Due Fri 31 Oct 2014 - no extensions
(1) Let a, b Z+ . Define 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 Solutions to Practice Problems 2 Feb 2016
Counting Examples:
(1) How many distinct 5-digit numbers, between 20000 and 50000, can be formed using
the digits 1, 2, 3, 4, 5, 6 such that no digits repeat. (Hint: For this
Discrete Mathematics I
MATH/CSCI 2112 Assignment 5 Due: Mon 7 March 2016 (hard deadline)
(1) (a) In the previous assignment, you showed: a2 even a even.
Use the result to show a3 even a even.
ANSWER:
a3 even i .e.(a2 a) even
(a2 even a even) But we know,