Download Compound propositions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Least squares wikipedia , lookup

Transcript
CmSc180 Discrete Mathematics
Homework 05 Solutions
1.
Suppose you are visiting an island where two kinds of people live: knights who
always tell the truth, and knaves who always lie. Two natives A and B approach
you, and B says: "Both of us are knaves"
What are A and B?
If B says the truth, then B has to be a knight. Also, as we assume he says the truth, he has
to be a knave. This is a contradiction. Hence B does not say the truth, i.e. B is a knave.
Also, as he is a knave, what he says is false, i.e. A and B are not both knaves. Since B is a
knave, A should be a knight.
Thus A is a knight and B is a knave.
2.
Consider the expression:
 n (integer(n)  even_square(n)  even(n))
Which of the following sentences are equivalent to the above expression:
a.
b.
c.
d.
All integers have even squares and are even.
Given any integer whose square is even, that integer is itself even.
There are some integers whose square is even.
Any integer with an even square is even.
Only b and d are equivalent to the expression.
3.
a.
Not equivalent . If the sentence were:
All integers that have even squares are even - it would be equivalent.
However the word "that" is not present. As it is, the sentence claims that
there are only even integers, while the expression is a conditional - if an
integer has an even square, than it is even.
b.
c.
Equivalent
Not equivalent, though it is not contradictory to the expression. It claims
only that some integers have even squares, it does not say that the integers
with even squares are even.
d.
Equivalent
Give direct proof of the following statement:
The sum of three consecutive integers is divisible by 3.
Direct proof:
Let n be any integer. The next two integers are n+1 and n+2.
Therefore, n, n+1, and n+2 are three consecutive integers.
(1) S = n + n + 1 + n + 2 = 3n + 3 = 3(n+1).
Basic algebra
1
(2) x, x = 3m  divisible_by_3(x)
(3) S = 3m, where m = n+1
 (4) divisible_by_3(S)
by definition
by (1)
by (2), (3) and MP
4.
Let S(n) = 1*2 + 2*3 + 3*4 + … +n*(n+1) , n ≥1
Note: '*' is multiplication
Prove by mathematical induction that S(n) = n*(n+1)*(n+2)/3
We will prove the statement P(n): S(n) = n*(n+1)*(n+2)/3
a. Inductive base:
We will show that P(1) is true
P(1): S(1) = 1(1+1)(1+2)/3 = 1*2*3/3 = 2
By the definition of the sum, S(1) = 1*2 = 2
Therefore P(1) is true
b. Inductive step
Assume that P(k): S(k) = k(k+1)(k+2)/3 is true.
We will show that P(k+1): S(k+1) = (k+1)(k+2)(k+3)/3 is also true
S(k+1) = S(k) + (k+1)(k+2) = k(k+1)(k+2)/3 + 3(k+1)(k+2)/3 =
= ( k(k+1)(k+2) + 3(k+1)(k+2) ) /3 =
= ( (k+1)(k+2) (k + 3))/3 = (k+1)(k+2)(k+3)/3
By the principle of mathematical induction for all n ≥1
1*2 + 2*3 + 3*4 + … +n*(n+1) =n*(n+1)*(n+2)/3
5.
Let A = {1,2,3,4,5,6,7}. For each set below determine whether it is a partition of A
or not. If the answer is negative, explain why the set is not a partition:
a. {{1,2},{3,4,5,7},{6}} yes
b. {{1,3,7},{3,4,5,6}} no, 3 appears in two sets, 2 is missing
c. {{1}{2,4,5},{3,6,7}} yes
d. {{2,3,4},{1,5,7}}
6.
no, 6 is missing
Let X = {a,b}, Y = {1,2}
a. Write down the elements of (X x Y)
X x Y = {(a,1), (a,2), (b,1), (b,2)}
b. Write down the elements of (Y x X)
(Y x X) = {(1,a), (1,b), (2,a), (2,b)}
2