You are on page 1of 4

(OLSJON BAXHIJA)

HW (3)

CIS 160 Recitation (210)

1. There are 12 11 10 9 8 possible wall decorations or (12)5 . First, we need to figure


out how many flags
 we can construct if no two adjacent colors can be the same. The
answer is 12 or 31 22 because any one of the three stripes can be colored red, blue,
yellow and the remaining two stripes have two remaining choices for color left. We can
also list every possibility of what the stripes in a flag could be and we get 12 that way.
We are told that the flags are placed in order A, B, C etc so we know that A has 12
possible choices for flags, B has 11, C has 10 and so on.
2. (a) The maximum value that k can have is 12 because given 11 players, 10 soccer
balls can be placed between them and 1 soccer ball can be placed before the first
player and 1 soccer ball after the last player for a total of 12 soccer balls.

(b) There are 12
* 11! different photo-kball arrangements. Because the balls are
k
indistinguishable the order in which you place them doesnt matter and we cannot
have a quantity of balls greater than the maximum determined in part a. The
players are distinguishable so they must be permuted.
3. (a) (p q) r p (q r)
TRUE

(b) (p q) q q (p q)
FALSE

(c) [(p q) r] [(p q) r] r


FALSE

(OLSJON BAXHIJA)

HW (3)

CIS 160 Recitation (210)

(d) p (q p) [p (q r)] [(p q) (p r)]


TRUE

4. (For the sake of personal understanding, I make this note) If A and B are two Boolean
expressions, we say that A is a logical consequence of B if every combination of true
and false inputs that make B true also make A true.
(a) (We are seeking some Boolean expression A that is a logical consequence of (p
q) p thus whenever (p q) p is TRUE, A also has to be true.

We see that A has to be true whenever we have T, T and T, F for P, Q and A


cannot yield F when we input F, T and F, F . Let A be the Boolean expression
p q. The truth table for that expression is shown below.

(OLSJON BAXHIJA)

HW (3)

CIS 160 Recitation (210)

(b) We can rephrase the problem as such: p q is a logical consequence of B if every


T, F combination of inputs that make B true also make p q true. Note that
p q is true only when P, Q is True, False.
Note that if we can make a statement that never yields true, we can say that
p q is a logical consequence of such statement because then p q is free to be
true under any combination of truth values. This is an example of vacuous truth.
Such a statement would be p p.

5. (a) COUNTING QUESTION: In how many ways can you choose 2 people from a set
consisting
of n boys and n girls? One such way to figure this out is to compute

2n
which
corresponds
to the LHS. The
2

 other way to figure this out is to choose
n
n
only two girls 2 or only two boys 2 or to choose a boy and a girl (or a girl and
a boy, order doesnt matter) in n2 ways for a total of 2 n2 + n2 ways.
(a) COUNTING QUESTION: Given a set of n people, in how many ways can we form
a committee of
 size k that has a committee leader? You can create a committee
of size k in nk ways and you can pick a committee leader in k ways. That is the
LHS. You can also answer the same question by first picking a committee leader
in n ways. That means that you have n 1 people to pick from to construct the
committees and you need k 1 people to form a committee of size k because
a

n1
leader has already been chosen. Thus, the expression would be n k1 to show
that you can first pick a leader and then the remaining members. That expression
matches the RHS.
6. (a) Assume, for contradiction, that p|ak and that p 6 |a. This means that ak = py for
some integer y and a = px + r for some integer x and some integer r not equal to
zero. Using the Binomial Theorem, we can expand (px + r)k to have rk + (plus
an expression that will always have p as a factor. We cannot express rk as the
product of p and some integer thus the contradiction which forces you to conclude
that if p 6 |a then p|a.
(b) Assume, for contradiction, that p1/k is rational. We can then express it as the
ratio of two integers that do not have any factors in common.
p( 1/k) = (a)/(b)
p = (a)k /(b)k
3

(OLSJON BAXHIJA)

HW (3)

CIS 160 Recitation (210)

p (bk ) = (a)k
This means that p divides (a)k
7. Let p1 , p2 , p3 be prime. Assume, for contradiction, that (p1 )2 = (p2 )2 + (p3 )3 . We
can express this as (p1 )2 (p2 )2 = (p3 )3 . Because we can assume that p1 , p2 , p3 are
all prime, there are eight possibilities of what these values can be. We need to show
that each possible combination leads to a contradiction. The following are the eight
possibilities for (p1 ), (p2 ), (p3 ):
[1].odd, odd, odd
[2].odd, odd, 2
[3].odd, 2, odd
[4].2, odd, odd
[5].2, 2, 2
[6].2, 2, odd
[7].2, odd, 2
[8].odd, 2, 2
[1]. is a contradiction because odd does not equal even.
[2]. asdfasdf
[3]. asdfasdf
[4]. is a contradiction because 4 - any odd number squared will yield a negative number
while odd3 yields an odd number.

You might also like