Download Solution

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
no text concepts found
Transcript
CmSc180 Discrete Mathematics
Homework 03 due 02/01 Solutions
1. Using the logical equivalences simplify the expression
(A V B)  ~A = (A  ~A) V (B  ~A) = F V (B  ~A) = B  ~A
2. Give direct proof for the following statements
2.a. The product of two odd numbers is odd
Let p = 2k + 1, q = 2m + 1
p . q = (2k + 1)(2m+ 1) = 2k . 2m + 2k + 2m +1 = 2 (2km + k + m) + 1
Therefore the product of two odd numbers is odd
2.b. The sum of three consecutive integers is divisible by 3
Let m, m+1, m+3 be three consecutive numbers.
m + m+1 + m + 2 = 3m + 3 = 3(m+1)
Therefore the sum of three consecutive numbers is divisible by 3
3. Prove by mathematical induction :
1 + 3 + … + (2n – 1) = n2
Let Sn = 1 + 3 + … + (2n – 1)
Let P(n) be the statement Sn = n2
1. Inductive base:
P(1) : S1 = 12 = 1
By definition of the sum S1 = 1
Therefore P(1) is true
2. Inductive step:
We shall show that P(k)  P(k+1) is true
Assume that for some Sk = k2
S k+1 = Sk + 2(k+1) – 1 = Sk + 2k + 1 = k2 + 2k + 1 = (k+1) 2
Therefore if Sk = k2
then S k+1 = (k+1) 2
1
By the principle of mathematical induction
1 + 3 + … + (2n – 1) = n2
for all positive n
4. Using the predicates student(x), play_soccer(x), healthy (x) and appropriate
quantifiers (,), represent in predicate logic the following sentences, write the
negation of the predicate expression and translate back to English
4.1. All students are healthy.
 x student(x)  healthy(x)
 x student(x)  ~ healthy(x)
Some students are not healthy
4.2. Some students play soccer.
 x student(x)  play_soccer(x)
 x student(x)  ~ play_soccer (x)
No students play soccer
4.3. Some soccer players are not healthy
 x play_soccer(x)  ~ healthy(x)
 x play_soccer (x)  healthy(x)
All soccer players are healthy
4.4. Some students are healthy and play soccer
 x student(x)  healthy(x)  play_soccer(x)
 x student(x)  healthy(x)  ~ play_soccer (x)
No healthy students play soccer
Note: There are several ways to represent the negation of P  Q  R as a
conditional:
~ (P  Q  R) = ~P V ~Q V ~R
Disjunction is commutative, so we can group the propositions in 6 different ways:
~P V ~Q V ~R
Let
= (~P V ~Q) V ~R
= (~P V ~R) V ~Q
= (~Q V ~R) V ~P
= ~P V (~Q V ~R)
= ~Q V (~P V ~R)
= ~R V (~P V ~Q)
(a)
(b)
(c)
(d)
(e)
(f)
P(x) be student(x)
Q(x) be healthy(x)
R(x) be play_soccer(x)
2
From (a) we have:
(~P V ~Q) V ~R = ~(P Q) V ~R = (P Q)  ~R
No healthy students play soccer
From (b) we have
(~P V ~R) V ~Q = ~(P R) V ~Q = (P R)  ~Q
No students that are soccer players are healthy
From (c) we have:
(~Q V ~R) V ~P = ~(Q R) V ~P = (Q R)  ~P
No healthy soccer players are students
From (d) we have:
~P V (~Q V ~R) = P  (~Q V ~R) = P  ~ (Q V R)
Students are either not healthy or they don’t play soccer
Students are not healthy soccer players
No students are healthy soccer players
From (e) we have:
~Q V (~P V ~R) = Q  (~P V ~R) = Q  ~ (P  R)
Healthy people are either not students or they don’t play soccer
No healthy people are students that play soccer
From (f) we have
~R V (~P V ~Q) = R  (~P V ~Q) = R  ~ (P Q)
Soccer players are either not students or not healthy
No soccer players are healthy students
4.5. Some healthy soccer players are not students
 x healthy(x)  play_soccer(x)  ~student(x)
 x healthy(x)  play_soccer(x)  student(x)
All healthy soccer players are students
Again, as in the previous problem there are 5 more equivalent negations
4.6. All soccer players are healthy students
 x play_soccer(x)  healthy(x)  student(x)
 x play_soccer(x)  ~(healthy(x)  student(x) )
Some soccer players are not healthy students
4.7. All students are healthy soccer players
 x student(x)  healthy(x)  play_soccer(x)
 x student(x)  ~(healthy(x)  play_soccer(x))
Some students are not healthy soccer players
3
5. Represent the following arguments in predicate logic and determine whether they
are valid or invalid. If valid determine the type of argument. If invalid determine
the type of error if the type is known.
Example: All babies cry
Meg is not a baby
 Meg does not cry
x, baby(x)  cry(x)
~baby(Meg)
 ~cry (Meg)
Invalid argument – inverse error
All nerds are good at math.
Buffy is not good at math.
 Buffy is not a nerd.
x, nerd(x)  good_at_math(x)
~ good_at_math (Buffy)
 ~nerd (Buffy)
Valid argument - MT
All trees have roots.
Roses have roots.
 Roses are trees.
x, tree(x)  has_roots(x)
has_roots(roses)
 tree (roses)
Invalid argument – converse error
Pigs can’t fly.
Wilbur is not a pig.
 Wilbur can fly.
x, pig(x)  ~fly(x)
~pig(Wilbur)
 fly(Wilbur)
Invalid argument – inverse error
4
Cats hate water
Fido hates water
 Fido is a cat
x, cat(x)  hate_water(x)
hate_water (Fido)
 cat (Fido)
Invalid argument – converse error
Cats hate water
Fido does not hate water
 Fido is not a cat
x, cat(x)  hate_water(x)
~hate_water (Fido)
 ~cat (Fido)
Valid argument – MT
Cats hate water
Fido is a cat
 Fido hates water
x, cat(x)  hate_water(x)
cat (Fido)
 hate_water (Fido)
Valid argument – MP
Cats hate water
Fido is not a cat
 Fido does not hate water
x, cat(x)  hate_water(x)
~cat (Fido)
 ~hate_water (Fido)
Inalid argument – inverse error
5
Related documents