Download Final exam

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

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

Document related concepts
no text concepts found
Transcript
Final exam
80-210 Section C
Name:___________________________
Part I:
Problem 1: Give brief answers to the following questions:
(a)
State what it means for an argument to be valid in predicate logic.
An argument is valid in predicate logic if and only if whenever an interpretation
makes the premises true the conclusions is also true.
(b) State what you need to do in order to show that some sentence in first-order logic is
contingent.
You need to find one interpretation that makes the sentence true and one that
makes it false.
Problem 2: Using the given translation key, give translations of the sentences below.
B(x,y):
U(x,y):
1
x bores y
x understands y
S(x,y):
P(x):
L(x,y):
x is a student of y
x is a professor
x listens to y
(a) Every professor bores some of his or her students.
(b) Any professor bored by everything bores all his or her students.
(c) Some professors bore all professors.
(d) Professors don’t understand the students they bore, and students don’t listen to the
professors they are bored by.
(a) (x)(P(x) → (y)(S(y,x) & B(x,y)))
(b) (x)(P(x) & (y)B(y,x)→(z)(S(z,x)→B(x,z)))
(c) (x)(P(x) & (y)(P(y)→B(x,y)))
(d) (x)(y)(P(x) & S(y,x) & B(x,y) → (U(x,y) & L(y,x)))
Problem 3: Do the following problems regarding interpretations.
Consider the following sentence:
(x)P(x) → (x)(P(x) v (y)R(x,y))
(a) Give an interpretation that makes this sentence true.
Take the following interpretation I:
2
UD := Natural numbers
I(P) : = { } (i.e. empty)
I(R) := x < y (that is the set of pairs where the first is less than the second)
So, under this interpretation (x)P(x) is false, since there are no members of the
domain that are true of P. And thus the whole statement is true since a conditional is
true just in case the antecedent is false or the consequent is true.
(b) Give an interpretation that makes this sentence false.
Take the following interpretation I:
UD := Natural numbers
I(P) : = Even natural numbers
I(R) := { <1,1> }
Under this interpretation (x)P(x) is clearly true since there are even numbers. So now
look at (x)(P(x) v (y)R(x,y)), this is true under I just in case for all natural numbers
m, P(m) v (y)R(m,y) is true on I. But this is not the case, take for example m=3
(P is not true for 3 and R is only true when x=1 and y=1 so it is also false in this case).
Thus, since the antecedent is true and the consequent is false the conditional is false.
Consider the argument:
P(a) v Q(a)
(x)P(x) → (x)Q(x)
___________
Q(a)
(a) Give an interpretation that makes this argument’s premises true and its conclusion
true.
Take the following interpretation I:
UD := Natural numbers
I(P) : = { } (i.e. empty)
I(Q) := Even numbers
I(a) := 4
3
Clearly P(a) v Q(a) is true since Q(a) is true under I. Now since (x)P(x) is false
(since nothing holds of P), (x)P(x) → (x)Q(x) is true. But as we already noted
Q(a) is true, so both the premises and conclusion are true under this interpretation.
(b) Give an interpretation that makes this argument’s premises true and its conclusion
false.
Take the following interpretation I:
UD := Natural numbers
I(P) : = Odd numbers
I(Q) := { <1>}
I(a) := 3
Clearly under this interpretation P(a) v Q(a) is true since P(a) is true (3 is odd).
Also, note that (x)P(x) and (x)Q(x) are true, since in the first case there are
odd numbers and in the second case Q is true on one number, namely 1. But, the
conclusion is not true since Q only holds of 1, and a is not 1. Thus this
interpretation thinks that the premises are true and the conclusion false (i.e. it’s a
counterexample).
Prove whether the following formula is a tautology, contingent, or contradictory.
(x)(P(x) v P(x))
This is clearly a tautology this can be shown by the following argument:
Let I be an arbitrary interpretation.
So, note that I thinks that
(x)(P(x) v P(x)) is true just in case there is a member of the domain
(call it m) such that P(m) v P(m). But this is always true since if
P(m) is true then P(m) v P(m) is true and if P(m) is false then P(m) is
True and thus P(m) v P(m) is true. One of these must be the case, so
(x)(P(x) v P(x)) must be true on all interpretations.
Problem 4: Prove the following arguments using only the primitive rules of propositional
logic:
(a)
P→Q
 P v Q
4
1.
P→Q
2. | (P v Q)
3. | | P
4. | | P v Q
5. | | 
6. | P
7. | Q
8. | P v Q
9. | 
10. P v Q
P
A
A
vI 3
 I 4,2
E 5
→E 1,6
vI 7
 I 8,2
E9
P v Q
(b)
 P→Q
