CS 320L Applied Discrete Mathematics Spring 2017
Instructor: Marc Pomplun
Assignment #3 Solutions
Question 1: On Pigeons and Pigeonholes
Professor P. has an odd habit: He only buys red, green, and blue books, and he keeps them
in completely unordered stac
CS 320L Applied Discrete Mathematics Spring 2017
Instructor: Marc Pomplun
Assignment #2 Sample Solutions
Question 1: Hilarious Numbers
Let us define that a positive integer greater than 1 is called hilarious if the sum of its unique
prime factors is a pri
CS 320L Applied Discrete Mathematics Spring 2017
Instructor: Marc Pomplun
Assignment #1 Sample Solutions
Question 1: Hair Splitting with Set Expressions
Let us define the successor of the set A to be the set A cfw_A. Find the successors of the
following s
CS 70
Discrete Mathematics and Probability Theory
Spring 2017
Rao
1
DIS 9b
Binomial Variance
Throw n balls into m bins uniformly at random. For a specific ball i, what is the variance of the
number of roommates it has (i.e. the number of other balls that
CS 320L Applied Discrete Mathematics Spring 2017
Instructor: Marc Pomplun
Assignment #4
Posted on April 6 due by April 13, 5:30pm
Question 1: Rolling Dice
Let X be the random variable that is defined as the greater of the two numbers that appear
when a pa
CS 70
Spring 2017
1
Discrete Mathematics and Probability Theory
Rao
DIS 10a
Deriving Chebyshevs Inequality
Recall Markovs Inequality, which applies for non-negative X and > 0:
Pr[X ]
E[X]
Use an appropriate substitution for X and to derive Chebyshevs Ine
CS 70
Discrete Mathematics and Probability Theory
Spring 2017
Rao
1
DIS 11b
Uniform Probability Space
Let = cfw_1, 2, 3, 4, 5, 6 be a uniform probability space. Let also X() and Y (), for , be
the random variables defined in the table:
Table 1: All the ro
CS 320L Applied Discrete Mathematics Spring 2017
Instructor: Marc Pomplun
Assignment #1
Posted on February 7 Due by February 14, 5:30pm
Question 1: Hair Splitting with Set Expressions
Let us define the successor of the set A to be the set A cfw_A. Find th
CS 320L Applied Discrete Mathematics Spring 2017
Instructor: Marc Pomplun
Assignment #3
Posted on March 8 due by March 21, 5:30pm
Question 1: On Pigeons and Pigeonholes
Professor P. has an odd habit: He only buys red, green, and blue books, and he keeps
t
CS 320L Applied Discrete Mathematics Spring 2017
Instructor: Marc Pomplun
Assignment #2
Posted on February 26 due by March 7, 5:30pm
Question 1: Hilarious Numbers
Let us define that a positive integer greater than 1 is called hilarious if the sum of its u
CS 70
Spring 2017
1
Discrete Mathematics and Probability Theory
Rao
DIS 11a
Correlation and Independence
(a) What does it mean for two random variables to be uncorrelated?
(b) What does it mean for two random variables to be independent?
(c) Are all uncor
CS 70
Discrete Mathematics and Probability Theory
Summer 2015 Chung-Wei Lin
Final
,
P RINT Your Name:
(last)
(first)
S IGN Your Name:
P RINT Your Student ID:
C IRCLE Your Exam Room:
2050 VLSB
10 EVANS
OTHER
Name of the person sitting to your left:
Name of
Exam 2 study material: CSE240
Name:
Exam 2 Extra Problems
Page 1
Exam 2 study material: CSE240
Name:
1. Prove or disprove that for any sets A and B it is the case that A B =
A B by giving a containment proof (that is, prove that the left side is a
subset
CS 70
Discrete Mathematics and Probability Theory
Midterm 2
Summer 2014 James Cook
Thursday July 31, 2014, 12:40pm-2:00pm.
Instructions:
Do not turn over this page until the proctor tells you to.
Dont write any answers on the backs of pages (we wont be
Exam 1: CSE240
Name:
Exam 1
Page 1
Exam 1: CSE240
Name:
1. Assume that the universe for x is all people and the universe for y is the set
of all movies. Write the English statement using the following predicates
and any needed quantifiers:
S(x, y) : x saw
Exam 1: CSE240
Name:
Exam 1
Page 1
Exam 1: CSE240
Name:
1. Write the negation of the statement in good English. Dont write It is
not true that . . . .
(a) Some bananas are yellow
(b) All integers ending in the digit 7 are odd.
(c) No tests are easy.
(d) R
Exam 3 study material: CSE240
Name:
Exam 3 Extra Problems
Page 1
Exam 3 study material: CSE240
Name:
1. Say that a word contains seven letters from the alphabet. How many
words begin with A or B?
Solution: 2 266
2. How many words begin with A or B and end
Exam 1: CSE240
Name:
Exam 1
Page 1
Exam 1: CSE240
Name:
1. Write the negation of the statement in good English. Dont write It is
not true that . . . .
(a) Some bananas are yellow
Solution: No bananas are yellow
(b) All integers ending in the digit 7 are o
Exam 3 study material: CSE240
Name:
Exam 3 Extra Problems
Page 1
Exam 3 study material: CSE240
Name:
1. Say that a word contains seven letters from the alphabet. How many
words begin with A or B?
2. How many words begin with A or B and end with A or B?
3.
Section 1.4
Predicates and Quantifiers
15
8. Note that part (b) and part (c) are not the sorts of things one would normally say.
a) If an animal is a rabbit, then that animal hops. (Alternatively, every rabbit hops.)
b) Every animal is a rabbit and hops.
CSE 240: Logic and Discrete Mathematics
Homework 8
Due: In class (or my mailbox) Thursday, 11-5-2015 11:30am
Make your solutions concise and formal. Your goal is to convince me that you know the solutions.
You are highly encouraged to typeset your solutio
CSE 240: Logic and Discrete Mathematics
Homework 9
Due: In class Thursday, 11-12-2015 11:30am
Make your solutions concise and formal. Your goal is to convince me that you know the solutions.
You are highly encouraged to typeset your solutions in Latex. Pl
74
Chapter 3
Algorithms
14. a) No, by an argument similar to Exercise 10.
b) Yes, since x3 x3 for all x (witnesses C = 1 , k = 0).
c) Yes, since x3 x2 + x3 for all x (witnesses C = 1, k = 0 ).
d) Yes, since x3 x2 + x4 for all x (witnesses C = 1 , k = 0 ).
236
Chapter 9
Relations
a computer to generate them all and check each one for transitivity. If we do this, then we find that 171 of
them are transitive. Doing this by hand is not pleasant, since there are many cases to consider.
50. a) Since R contains a
182
Chapter 7
Discrete Probability
Now let E = E1 E2 En and let F = En+1 , and apply Exercise 13. We obtain
p(E1 E2 En En+1 ) p(E1 E2 En ) + p(En+1 ) 1 .
Substituting from the inductive hypothesis we have
p(E1 E2 En En+1 ) p(E1 ) + p(E2 ) + + p(En ) (n 1)
140
Chapter 5
Induction and Recursion
52. In practice, this algorithm is coded dierently from what we show here, requiring more comparisons but being
more ecient because the data structures are simpler (and the sorting is done in place). We denote the lis
116
Chapter 5
Induction and Recursion
In order to prove this for all integers n 0, we first prove the basis step P (0) and then prove the inductive
step, that P (k) implies P (k + 1). Now in P (0) , the left-hand side has just one term, namely 2 , and the
CSE 240: Logic and Discrete Mathematics
Homework 7
Due: In class Thursday, 10-22-2015 11:30am
Make your solutions concise and formal. Your goal is to convince me that you know the solutions.
You are highly encouraged to typeset your solutions in Latex. Pl
Section 5.4
Recursive Algorithms
137
12. This is the inecient method.
procedure power (x, n, m : positive integers)
if n = 1 then! return x mod m "
else return x power (x, n 1, m) mod m
14. This is actually quite subtle. The recursive algorithm will need