Qy
Qy
(2) Determine whether each molecular statement below is true or false, or whether it is impossible to determine.
Assume you do not know what my favorite number is (but you do know that 13 is prime).
(a) If 13 is prime, then 13 is my favorite number.
(b) If 13 is my favorite number, then 13 is prime.
(c) If 13 is not prime, then 13 is my favorite number.
(d) 13 is my favorite number or 13 is prime.
(e) 13 is my favorite number and 13 is prime.
(f) 7 is my favorite number and 13 is not prime.
(g) 13 is my favorite number or 13 is not my favorite number.
Answer:
(a) It is impossible to tell. The hypothesis of the implication is true. Thus the implication
will be true if the conclusion is true (if 13 is my favorite number) and false otherwise.
(b) This is true, no matter whether 13 is my favorite number or not. Any implication with
a true conclusion is true.
(c) This is true, again, no matter whether 13 is my favorite number or not. Any implication
with a false hypothesis is true.
(d) For a disjunction to be true, we just need one or the other (or both) of the parts to be
true. Thus this is a true statement.
(e) We cannot tell. The statement would be true if 13 is my favorite number, and false if
not (since a conjunction needs both parts to be true to be true).
(f) This is definitely false. 13 is prime, so its negation (13 is not prime) is false. At least
one part of the conjunction is false, so the whole statement is false.
(g) This is true. Either 13 is my favorite number or it is not, but whichever it is, at least
one part of the disjunction is true, so the whole statement is true.
(3) In my safe is a sheet of paper with two shapes drawn on it in colored crayon. One is a square, and the
other is a triangle. Each shape is drawn in a single color. Suppose you believe me when I tell you that if
the square is blue, then the triangle is green. What do you therefore know about the truth value of the
following statements?
(a) The square and the triangle are both blue.
(b) The square and the triangle are both green.
(c) If the triangle is not green, then the square is not blue.
(d) If the triangle is green, then the square is blue.
(e) The square is not blue or the triangle is green.
1
Answer:
The main thing to realize is that we don’t know the colors of these two shapes, but we do know
that we are in one of three cases: We could have a blue square and green triangle. We could
have a square that was not blue but a green triangle. Or we could have a square that was not
blue and a triangle that was not green. The case in which the square is blue but the triangle is
not green cannot occur, as that would make the statement false.
(a) This must be false. In fact, this is the negation of the original implication.
(b) This might be true or might be false.
(c) True. This is the contrapositive of the original statement, which is logically equivalent
to it.
(d) We do not know. This is the converse of the original statement. In particular, if the
square is not blue but the triangle is green, then the original statement is true but the
converse is false.
(e) True. This is logically equivalent to the original statement.
(4) Again, suppose the statement if the square is blue, then the triangle is green is true. This time however,
assume the converse is false. Classify each statement below as true or false (if possible).
(a) The square is blue if and only if the triangle is green.
(b) The square is blue if and only if the triangle is not green.
(c) The square is blue.
(d) The triangle is green.
Answer:
The only way for an implication P → Q to be true but its converse to be false is for Q to be
true and P to be false. Thus:
(a) False.
(b) True.
(c) False.
(d) True.
(e)
(5) Consider the statement, If you will give me a cow, then I will give you magic beans. Decide whether each
statement below is the converse, the contrapositive, or neither.
(a) If you will give me a cow, then I will not give you magic beans.
(b) If I will not give you magic beans, then you will not give me a cow.
(c) If I will give you magic beans, then you will give me a cow.
(d) If you will not give me a cow, then I will not give you magic beans.
(e) You will give me a cow and I will not give you magic beans.
(f) If I will give you magic beans, then you will not give me a cow.
Answer:
The converse is “If I will give you magic beans, then you will give me a cow.” The contrapositive
is “If I will not give you magic beans, then you will not give me a cow.” All the other statements
are neither the converse nor contrapositive.
(6) Write each of the following statements in the form, “if...,then....” Careful, some of the statements might
be false (which is alright for the purposes of this question).
(a) To lose weight, you must exercise.
(b) To lose weight, all you need to do is exercise.
(c) Every American is patriotic.
(d) You are patriotic only if you are American.
(e) The set of rational numbers is a subset of the real numbers.
(f) A number is prime if it is not even.
(g) Either the Broncos will win the Super Bowl, or they wont play in the Super Bowl.
Answer:
(a) If you have lost weight, then you exercised.
(b) If you exercise, then you will lose weight.
(c) If you are American, then you are patriotic.
(d) If you are patriotic, then you are American.
(e) If a number is rational, then it is real.
(f) If a number is not even, then it is prime.
(g) If the Broncos don’t win the Super Bowl, then they didn’t play in the Super Bowl.
Alternatively, if the Broncos play in the Super Bowl, then they will win the Super Bowl.
(7) Write the contrapositive and then the converse of each of the previous statements in words.
Answer:
(a) If you have lost weight, then you exercised. Contrapositive: If you didn’t exercise, then
you didn’t lose weight. Converse: If you exercised then you have lost weight.
(b) If you exercise, then you will lose weight. Contrapositive: If you didn’t lose weight, then
you didn’t exercise Converse: If you lost weight then you exercised.
(c) If you are American, then you are patriotic. Contrapositive: If you aren’t patriotic, then
you aren’t American. Converse: If you are patriotic then you are American.
(d) If you are patriotic, then you are American. Contrapositive: If you aren’t American,
then you aren’t patriotic. Converse: If you are American, then you are patriotic.
(e) If a number is rational, then it is real. Contrapositive: If a number isn’t real, then it
isn’t rational. Converse: If a number is real, then it is rational.
(f) If a number is not even, then it is prime. Contrapositive: if a number is not prime, then
it is even. Converse: If a number is prime, then it is not even.
(g) If the Broncos don’t win the Super Bowl, then they didn’t play in the Super Bowl.
Contrapositive: if the Broncos play in the Super Bowl, then they will win the Super
Bowl. Converse: If the Broncos didn’t play in the Super Bowl, then they didn’t win the
Super Bowl.
Answer:
The following are all just one possible example; others work too.
(a) {x ∈ Z | 1 ≤ x ≤ 7}.
(b) {10n | 0 ≤ n ≤ 4}.
(c) { n1 | n ∈ N; n ≥ 1}.
(d) {x ∈ Z | x = 0}.
(10) Let A = {0, 2, 3}, B = {2, 3}, and C = {1, 5, 9}. Determine which of the following statements are true.
Give reasons for your answers.
Answer:
(a) True 3 is an element in A.
(b) False, {3} is a set, and is not an element of A.
(c) True, {3} is a set and it is a subset of the set A since every element in {3} is also in A.
(d) True, B is a set and it is a subset of the set A since every element in B is also in A.
(e) False. We see that 0 ∈ A but 0 6∈ B so every element of A is not also in B.
(f) True, the empty set is always a subset of every set.
(g) False. The empty set is not an element of that set.
(h) True. Every set is a subset of itself by definition.
(11) Let U = {0, 1, 2, 3, ..., 9}, A = {0, 2, 3}, B = {2, 3}, and C = {1, 5, 9}. Determine:
Answer:
(a) (A ∪ B) ∩ C = ∅
(b) Ac ∩ B c = {1, 4, 5, 6, 7, 8, 9}
(c) (Ac ∪ B c ) = {1, 4, 5, 6, 7, 8, 9}
(d) A × B = {(0, 2), (0, 3), (2, 2), (2, 3), (3, 2), (3, 3)}
(12) Give examples of sets A and B and functions f : A → B that have the properties specified below
Answer:
You can do the first two with finite sets. The last two must be done with infinite sets. I will do
them all with formulas for functions over the natural numbers.
(a) f : N → N given by f (x) = x.(
0 if x = 0 or x = 1
(b) f : N → N given by f (x) =
x + 1 if x ≥ 2
(c) f : N → N given by f (x) = ( 2x.
x
2 if x is even
(d) f : N → N given by f (x) = x−1
2 if x is odd
(13) Consider the function f : N → Z given by f (n) = 4n+1. Describe the range of f using set builder notation.
Is this function injective or surjective?
Answer:
The range of f is given by the set {x ∈ Z | x = 4n + 1 for some n ∈ N}. This function is
injective: if f (n) = f (m), then 4n + 1 = 4m + 1 so n = m. However, this is not onto since for
instance 0 is not in the range (it is not 1 more than a multiple of 4).
(17) The following functions all have domain {1, 2, 3, 4, 5} and codomain {1, 2, 3}. For each, determine whether
it is (only) injective, (only) surjective, bijective, or neither injective nor surjective.
(
1 2 3 4 5 1 2 3 4 5 x if x ≤ 3
(a) f = (b) f = (c) f (x) =
1 2 1 2 1 1 2 3 1 2 x−3 if x > 3
Answer:
(a) This function is neither injective nor surjective (since f (1) = f (3) and 3 is not an output)
(b) This function is surjective, but it is not injective since f (1) = f (4).
(c) This function is surjective, but it is not injective since f (1) = f (4). In fact this is the
same function as (b).
(18) A builder of modular homes would like to impress his potential customers with the variety of styles of
his houses. For each house there are blueprints for three different living rooms, four different bedroom
configurations, and two different garage styles. In addition, the outside can be finished in cedar shingles
or brick. How many different houses can be designed from these plans?
Answer:
Multiplication principle: total houses: 3 · 4 · 2 · 2 = 48.
(19) Ten people are invited to a dinner party. How many ways are there of seating them at a round table? If
the ten people consist of five men and five women, how many ways are there of seating them if each man
must be surrounded by two women around the table?
Answer:
Seat the first person - doesn’t matter where he/she sits (so there is just one choice). Then
there are 9! orderings of the remaining people, so there are a total of 9! such orderings. In
the second case, We seat one man anywhere, so there is one choice. Then, we arrange the 5
women in 5! ways and arrange the 4 remaining men in 4! ways and then seat them in order
man-woman-man-woman, etc. There are thus 4! · 5! such configurations.
(20) How many eight-letter words can be formed from the 26 letters in the alphabet? Even without concerning
ourselves about whether the words make sense, there are two interpretations of this problem. Answer both.
Answer:
If we allow letters to be repeated, there are 268 words (26 choices for each letter - this uses the
multiplication principle because we can think of picking each letter as independent stages).
If we don’t allow letters to be repeated, then there are P (26, 8) = 26!
18! = 26·25·24·23·22·21·20·19
ways - again we use the multiplication principle because we can think of picking each letter as
independent stages).
(21) Six people apply for three identical jobs and all are qualified for the positions. Two will work in New York
and the other one will work in San Diego. How many ways can the positions be filled?
Answer:
Select the 2 for the New York job and then the last one for the San Diego job. There are
6 4
·
2 1
ways to do this.
You could also select the three people to get the jobs, and then choose 2 from those to go to
New York. This gives
6 3
·
3 2
ways. Both are correct and give 60.
(22) Consider the three-digit numbers that can be formed from the digits 1, 2, 3, 4, 5 with no repetition of
digits allowed.
(a) How many of these are even numbers?
(b) How many are greater than 250?
Answer:
(a) We can choose the first two digits anyway we like, but the last digit must be even. Thus,
there are three independent stages, so there are
5 · 5 · 2 = 50
such numbers.
(b) If the number begins 25 , then we have 5 numbers greater than 250 (this is true because
251-255 contains 5 numbers. Then, for all other numbers, we select the first digit to be
3 or larger and the other two at will. There are 3 · 5 · 5 such choices. Thus, there are 80
such numbers.
(23) A survey of 300 people indicated: 60 owned an iPhone, 75 owned a Blackberry, and 30 owned an Android.
Furthermore, 40 owned both an iPhone and Blackberry, 12 owned both an iPhone and Android, and 8
owned a Blackberry and an Android. Finally, 3 owned all three phones
(a) How many people surveyed owned none of the three phones?
(b) How many people owned a Blackberry but not an iPhone?
(c) How many owned a Blackberry but not an Android?
Answer:
We let A be the set of those who owned an iPhone, B be the set of those who owned a Blackberry,
and C those that owned an Android. Therefore we have |A| = 60, |B| = 75, and |C| = 30. Also,
we know that |A ∩ B| = 40, |A ∩ C| = 12 and |B ∩ C| = 8. Finally, |A ∩ B ∩ C| = 3. Therefore,
by the principle of inclusion/exclusion, we have
|A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|
= 60 + 75 + 30 − 40 − 12 − 8 + 4
= 109
(a) Since there are 300 total people, there are 191 without one of the types of phone.
(b) Since |A ∩ B| = 40 and |B| = 75, there are 35 people with a Blackberry that don’t own
an iPhone.
(c) Since |B ∩ C| = 8 and |B| = 75, there are 67 people with a Blackberry that don’t own
an Android.
It is also helpful to draw Venn diagrams for this problem.
(24) The congressional committees on mathematics and computer science are made up of five congressmen each,
and a congressional rule is that the two committees must be disjoint. If there are 385 members of congress,
how many ways could the committees be selected?
Answer:
Choose the math committee in 385
5 ways and then choose the CS committee from the remaining
380
380 people in 5 ways. Thus, by the multiplication principle, there are
385 380
·
5 5
total ways.
(25) A poker game is played with 52 cards. How many “hands” of five cards are possible? If there are four
people playing, how many five-card “hands” are possible on the first deal?
Answer:
There are 52
5 possible hands. When there are four people, we select the first hand, then the
second (from the remaining 47 cards), then the third from the remaining 42, and the fourth
from the remaining 37 cards. Thus we have
52 47 42 37
· · ·
5 5 5 5
such quadruples.
(26) A class of twelve computer science students are to be divided into three groups of 3, 4, and 5 students to
work on a project. How many ways can this be done if every student is to be in exactly one group?
Answer:
First we choose group one in 12 two from the remaining 9 students in 94
3 ways, the group
ways, and then the remaining 5 form a group in 55 = 1 way. Thus there area total of
12 9
·
3 4
ways.
(27) A university would like to determine how many different three-digit telephone extensions can be made
using the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 :
(a) if the three digits must be different
(b) if the three digits can include duplications.
Answer:
Both use multiplication principle.
(a) 10 · 9 · 8 = 720.
(b) 10 · 10 · 10 = 103 = 1000
(28) There are five roads from city A to city B and six roads from city B to city C. There are no direct routes
from A to C.
(a) How many different ways are there from city A to C?
(b) How many different ways are there from A to C and back to A?
(c) What is the answer to part b if each road is to be used exactly once?
Answer:
(a) 5 · 6 = 30 ways.
(b) 5 · 6 · 6 · 5 = 900 ways.
(c) 5 · 6 · 5 · 4 = 600 ways.
(29) A real estate developer has finished constructing twelve houses and must paint them. He has purchased
quantities of white and blue paint so that five of the houses will be blue and the remainder will be white.
How many ways can he decide to paint the houses?
Answer:
Choose the blue houses in 12
5 ways.
(30) Ten persons apply for three identical jobs and all are qualified for the positions. Two of these persons will
work in New York and the other one will work in San Diego. How many ways can the positions be filled?
Answer:
Similar to a problem above. There are 10
8 10
3
2 · 1 or there are 3 · 2 ways. Both are 360.
(33) (a) Let T = {1, 2, 3, 4, 5}. How many subsets of T have less than four elements?
(b) How many proper subsets of {1, 2, 3, 4, 5} contain the numbers 1 and 5? How many of them also do
not contain the number 2?
Answer:
(a) There are a total of 25 subsets and only one of those has 5 elements and 54 = 5 have 4
elements, so there are 25 − 1 − 5 = 26 total subsets with less than four elements.
(b) If the subset contains 1 and 5 already, then we need to choose subsets from {2, 3, 4} to
union with {1, 5}. There are 8 such subsets. If we want to avoid 2, then we need to
choose subsets from {3, 4} to union with {!, 5} and so we have 4 in this case.