1.
2.
3.
4.
5.
6.
7.
P v Q
| P
||P
| | | Q
|||
|| Q
| P→Q
8. | Q
9. | P→Q
10. P→Q
P
A
A
A
 I 3,2
E 5
→I 3,6
A
→I 8
vE 1,7,9
Problem 5: Determine whether the following arguments are valid or invalid, if the
argument is valid give a proof (using the rules of inference including any derived ones
listed at the end) or give a counterexample otherwise (you don’t need to list the full truth
table).
(a)
5
P v Q
Q v R
R & S
P&S
The following assignment to the propositional variables is a counterexample:
P=F
Q=F
R=F
S=T
(b)
(P & Q) → R
(P→R) & (Q→R)
The following assignment to the propositional variables is a counterexample:
P=T
Q=F
R=F
Problem 6: Prove the following arguments using any primitive inference rules for
propositional and first order logic with equality (i.e. you can use equality rules) and any
derived rules for proposition logic listed at the end.
(a)
(x)(P(x) & Q(x))
 (x)P(x) & (x)Q(x)
1. (x)(P(x) & Q(x))
2. | P(v) & Q(v)
3. | P(v)
6
P
A
&E 2
4. | Q(v)
5. | (x)P(x)
6. | (x)Q(x)
7. | (x)P(x) & (x)Q(x)
8. (x)P(x) & (x)Q(x)
(b)
&E 2
I 3
I 4
&E 5,6
E 1, 7
(x)P(x)
 (x)P(x)
(x)P(x)
| (x)P(x)
|| P(v)
|| (x)P(x)
|| 
| P(v)
| (x)P(x)
|
(x)P(x)
1,
2.
3.
4.
5.
6.
7.
8.
9.
(d)
P
A
A
I 3
I 4,2
E 5
I 6
I 7,1
E 8
(x)((y)R(x,y) → ((x = m) v (x = n)))
(x)(y)(R(x,y) & S(x))
 S(m) v S(n)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
7
(x)((y)R(x,y) → ((x = m) v (x = m)))
(x)(y)(R(x,y) & S(x))
| (y)(R(w,y) & S(w))
| R(w,v) & S(w)
| R(w,v)
| S(w)
| (y)R(w,y) → ((m = w) v (n = w))
| (y)R(w,y)
| w=m v w=n
| | w=m
| | S(m)
| | S(m) v S(n)
P
P
A
E 3
&E 4
&E 4
E 1
I 5
→E 7,8
A
=E 6, 10
vI 11
13.
14.
15.
16.
17.
||w=n
| | S(n)
| | S(m) v S(n)
| S(m) v S(n)
S(m) v S(n)
A
=E 6,13
vI 14
vE 9,10,13
E 2, 16
(x)P(x) → Q
(c)
 (x)(P(x)→Q)
1. (x)P(x)→Q
P
2. | (x)(P(x)→Q)
A
3. | | P(v) → Q
A
4. | | (x)(P(x)→Q)
I 3
5. | | 
I 4,2
6. | (P(v) → Q)
I 5
7. | P(v) & Q
→6
8. | P(v)
&E 7
9. | (x)P(x)
I 8
10.| Q
→E 1,9
11.| Q
&E 7
12.| 
 I 10,11
13. (x)(P(x)→Q)
E 12
Problem 7: Determine whether the follow are valid or invalid arguments, if they are valid
give a proof (using the same rules you could use in problem 6) otherwise give a
counterexample.
(a)
(x)(P(x) → Q(x))
(x)P(x)
 (x)Q(x)
This argument is clearly invalid, take the following interpretation I:
UD := Natural numbers
I(P) : = Odd numbers
I(Q) := { } (i.e. nothing holds of Q)
This interpretation is a counterexample to see this note the following:
The first premise is true under I just in case there is some natural number
m such that P(m) → Q(m), but there are many for example 2 (any even
number will make the antecedent false and the consequent false and hence the
conditional is true). Now since there are odd numbers clearly (x)P(x) is
true under this interpretation. But since I(Q) = { }, Q holds of nothing, so
8
under I (x)Q(x) is false. Thus this interpretation makes all the premises true
and the conclusion false.
(b)
(x)(P(x) v Q(x))
 (x)P(x) v (x)Q(x)
1.
2.
3.
4.
5.
(x)(P(x) v Q(x))
| P(w) v Q(w)
| | P(w)
| | (x)P(x)
| | (x)P(x) v (x)Q(x)
6. | | Q(w)
7. | | (x)Q(x)
8. | | (x)P(x) v (x)Q(x)
9. | (x)P(x) v (x)Q(x)
10. (x)P(x) v (x)Q(x)
9
P
A
A
I 3
vI 4
A
I 6
vI 7
vE 2,5,8
E 1,9
Related documents