COMP 170 Introduction to Logic & Quantiers Tutorial
Problem 1
Problem 1
Show that the statements s t and s t are equivalent.
Problem 1
Show that the statements s t and s t are equivalent. Give the truth table for s t and st, and compare them.
Problem 1
Sh
Illustration of the Proof of Lemma 5.9
Version 2.1: Last updated, Nov 24, 2007
The Expectation of Random Variable X is dened as
k
E (X ) =
i=1
xi P (X = xi ).
In class, we proved the equivalence of the following alternative method of calculating E (X ) Le
COMP170 Discrete Mathematical Tools for Computer Science Random Variables
Version 2.0: Last updated, May 13, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.4, pp. 249-262
1
Slides c 2005 by M. J. Golin and G. Tripp
COMP170 Discrete Mathematical Tools for Computer Science Random Variables
Version 2.0: Last updated, May 13, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.4, pp. 249-262
1-1
Slides c 2005 by M. J. Golin and G. Tri
COMP170 Discrete Mathematical Tools for Computer Science
More on time until rst success
Version 2.0: Last updated, May 13, 2007
1
Example 1
Throw a fair die until you see a 1. Then throw it until you see a 2. Continue until you see all of 3, 4, 5, 6, in t
COMP170 Discrete Mathematical Tools for Computer Science
More on time until rst success
Version 2.0: Last updated, May 13, 2007
1-1
Example 1
2-1
Example 1
Throw a fair die until you see a 1.
2-2
Example 1
Throw a fair die until you see a 1. Then throw it
COMP170 Discrete Mathematical Tools for Computer Science Independence
Version 2.0: Last updated, May 13, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.3, pp. 236-247
1
Slides c 2005 by M. J. Golin and G. Trippen
C
COMP170 Discrete Mathematical Tools for Computer Science Independence
Version 2.0: Last updated, May 13, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.3, pp. 236-247
1-1
Slides c 2005 by M. J. Golin and G. Trippen
This small handout is a worked example to help clarify the dierence between Sample spaces and Probability distributions on the sample spaces
1-1
This small handout is a worked example to help clarify the dierence between Sample spaces and Probability dist
COMP170 Discrete Mathematical Tools for Computer Science Inclusion-Exclusion
Version 2.0: Last updated, May 13th, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.2, pp. 224-233
1
Slides c 2005 by M. J. Golin and G.
COMP170 Discrete Mathematical Tools for Computer Science Inclusion-Exclusion
Version 2.0: Last updated, May 13th, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.2, pp. 224-233
1-1
Slides c 2005 by M. J. Golin and G
COMP170 Discrete Mathematical Tools for Computer Science Intro to Probability
Version 2.0: Last updated, May 13, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.1, pp. 213-221
1
Slides c 2005 by M. J. Golin and G. T
COMP170 Discrete Mathematical Tools for Computer Science Intro to Probability
Version 2.0: Last updated, May 13, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.1, pp. 213-221
1-1
Slides c 2005 by M. J. Golin and G.
The Birthday Paradox
Suppose 25 people are in a room. What is the probability that at least two of them share a birthday? Less than 1/2? Actually its greater than 1/2. We will see the analysis of the problem of calculating the probability of event: An : T
The Birthday Paradox
1-1
The Birthday Paradox
Suppose 25 people are in a room. What is the probability that at least two of them share a birthday?
1-2
The Birthday Paradox
Suppose 25 people are in a room. What is the probability that at least two of them
COMP170 Discrete Mathematical Tools for Computer Science Advanced Induction
Version 2.0: Last updated, May 13, 2007
Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 4.5, pp. 189-193
1
Slides c 2005 by M. J. Golin and G. Tri
Illustration of the Proof of Lemma 5.9
Version 2.1: Last updated, Nov 24, 2007
The Expectation of Random Variable X is dened as
k
E (X ) =
i=1
xi P (X = xi ).
In class, we proved the equivalence of the following alternative method of calculating E (X ) Le
Illustration of the Proof of Lemma 5.28
Version 2.1: Last updated, Nov 24, 2007
In class, we proved that the expectation of the product of two independent random variables, is the product of their expectations. Formally
In class, we proved that the expect
Illustration of the Proof of Lemma 5.28
Version 2.1: Last updated, Nov 24, 2007
In class, we proved that the expectation of the product of two independent random variables, is the product of their expectations. Formally Lemma 5.28 If X and Y are independe
COMP 170 Spring 2010 Tutorial 5
Version 1.1 Version of March 15, 2010
Review of the Chinese Remainder Theorem RSA & The Chinese Remainder Theorem
Theorem 2.24 (Chinese Remainder Theorem) If m and n are relatively prime integers, then the equations x mod
COMP170 Tutorial 4
Cartesian Coordinate Path Problem Proof of Distributive Laws
1-1
Cartesian Coordinate Path Problem
In a Cartesian coordinate system, how many paths are there from the origin to the point with integer coordinates (m, n) if the paths are
COMP170 Tutorial 3
Pairing People Up Avoiding Double Counting Other Problems
1-1
The Tennis Club Problem
A tennis club has 2n members. We want to pair up the members (by twos) to play singles matches.
2-1
The Tennis Club Problem
A tennis club has 2n membe
COMP170 Tutorial 2
Combinatorial proofs VS Algebraic ones Relationship between one-to-one, onto, and inverse functions
1-1
The problem
Consider the identity: n 2 n2 4 = n 4 n4 2
2-1
The problem
Consider the identity: n 2 Example: 10 2 8 4 n2 4 = n 4 n4 2
COMP 170 Tutorial Intro to Probability
Last updated: May 2, 2010
Problem 1
What is the probability that a hand of 5 cards chosen from an ordinary deck of 52 cards, will consist of cards of the same suit?
Problem 1
What is the probability that a hand of 5
More on O() and () Notation
Last updated April 27, 2010
1-1
We have seen the formal denitions of (a) f (n) = O(g (n) Informally f (n) = O(g (n) means that f (n) grows no faster than g (n) and f (n) = (g (n) means that f (n) grows like g (n). and (b) f (n)
More Advanced Induction Examples
Last updated April 27, 2010
1-1
The problems on the following page are taken from the COMP170 Final Exam, Fall 2007.
2-1
Assume that n is a nonnegative power of 3. If f (n) and g (n) are functions, to prove that f (n) = O(
COMP 170 Fall 2008 Midterm 2 Solution
Q1. Bob is constructing an RSA key-pair. He rst chooses p = 11, q = 19 and sets n = 11 19 = 209. He then constructs his public key e and private key d and publishes the (n, e) pair.
(a) Bobs private key is d = 7. What
COMP 170 Fall 2007 Midterm 2 Solution
Q1. Recall the RSA public key cryptography scheme. Bob posts a public key P = (n, e) and keeps a secret key S = (n, d). When Alice wants to send a message 0 < M < n to Bob, she calculates M = M e mod n and sends M to
COMP170 Fall 2008 Midterm 1 Review
1-1
Question 1
8 men and 8 women are invited to a party at which they are seated at a long rectangular table
a) How many dierent ways are there to seat the n guests at n seats?
2-1
Question 1
8 men and 8 women are invite