Problem Set 3
Problem Set 3
Problem Set #3
This Problem Set is due at 11:59 pm Pacific time on 2024-10-03, and will be submitted on Canvas.
This Problem Set is worth 6% of the final course grade. There are five problems.
Problems #1 and #2 and #3 are to be completed individually, while Problems #4 and #5 are to
be completed in your assigned small groups.
Please type (or neatly handwrite) your solutions on standard 8.5 × 11 (or A4) paper, with your name(s)
at the top of each solution. Ensure that you submit five separate PDF files on Canvas, one for each
problem. Make sure you label your Problem Set #1 submissions appropriately - e.g. timothy-1-1.pdf,
timothy-1-2.pdf, timothy-1-3.pdf, timothy-1-4.pdf, timothy-1-5.pdf.
Given that the last two problems are done in a group, your final two PDF files will be identical to
some of your classmates. (For example, timothy-4.pdf might be identical to yvonne1-4.pdf and bethany1-
4.pdf). This is completely fine, and enables you to have a record of all of your submitted work in this
course.
While a solution must be absolutely perfect to receive full marks, I will be generous in awarding partial
marks for incomplete solutions that demonstrate progress.
So that there is no ambiguity, there are two non-negotiable rules. A violation of either rule constitutes
plagiarism and will result in you receiving an F for this course.
(a) If you meet with a classmate to discuss one of the Problems, the articulation of your thought process
(i.e., what you submit to me), must be an individual activity, done in your own words, away from
others. Please remember that the solution-writing process is where so much of your learning will
occur in this course - even more than the time you spend on solving the problems. Do not be
surprised if it takes you 3 to 5 times as long to write up a solution as it takes you to actually solve
the problem.
(b) This Problem Set has been designed to be challenging, because struggling through problems is how
we learn best. When stuck on a problem, it can be helpful to get a small hint that will allow you to
make some progress without robbing you of the opportunity to solve the problem. Online searches,
and even well-intentioned classmates, may be unable to provide you with just a small insight. If
you need support/a small hint, the best plan is to post your query on the Canvas discussion forum.
I will be readily available during office hours, or by appointment.
CS 5002, Fall 2024 Semester, Timothy Edmunds – Problem Set #3 2
Problem #1 – INDIVIDUAL
(a) For each of the following Venn diagrams, shade the indicated regions corresponding to the provided
expression.
For part (a), only the final answer is required; no justification or explanation is necessary.
Note: recall that the notation for sets is slightly different from the notation for boolean expres-
sions. As a result, think of A∆B as the same thing as A⊕B, and think of A as the same thing as ¬A.
(b) Let A = {1, 2, 3, 4, 5}, B = {3, 4, 5, 6, 7}, and C = {5, 6, 7, 8, 9}. Determine the sets A ∪ (B − C)
and (A ∪ B) − (A ∪ C), clearly showing your work. And then using any method of your choice (e.g.
Venn diagram, set logic rules), clearly explain why A∪(B −C) is not equivalent to (A∪B)−(A∪C).
(c) Let A = {1, 2, 3, 4, 5}, B = {3, 4, 5, 6, 7}, and C = {5, 6, 7, 8, 9}. Determine the sets A ∩ (B − C)
and (A ∩ B) − (A ∩ C), clearly showing your work. And then using any method of your choice (e.g.
Venn diagram, set logic rules), clearly explain why A ∩ (B − C) is equivalent to (A ∩ B) − (A ∩ C).
CS 5002, Fall 2024 Semester, Timothy Edmunds – Problem Set #3 3
Problem #2 – INVIDIVIDUAL
Throughout this question, we let
For part (a), only the final answer is required; no justification or explanation is necessary.
(b) For each set S, let |S| be the cardinality of that set, i.e., the number of elements in that set. For
example, |X| = 4 and |Y | = 5.
(c) Using any method of your choice (e.g. logical reasoning, Venn diagram), explain why |S ∪ T | =
|S| + |T | − |S ∩ T | for any two sets S and T . (This is known as the Inclusion-Exclusion Principle.)
Finally, apply the Inclusion-Exclusion Principle to determine the number of elements in the set
P (X) ∪ P (Y ).
CS 5002, Fall 2024 Semester, Timothy Edmunds – Problem Set #3 4
Problem #3 – INDIVIDUAL
In this question, define A to be the set of all students whose first name contains the letter “a”, E to be
the set of all students whose first name contains the letter “e”, and R to be the set of all students whose
first name contains the letter “r”.
Some students appear in more than one set. For example, IJEOMA is an element of both A and E,
and RACHEL is an element of all three sets. On the other hand, JINGJING appears in none of the sets.
(a) For each of CHEN, ETHAN, FLORENCE, FRANCIS, JINGJING, PAUL, RACHEL, ZONGRUI,
place their name inside the correct region of the Venn diagram.
For part (a), only the final answer is required; no justification or explanation is necessary.
(b) A class of students once had |A| = 10, |E| = 8, |R| = 7, |A ∩ E ∩ R| = 1, and |A ∩ E ∩ R| = 0.
Without knowing anything about this particular class, you can say “I know with 100% certainty
that there had to be at least m students in the class and at most M students in the class”.
Determine the values of m and M , and clearly justify why these answers are correct.
(c) Suppose we determined sets A, E, R by looking at the first names of all 8 billion people in the
world. These would be very big sets!!
Of the eight different regions of the Venn diagram, which region would contain the MOST number
of people, and which region would contain the FEWEST number of people? Explain your answers,
clearly stating any assumptions you are making to determine your answers.
(NOTE: any reasonable and clearly-explained justification will earn full marks. No online research
is required to solve this problem!)
CS 5002, Fall 2024 Semester, Timothy Edmunds – Problem Set #3 5
Problem #4 – GROUP
(a) Determine the number of squares and rectangles, of all sizes, that appear in a 4 by 4 unit square.
Solve this problem by considering all of the possible cases (e.g. 1 × 1, 1 × 2, 1 × 3, etc.) and carefully
counting the number of squares/rectangles for each case. Don’t solve it some other way!
(b) Richard has received four free tickets to a Justin Bieber concert, and decides to give them away:
to two of his Canadian friends, and two of his non-Canadian friends.
His non-Canadian friends are Florence, Giorgio, Herieth, Irina, and Jeremiah.
Determine the number of different ways Richard can give out the four tickets, clearly explain-
ing how this problem can be solved by considering a Cartesian Product.
(c) Clearly and carefully explain why the above two problems must give the same answer.
To do this, let S1 be the set of solutions to the Counting Problem in part (a) and let S2 be
the set of solutions to the Ticket Problem in part (b).
Prove that |S1 | = |S2 | by showing that each x ∈ S1 maps to a unique y ∈ S2 , and each y ∈ S2 maps
to a unique x ∈ S1 .
CS 5002, Fall 2024 Semester, Timothy Edmunds – Problem Set #3 6
Problem #5 – GROUP
If you know how to analyze sets, then you know how to calculate probabilities. To illustrate, say
S = {10, 11, 12, . . . , 98, 99}. Let T be the subset of S containing all of the elements with first digit
5. Then T = {50, 51, 52, 53, 54, 55, 56, 57, 58, 59}. It’s not too hard to show that |S| = 90 and |T | = 10.
If I am going to pick one number at random from the set S = {10, 11, 12, . . . , 98, 99}, and I ask you
to determine the probability that the first digit of this number will be equal to 5, then you could imme-
diately conclude that the answer is |T | 10 1
|S| = 90 = 9 .
(a) Suppose someone picks one number at random from the set S = {100, 101, 102, . . . , 998, 999}. De-
termine the probability that at least one of the three digits in this number will be equal to 5.
(b) Suppose someone picks one number at random from the set S = {1000, 1001, 1002, . . . , 9998, 9999}.
Determine the probability that at least one of the four digits in this number will be equal to 5.
(c) Suppose someone picks one number at random from the set S = {10n−1 , 10n−1 + 1, 10n−1 +
2, . . . , 10n − 1}. Determine the probability that at least one of the n digits in this number will
be equal to 5. (Your final answer will be an expression in terms of the variable n.)