Download 1. What is propositional logic? With respect to AI, what is it good for

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

Abductive reasoning wikipedia , lookup

Rewriting wikipedia , lookup

Laws of Form wikipedia , lookup

Structure (mathematical logic) wikipedia , lookup

Ambiguity wikipedia , lookup

Quasi-set theory wikipedia , lookup

Sequent calculus wikipedia , lookup

Canonical normal form wikipedia , lookup

Propositional calculus wikipedia , lookup

Propositional formula wikipedia , lookup

Transcript
1. What is propositional logic? With respect to AI, what is it good for?
Propositional logic is when propositions are connected by logical operators. With respect
to AI, it is good for a nice, simple framework for reasoning. Propositional logic also with
respect to AI can help take existing knowledge and derive new knowledge or answers.
2. Using BNF, define the language of all “fully parenthesized” propositional logic formulas,
where a propositional logical formula is said to be fully parenthesized only if it contains
one set of parenthesis for each logical operator. (Hint: look up BNF – Backus-Naur
Form)
( formula ) ::= ( a truth value )
| ( a propositional variable )
|
( formula )
| ( formula ˄ formula )
| ( formula ˅ formula )
| ( formula → formula )
| ( formula ↔ formula )
This is a definition for “fully parenthesized” formulas; there is exactly one set of
parenthesis per operator.
3. With respect to the propositional calculus, what is an interpretation?
An interpretation is an assignment of truth values to the propositional values.
4. How many interpretations are there for a propositional formula involving 3 variables? 4
variables? 5 variables? 6 variables?
There are 8 interpretations for a propositional formula involving 3 variables. There are 16
interpretations for a propositional formula involving 4 variables. There are 32
interpretations for a propositional formula involving 5 variables. There are 64
interpretations for a propositional formula involving 6 variables.
5. In words, define…
a. ( NOT A ), where A is a propositional variable
( NOT A ) is a negation of A.
b. ( A AND B ), where A and B are a propositional variable
( A AND B ) is a conjunction of A and B.
c. ( A OR B ), where A and B are a propositional variable
( A OR B ) is a disjunction of A and B.
d. ( A IMPLIES B ), where A and B are a propositional variable
( A IMPLIES B ) is an implication when, if A then B.
e. ( A EQUIVALENT-TO B ), where A and B are a propositional variable
( A EQUIVALENT-TO B ) is an equivalence, when A if and only if B.
6. What does it mean for 2 propositional formulas to be logically equivalent?
For 2 propositional formulas to be logically equivalent they must take on the same truth
values for all interpretations.
7. What does it mean for a logical formula to be satisfiable? Give an example of a logical
formula having 3 variables that is satisfiable – and provide a simple argument that it is,
indeed, satisfiable.
For a logical formula to be satisfiable it has to be true for at least one interpretation. An
example of a logical formula having 3 variables that is satisfiable is:
((A˄B)→C)
A = t, B = f, C = f therefore ( ( t ˄ f ) → f )
( f → f ) which is t.
8. What does it mean for a logical formula to be valid? Give an example of a logical
formula having 3 variables that is satisfiable – and provide a simple argument that it is,
indeed valid.
For a logical formula to be valid it is true for all interpretations; true formulas are also
called tautologies. An example of a logical formula having 3 variables that is valid is:
( A˄
B˄
C)
A = f, B = f, C = f therefore ( f ˄
f˄
f)
( t ˄ t ˄ t ) which is t.
9. What does it mean for a logical formula to be invalid? Give an example of a logical
formula having 3 variables that is satisfiable – and provide a simple argument that it is,
indeed, invalid.
For a logical formula to be invalid is false for all interpretations. An example of a logical
formula having 3 variables that is satisfiable is:
( A˄ B˄ C)
A = f, B = f, C = f therefore ( f ˄ f ˄ f ) which is f.
10. What does it mean for a logical formula to be unsatisfiable? Give an example of a
logical formula having 3 variables that is satisfiable – and provide a simple argument that
it is, indeed, unsatisfiable.
For a logical formula to be unsatisfiable it is not true for any interpretation. An example
of a logical formula having 3 variables that is satisfiable is:
(A˄(B˅C))
A = t, B = t, C = t therefore ( t ˄ ( t ˄ t ) )
( f ˄ ( f ˅ f ) ) which is f.
11. With respect to a logical formula, what is a model? Give an example of a model for some
logical formula having 3 variables.
With respect to a logical formula, a model of the formula is every interpretation that
satisfies a formula. An example of a model for some logical formula having 3 variables
is:
((A˄B)→C)
12. What is a proof system in the context of propositional calculus?
A proof system in the context of propositional calculus is a system that proves
equivalences or tautologies.
13. What does it mean for a logical formula to follow from, or be entailed by a set of logical
formulas?
For a logical formula to follow from, or be entailed by a set of logical formulas is when
every interpretation in which a knowledge base ( KB ) is true, a formula query ( Q ) is
also true. Therefore, a formula KB entails a formula Q or Q follows from KB if every
model of KB is also a model of Q.
14. Convert each of the formulas in Exercise 2.2 to a fully parenthesized logical formula.
a.
( A˄ B ) ↔ A˄ B
(( (A˄B))↔(( A)˄( B)))
b. A → B ↔ B → A
((A→B)↔(( B)→( A)))
c. ( ( A → B ) ˄ ( B → A ) ) ↔ ( A ↔ B )
(((A→B)˄(B→A))↔(A↔B))
d. ( A ˅ B ) ˄ ( B ˅ C ) → ( A ˅ C )
( (( A˅ B) ˄ ( ( B) ˅ C ) ) → ( A ˅C ) )
15. Show that each formula of the previous problem is a tautology.
a.
A
t
t
f
f
( A˄ B ) ↔ A˄ B
B
t
f
t
f
(A˄B)
t
f
f
t
A˄ B
t
f
f
t
( A˄ B) ↔ A˄ B
t
t
t
t
b. A → B ↔ B → A
A
B
A→B
B→ A
A→ B↔ B→ A
t
t
t
t
t
t
f
f
f
t
f
t
f
f
t
f
f
t
t
t
c. ( ( A → B ) ˄ ( B → A ) ) ↔ ( A ↔ B )
A
B
A→B
B→ A
A↔B ((A→B)˄(B→A))↔(A↔B)
t
t
t
t
t
t
t
f
f
f
f
t
f
t
f
f
f
t
f
f
t
t
t
t
d. ( A ˅ B ) ˄ ( B ˅ C ) → ( A ˅ C )
B˅C
A˅C
t
t
t
t
f
t
f
t
f
f
t
t
t
t
t
t
f
f
t
t
t
t
f
f
f
f
f
f
t
f
f
t
f
t
t
f
f
t
f
t
f
f
t
f
t
t
t
t
t
t
A
B
C
t
t
t
t
t
t
A˅B
( A˅ B) ˄ ( B˅ C ) → ( A ˅C )