Discrete Structures
Lecture Notes, 29 Sep 2010
Last Update: 29 September 2010
Note:
or
material is highlighted
|
Note: A username and password may be required to access certain
documents.
Please
contact
Bill Rapaport.
Index to all lecture notes
…Previous lecture
§1.5: Rules of Inference
- Artificial intelligence (AI) is the branch of computer science
concerned with computational theories of cognition.
- Knowledge representation and reasoning (KRR) is the branch
of AI concerned with how to:
- represent information (what we've done so
far)
- in a formal language that can be handled by a
computer
- & reason with that information
(as represented in that language)
- Reasoning involves constructing & verifying
"arguments" or "proofs"…
- …which are used:
- to answer questions
- & to give reasons for the answers
- E.g.: How can you pass this course?
(Or: Why didn't I pass this course?)
Possible answer:
- If you get a passing grade in all assignments,
then you will pass the course. (premise 1)
- You get a passing grade. (premise 2)
- ∴ You pass. (conclusion)
This is called an "argument"
(in the sense of a legal argument,
not a yelling match)
-
Let p = "You get a passing grade in all assignments."
Let q = "You (will) pass the course".
Then the form of this argument can be shown by the following
sequence of propositions:
(p → q)
premise 1
p
premise 2
∴ q
conclusion
This "argument form" is also called a "rule of inference"
-
Consider a truth table for this argument:
prem 2 | conc | prem 1 |
p | q | (p→q) |
T | T | T |
T | F | F |
F | T | T |
F | F | T |
Note that row 1 is the only row where both premises are T.
In that row, the conclusion is also T.
- The name of this rule of inference (or basic argument form) is
modus ponens (MP) (Latin for "method of affirmation (of the
antecedent)")
- When is an argument a "good" argument?
- There are 2 separate conditions for goodness:
- logical goodness
- factual goodness
- Def:
An argument from premises
P1, …, Pn
to conclusion C
a sequence of propositions 〈P1, …, Pn, C〉,
where C is alleged to follow logically from
the Pi.
- Def:
An argument (or: an argument form) is (semantically)
valid (= "logically good")
it is truth-preserving.
i.e., if all of its premises are T,
then its conclusion must be T
or: it is impossible for all of its premises to be
simultaneously T, yet its conclusion is F.
- Def:
A proof isdef a valid argument.
- How can you tell if an argument is truth-preserving?
- An argument is truth-preserving (or: is a proof)
it is an argument in which each proposition
Pi or conclusion C is either:
- a tautology (hence T)
- a "premise"
- (premises can be logically contingent
but they are assumed to be T)
- or follows validly from previous
propositions in the sequence
by one or more rules of inference
- (and—because they are valid argument forms—each rule of inference is itself
truth-preserving)
- Note the recursion:
- Base Case = propositions assumed to be T
- Recursive Case = "sub-proofs" based on valid
(truth-preserving) rules of inference
- Another rule of inference: Hypothetical Syllogism (HS)
(A → B)
(B → C)
∴ (A → C)
You should construct a truth table to convince yourself that this is
truth-preserving, hence valid.
Notes:
- "syllogism" is just an old-fashioned word for
"argument"
- This can also be called "transitivity of →"
- Here is a more complex e.g. of an argument:
If you pass all assignments, then you pass the course.
If you pass the course, then you'll be successful in life.
You pass the course.
∴ You'll be successful in life.
Is this valid?
We can prove validity by syntactically deriving all
"intermediate" conclusions:
- First, let's symbolize the argument:
Let p = You pass all assignments.
Let q = You pass the course.
Let r = You'll be successful in life.
Then:
P1: (p → q)
P2: (q → r)
P3: p
C : ∴ r
- Proof of validity:
(compare this to a computer program with line numbers
and comments)
line num |
proposition |
comment mark |
justification |
1. |
(p → q) |
: | Prem P1 |
2. |
(q → r) |
: | Prem P2 |
3. |
(p → r) |
: | From lines 1,2; by HS |
4. |
p |
: | Prem P3 |
5. |
r |
: | From lines 3,4; by MP |
- Alternative proof:
(Just as you can write more than one program to accomplish
the same task(have the same input-output behavior),
you can also write more than one proof of an argument.)
- (p → q) : P1
- p : P3
- q : 1,2; MP
- (q → r) : P2
- r : 3,4; MP
- But is this really a good argument?
Next lecture…
Text copyright © 2010 by William J. Rapaport
(rapaport@buffalo.edu)
Cartoon links and screen-captures appear here for your enjoyment.
They are not meant to infringe on any copyrights held by the creators.
For more information on any cartoon, click on it, or contact me.
http://www.cse.buffalo.edu/~rapaport/191/F10/lecturenotes-20100929.html-20100928-2