0% found this document useful (0 votes)
16 views86 pages

Unit 3

Uploaded by

hefeke8164
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views86 pages

Unit 3

Uploaded by

hefeke8164
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

ARTIFICIAL

INTELLIGENCE
UNIT-3
HOW AI TECHNIQUES HELP COMPUTERS TO
BE SMARTER?
▪ Computers can not have experience but it can study and learn.
▪ For this it should have knowledge.
▪ What is knowledge?
▪ Knowledge is more than simply data or information.
▪ Knowledge consists of
▪ Facts
▪ Concepts
▪ Theories
▪ Procedure and relationship between them
All these entities form knowledge base

2
HOW AI TECHNIQUES HELP COMPUTERS TO
BE SMARTER?
▪ When AI techniques(Search Techniques) are applied to this database, a smarter
computer results.
▪ This smarter computer can reason, take decision, make judgement, etc.

3
HOW AI TECHNIQUES HELP COMPUTERS TO
BE SMARTER?

▪ The art of performing these actions collectively is the aim of AI


and is called cognitive science.

4
AI TECHNIQUES (SEARCH KNOWLEDGE)
▪ Knowledge can be defined as the body of facts and principles accumulated by
humankind or the act, fact or state of knowing.
▪ Example, knowledge stored in complex structures of interconnected neurons. The
structures correspond to symbolic representations of the knowledge possessed by the
organisms, the facts, rules, and so on.
▪ Types:
1. Procedural or Operational Knowledge
▪ Steps to solve quadratic equation
2. Declarative or Relational Knowledge
▪ Facts about the world
3. Heuristic Knowledge
▪ Tricks, strategy, experience to simplify the solution to problems.

5
KNOWLEDGE BASED SYSTEM (KBS)
▪ Those systems that depend on a rich base of knowledge to perform difficult tasks
are known as Knowledge based Systems
▪ Three main Components of KBS
1. Input-Output Unit
2. Inference Control Unit
3. Knowledge Base

6
KBS COMPONENTS

7
KBS - INFERENCE ENGINE
▪ It is the component of the system that applies logical rules to the knowledge base to
deduce new information
▪ Two modes:
1. Forward chaining: starts with the known facts and asserts new facts
2. Backward chaining: starts with goals and works backward to determine what facts must be
asserted so that the goals can be achieved.
▪ Example of Forward Chaining,
▪ B: The road is wet
▪ A=>B If it is raining, the road is wet
▪ A: It is raining

▪ Example of Backward Chaining,


▪ A: It is raining
▪ A=>B If it is raining, the road is wet
▪ B: The road is wet

8
KBS
▪ Heuristic rather than algorithmic
▪ Highly specific domain Knowledge
▪ Knowledge is separated from how it is used
▪ KBS = knowledge-base + inference engine

9
10
HOW TO ACQUIRE KNOWLEDGE?
▪ Knowledge may be acquired from sources like textbooks, references, reports,
technical research papers and so on and to be useful, it should be accurate,
complete, inconsistent and so on.
▪ KBS depends on a high quality knowledge for their success.

11
EXAMPLES OF KBSS
(1) DENDRAL (chemical)
▪ DENDRAL infers Molecular structure given mass spectral Data
▪ Expert System
▪ Like expert Chemist
(2) MYCIN (medicine)
▪ Assist internists in diagnosis and treatment of infectious diseases
▪ Given patient data(incomplete & inaccurate) MYCIN gives interim indication of
organisms that are most likely causes of infection & drugs to control disease.

12
WHAT IS AN EXPERT SYSTEM?
▪ “An expert system is a computer system that emulates, or acts in all respects, with
the decision-making capabilities of a human expert.”
▪ Expert Systems = knowledge-based systems = knowledge-based expert systems

13
WHAT IS AN EXPERT SYSTEM?
▪ The basic idea is that if a human expert can specify the steps of reasoning by which
a problem may be solved, so too can an expert system.
▪ Restricted domain expert systems (extensive use of specialized knowledge at the
level of human expert) function well which is not the case of general-purpose
problem solver.

14
PROMINENT EXPERT SYSTEMS
▪ MYCIN – used to diagnose infectious blood diseases and recommend
antibiotics.
▪ DENDRAL – embedded a chemist’s knowledge of mass spectrometry
rules to use in analysis.
▪ CADUCEUS – used to analyze blood-borne infectious bacteria
▪ CLIPS and Prolog programming languages are both used in expert
systems
▪ The Age of Empire game uses CLIPS to control its AI

15
EXPERT SYSTEM MAIN COMPONENTS
▪ Knowledge base – obtainable from books, magazines, knowledgeable persons,
etc.; or expertise knowledge. Knowledge base of an expert system contains both
behavioral and procedural knowledge.
▪ Inference engine – draws conclusions from the knowledge base.

16
BASIC EXPERT SYSTEM ARCHITECTURE

17
PROBLEM DOMAIN VS. KNOWLEDGE DOMAIN
▪ In general, the first step in solving any problem is defining the problem area or
domain to be solved.
▪ An expert’s knowledge is specific to one problem domain – medicine, finance,
science, engineering, etc.
▪ The expert’s knowledge about solving specific problems is called the knowledge
domain.
▪ The problem domain is always a superset of the knowledge domain.
▪ Expert system reasons from knowledge domain.
▪ Example: infections diseases diagnostic system does not have (or require)
knowledge about other branches such as surgery.

18
PROBLEM AND KNOWLEDGE DOMAIN
RELATIONSHIP

19
ADVANTAGES OF EXPERT SYSTEMS
▪ Increased availability: on suitable computer hardware
▪ Reduced cost
▪ Reduced danger: can be used in suitable environment.
▪ Permanence: last for ever, unlike human who may die, retire, quit.
▪ Multiple expertise:
▪ Increased reliability

20
ADVANTAGES OF EXPERT SYSTEMS
▪ Explanation: explain in detail how arrived at conclusions.
▪ Fast response: (e.g. emergency situations).
▪ Steady, unemotional, and complete responses at all times: unlike human who may
be inefficient because of stress or fatigue.
▪ Intelligent tutor: provides direct instructions (student may run simple programs
and explaining the system’s reasoning).
▪ Intelligent database: access a database intelligently (e.g. data mining).

21
BUILDING AN EXPERT SYSTEM
▪ Can be built from scratch – using lots of if-then-else statements.
▪ There are many products being sold to make programming these systems easier.
▪ A few that I’m aware of:
▪ Exsys – www.exsys.com – provides an easy to use user interface to develop traditional
applications or web-based solutions.
▪ Barisoft – www.barisoft.com – developed by a PSU professor and finely tuned by his students
▪ CLIPS - provides a complete environment for the construction of rules and/or object based expert
systems
▪ Jess – the Rule Engine, built on top of CLIPS, for the Java Platform

22
EXPERT SYSTEM ARCHITECTURE
▪ There are many architectures, on which expert systems are built upon.
1. Ruled based system architecture - is used in expert and other types of
knowledge based system in the production systems also called as rule base
system.
2. Non production system architecture

23
RULED BASED SYSTEM ARCHITECTURE
▪ Rule bases system is same as the production system.
▪ When we creating and maintain the production system and find initial state to goal
state then rule base system is used.
▪ Learning module and history file are not common components of expert systems
when they are provided they are used to assist in building and refining the
knowledge base.

24
STRUCTURE OF A RULE-BASED EXPERT
SYSTEM ARCHITECTURE

25
HOW EXPERT SYSTEMS WORK
▪ The strength of an ES derives from its knowledge base - an organized collection of
facts and heuristics about the system's domain.
▪ An ES is built in a process known as knowledge engineering, during which
knowledge about the domain is acquired from human experts and other sources by
knowledge engineers.
▪ The accumulation of knowledge in knowledge bases, from which conclusions are to
be drawn by the inference engine, is the hallmark of an expert system.

26
USER INTERFACE
▪ User interface provides interaction between user of the ES and the ES
itself. It is generally Natural Language Processing so as to be used by
the user who is well-versed in the task domain. The user of the ES need
not be necessarily an expert in Artificial Intelligence.
▪ It explains how the ES has arrived at a particular recommendation. The
explanation may appear in the following forms −
▪ Natural language displayed on screen.
▪ Verbal narrations in natural language.
▪ Listing of rule numbers displayed on the screen.

27
REQUIREMENTS OF EFFICIENT ES USER
INTERFACE
▪ The user interface makes it easy to trace the credibility of the deductions.
▪ It should help users to accomplish their goals in shortest possible way.
▪ It should be designed to work for user’s existing or desired work practices.
▪ Its technology should be adaptable to user’s requirements; not the other way
round.
▪ It should make efficient use of user input.

28
KNOWLEDGE REPRESENTATION AND THE
KNOWLEDGE BASE
▪ The knowledge base of an ES contains both factual and heuristic knowledge.
▪ Knowledge representation is the method used to organize the knowledge in the
knowledge base.
▪ Knowledge bases must represent notions as actions to be taken under
circumstances, causality, time, dependencies, goals, and other higher-level
concepts.

29
METHODS OF KNOWLEDGE
REPRESENTATION
▪ Propositional Logic
▪ Predicate Logic or FOL(First Order Predicate Logic)
▪ Semantic Net
▪ Scripts
▪ Frame
▪ Conceptual Dependency Network
▪ Production Rules
▪ etc…

30
PRODUCTION RULES
▪ Production rules are the most common method of knowledge representation used
in business.
▪ Rule-based expert systems are expert systems in which the knowledge is
represented by production rules.
▪ A production rule, or simply a rule, consists of an IF part (a condition or premise)
and a THEN part (an action or conclusion). IF condition THEN action (conclusion).

31
RULE BASED PRODUCTION SYSTEMS
▪ Production system - uses knowledge in the form of rules to provide diagnoses or
advice on the basis of input data.
▪ Parts
▪ Database of rules (knowledge base)
▪ Database of facts
▪ Inference engine which reasons about the facts using the rules

32
PRODUCTION SYSTEM
▪ A production system is a model of computation that provides pattern-directed search
control using a set of production rules, a working memory, and a recognize-act cycle.

▪ The productions are rules of the form C → A, where the LHS is known as the condition
and the RHS is known as the action. These rules are interpreted as follows: given
condition, C, take action A. The action part can be any step in the problem solving process.
The condition is the pattern that determines whether the rule applies or not.

33
PRODUCTION SYSTEM
▪ Working memory contains a description of the current state of the world in the
problem-solving process. The description is matched against the conditions of the
production rules. When a conditions matches, its action is performed. Actions are
designed to alter the contents of working memory.

▪ The recognize-act cycle is the control structure. The patterns contained in


working memory are matched against the conditions of the production rules, which
produces a subset of rules known as the conflict set, whose conditions match the
contents of working memory. One (or more) of the rules in the conflict set is
selected (conflict resolution) and fired, which means its action is performed. The
process terminates when no rules match the contents of working memory.

34
CONFLICT RESOLUTION
▪ Problem: more than one rule fires at once
▪ Conflict resolution strategy decides which conclusions to use.
▪ Give rules priorities and to use the conclusion that has the highest priority.
▪ Apply the rule that was most recently added to the database.

35
EXAMPLE
String Rewriting
▪ Suppose we have the following set of productions:

➢ 1. ba → ab
➢ 2. ca → ac
➢ 3. cb → bc

▪ A production matches if its LHS matches any portion of the string in working
memory. The conflict resolution rule in this example is to choose the lowest
numbered rule.

36
EXPLANATION MODULE
▪ The explanation facility explains how the system arrived at the recommendation.
▪ Depending on the tool used to implement the expert system, the explanation may
be either in a natural language or simply a listing of rule numbers.

37
INFERENCE ENGINE
▪ The inference engine:
▪ 1. Combines the facts of a specific case with the knowledge contained in the
knowledge base to come up with a recommendation. In a rule-based expert
system, the inference engine controls the order in which production rules are
applied and resolves conflicts if more than one rule is applicable at a given time.
This is what are reasoning amounts to in rule-based systems.
▪ 2. Directs the user interface to query the user for any information it needs for
further inferencing.
▪ The facts of the given case are entered into the working memory, which acts as a
blackboard, accumulating the knowledge about the case at hand. The inference
engine repeatedly applies the rules to the working memory, adding new
information (obtained from the rules conclusions) to it, until a goal state is
produced or confirmed.

38
STRATEGIES OF INFERENCE ENGINE
▪ Inferencing engines for rule-based systems generally work by either forward or
backward chaining of rules. Two strategies are:
1. Forward chaining
2. Backward chaining

39
FORWARD CHAINING
▪ Forward chaining is a data-driven strategy.
▪ The inferencing process moves from the facts of the case to a goal (conclusion).
The strategy is thus driven by the facts available in the working memory and by the
premises that can be satisfied.
▪ The inference engine attempts to match the condition (IF) part of each rule in the
knowledge base with the facts currently available in the working memory. If
several rules match, a conflict resolution procedure is invoked; for example, the
lowest-numbered rule that adds new information to the working memory is fired.
The conclusion of the firing rule is added to the working memory.
▪ Forward-chaining systems are commonly used to solve more open-ended
problems of a design or planning nature, such as, for example, establishing the
configuration of a complex product.

40
FORWARD CHAINING

41
BACKWARD CHAINING
▪ Backward chaining is the inference engine attempts to match the assumed
(hypothesized) conclusion - the goal or sub goal state - with the conclusion (THEN)
part of the rule. If such a rule is found, its premise becomes the new sub goal. In an
ES with few possible goal states, this is a good strategy to pursue.
▪ If a hypothesized goal state cannot be supported by the premises, the system will
attempt to prove another goal state. Thus, possible conclusions are review until a
goal state that can be supported by the premises is encountered.
▪ Backward chaining is best suited for applications in which the possible conclusions
are limited in number and well defined. Classification or diagnosis type systems, in
which each of several possible conclusions can be checked to see if it is supported
by the data, are typical applications.

42
BACKWARD CHAINING

43
INFERENCE PROCESS
▪ The inference engine accepts user input queries and responses to questions
through the I/O interface and uses this dynamic information together with the static
knowledge (the rules and facts) stored in the knowledge base.
▪ The knowledge in the knowledge base is used to derive conclusions about the
current case or situation as presented by the user’s input.
▪ The inferring process is carried out recursively in three stages:
▪ Match
▪ Select
▪ Execute

44
REASONING WITH PRODUCTION RULES
▪ The statements forming the conditions, or the conclusions, in such rules, may be
structures, following some syntactic convention (such as three items enclosed in
brackets).

45
REASONING WITH PRODUCTION RULES
▪ Very often, these structures will include variables - such variables can, of course,
be given a particular value, and variables with the same name in the same rule will
share the same value.

46
REASONING WITH PRODUCTION RULES
▪ For example (assuming words beginning with capital letters are variables, and
other words are constants):
if [Person, age, Number] &
[Person, employment, none] &
[Number, greater_than, 18] &
[Number, less_than, 65]
then [Person, can_claim,
unemployment_benefit].

47
REASONING WITH PRODUCTION RULES
Architecture of a typical production
system:

observed data

working
select memory modify

rule
Inference
memory fire output
engine
48
REASONING WITH PRODUCTION RULES

Architecture
Architectureofofaatypical
typicalproduction
production
system:
system:
New information

working
select memory modify

rule
interpreter
memory fire output
49
REASONING WITH PRODUCTION RULES

Architecture
Architectureofofaatypical
typicalproduction
production
system:
system:
New information

select working
memory modify

rule
interpreter
memory fire output
50
REASONING WITH PRODUCTION RULES

Architecture
Architectureofofaatypical
typicalproduction
production
system:
system:
New information

working
select memory modify

Inference
rule engine
memory output
fire executes
51
actions
REASONING WITH PRODUCTION RULES

Architecture of a typical production


system:
New information

working
select memory modify

Inference
rule engine
memory
fire executes output
52
actions
REASONING WITH PRODUCTION RULES

Architecture of a typical production


system:
New information

select working
memory modify

rule
interpreter
memory fire output
53
REASONING WITH PRODUCTION RULES

54
Architecture of a typical production
system:
New information

working
select memory modify

Inference
rule engine
memory executes
fire output
actions 55
RESOLUTION PRINCIPLE

56
REFUTATION
▪ Resolution produces proofs by refutation
▪ In other words, to prove a statement, resolution attempts to show that the negation
of the statement produces a contradiction with the known statements.

57
EXAMPLE OF RESOLUTION

58
STEPS:
▪ Negate the statement to be proved
▪ Convert given facts into FOL
▪ Convert FOL into CNF
▪ Draw Resolution graph/tree

59
PROOF WITH RESOLUTION RULE:
▪ Set of expression F
▪ Prove: P
▪ Procedure:
1. Convert F into clauses.
2. Take ¬P, convert ¬P into clauses. Add to result
of Step 1.
3. Apply resolution rule to produce empty set, i.e.,
find a contradiction.

60
UNIFICATION
▪ Any substitution that makes two or more expression equal is called a unifier for the
expression.
▪ Two formulas unify if they can be made identical
▪ A unification is a function that assigns bindings to variables
▪ A binding is either a constant, a functional expression or another variable.

61
EXAMPLE
▪ 𝑃 𝑥, 𝑥 𝑃 𝐴, 𝐴 𝑥/𝐴
▪ 𝑃 𝑥, 𝑥 𝑃 𝐴, 𝐵 𝑓𝑎𝑖𝑙
▪ 𝑃 𝑥, 𝑦 𝑃 𝐴, 𝐵 𝑥/𝐴 , 𝑦Τ𝐵
▪ 𝑃 𝑥, 𝑦 𝑃 𝐴, 𝐴 𝑓𝑎𝑖𝑙
▪ 𝑃 𝑥, 𝑦 𝑃 𝐴, 𝑧 𝑥/𝐴 , 𝑦Τ𝑧

62
UNIFICATION ALGORITHM

63
SOLVE: EXAMPLE

64
65
FOL INTO CNF
▪ Eliminate -> (implies) & <-> (double implies)

▪ 𝑎 → 𝑏 𝑠𝑜 ¬𝑎 ∨ 𝑏

▪ 𝑎 ⇔ 𝑏 𝑠𝑜 𝑎 → 𝑏 ∧ 𝑏 → 𝑎
▪ Move ¬ inwards
▪ ¬ ∀𝑥𝑃 = ∃𝑥¬𝑃
▪ ¬ ∃𝑥𝑃 = ∀𝑥¬𝑃
▪ ¬ 𝑎 ∨ 𝑏 = ¬𝑎 ∧ ¬𝑏
▪ ¬ 𝑎 ∧ 𝑏 = ¬𝑎 ∨ ¬𝑏
▪ ¬¬𝑎 = 𝑎

▪ Rename Variable
▪ Replace Existential quantifier by skolem constant
▪ ∃𝑥 𝑅𝑖𝑐ℎ 𝑥 = 𝑅𝑖𝑐ℎ(𝐺1)

▪ Drop Universal Quantifier

66
EXAMPLE: PROBLEM STATEMENT
1. Ravi likes all kind of food
2. Apples and Chicken are food
3. Anything anyone eats and is not killed is food
4. Ajay eats peanuts and still alive
5. Rita eats everything that Ajay eats
▪ Prove by resolution that Ravi likes Peanuts using Resolution

67
CONVERTING GIVEN STATEMENT INTO
PREDICATE LOGIC
1.x : food ( x) → likes( Ravi, x)
2. food (apple)  food (chicken)
3.ab : eats(a, b)  killed (a ) → food (b)
4.eats( Ajay, Peanuts)  alive( Ajay )
5.e : killed (e) → alive(e)
6.d : alive(d ) → killed (d )
7.c : eats( Ajay, c) → eats( Rita, c)
Conclusion : likes( Ravi, Peanuts)

68
CONVERT INTO CNF
1.food ( x)  likes( Ravi, x)
2. food (apple)
3. food (chicken)
4.eats(a, b)  killed (a )  food (b)
5.eats( Ajay, Peanuts)
6.alive( Ajay )
7.killed (e)  alive(e)
8.alive(d )  killed (d )
9.eats( Ajay, c)  eats( Rita, c)
Conclusion : likes( Ravi, Peanuts)
69
NEGATE CONCLUSION
likes( Ravi, Peanuts)

70
RESOLUTION TREE

71
EXAMPLE
1. Hari likes all kind of food
2. Apples and bananas are food
3. Anything anyone eats and is not killed is food
4. Ajay eats peanuts and still alive
5. Hari eats everything Ram eats
▪ Prove that Hari likes Peanuts

72
FOL x : food ( x) → likes( Hari, x)
food (apple)
food (chicken)
xy : eats( x, y )  killed ( x) → food ( y )
eats( Ajay, Peanuts)  alive( Ajay )
x : killed ( x) → alive( x)
x : alive( x) → killed ( x)
x : eats( Ram, x) → eats( Hari, x)

73
PROVE
▪ Want to prove

likes( Hari, Peanuts)

74
EXAMPLE
1. Mann only likes easy courses.
2. IT courses are hard.
3. All the courses in the CE department are easy.
4. AI is a course in CE.
5. Derive: What course would Mann like?

75
EXAMPLE: (FOL FORM)
1. forall x easy(x) -> likes(Mann,x)
2. forall x ITCourse(x) -> ~easy(x)
3. forall x CECourse(x) -> easy(x)
4. CECourse(AI)
▪ The conclusion is encoded as likes(Mann,x).

76
SOLUTION (FOL TO CNF FORM):
(1) ~easy(x) V likes(mann,x)
(2) ~ITCourse(x) V ~easy(x)
(3) ~CECourse(x) V easy(x)
(4) CECourse(AI)
(5) ~likes(mann,x)

77
SOLUTION (RESOLUTION):
(1) ~easy(x) V likes(mann,x)
(2) ~ITCourse(x) V ~easy(x)
(3) ~CECourse(x) V easy(x)
(4) CECourse(AI)
(5) ~likes(mann,x)
(6) ~easy(x). (From 1&5)
(7) ~CECourse(x). (From 3&6)
(8) Empty clause (From 4&7, x/AI);

78
SOLUTION (RESOLUTION):
▪ the substitution x/ AI is produced by the unification algorithm which says that the
only wff (well formed formula) of the form likes(mann,x) which follows from the
premises is likes(mann, AI).
▪ Thus, resolution gives us a way to find additional assumptions (in this case x= AI)
which make our theorem true.

79
▪ Consider the following statements:
▪ a) Anyone passing his AI exams and winning the lottery is happy.
▪ b) Anyone who studies or is lucky can pass his AI exam.
▪ c) Ravi did not study but he is lucky.
▪ d) Anyone who is lucky wins the lottery.
▪ Prove that Ravi is happy! using resolution tree.

80
▪ Step 1: First-Order Predicate Logic representation:

1. ∀𝑥 (𝑝𝑎𝑠𝑠AI𝐸𝑥𝑎𝑚 𝑥 ∧ 𝑤𝑖𝑛𝑠𝐿𝑜𝑡𝑡𝑒𝑟𝑦 𝑥 → ℎ𝑎𝑝𝑝𝑦(𝑥))

2. ∀𝑥 (𝑠𝑡𝑢𝑑𝑖𝑒𝑠 𝑥 ∨ 𝑙𝑢𝑐𝑘𝑦 𝑥 → 𝑝𝑎𝑠sAI𝐸𝑥𝑎𝑚(𝑥))

3. ¬𝑠𝑡𝑢𝑑𝑖𝑒𝑠(Ravi) ∧ 𝑙𝑢𝑐𝑘𝑦(Ravi)

4. ∀𝑥 (𝑙𝑢𝑐𝑘𝑦 𝑥 → 𝑤𝑖𝑛𝑠𝐿𝑜𝑡𝑡𝑒𝑟𝑦(𝑥))

81
▪ Step 2: Conversion to Conjunctive Normal Form (CNF) without quantifiers:
▪ 1. (¬passAIExam(y) ∨ ¬winsLottery(y) ∨ happy(y))
▪ 2. ¬studies(z) ∨ passAIExam(z)
▪ 3. ¬lucky(z) ∨ passAIExam(z)
▪ 4. ¬studies(Ravi)
▪ 5. lucky(Ravi)
▪ 6. (¬lucky(w) ∨ winsLottery(w))

82
The rules of inference Page 66
Rule of inference Tautology Name
p→q
p [ p  ( p → q)] → q Modus ponens
q
q
p→q [q  ( p → q )] → p Modus tollen
 p
p→q
q→r [( p → q)  (q → r )] → ( p → r ) Hypothetic al syllogism
p→r
pq
p (( p  q)  p) → q Disjunctiv e syllogism
q
p
p → ( p  q) Addition
pq
pq
( p  q) → p Simplifica tion
p
p
q (( p)  (q)) → ( p  q ) Conjunctio n
pq
pq
p  r [( p  q)  (p  r )] → ( p  r ) Resolution 83
q  r
Using the rules of inference to build arguments An example

1. It is not sunny this afternoon and it is colder than yesterday.


2. If we go swimming it is sunny.
3. If we do not go swimming then we will take a canoe trip.
4. If we take a canoe trip then we will be home by sunset.
5. We will be home by sunset

p It is sunny this afternoon 1.  p  q


q It is colder than yesterday 2. r → p
r We go swimming
3.  r → s
s We will take a canoe trip
t We will be home by sunset (the conclusion) 4. s → t
5. t

propositions hypotheses
84
Using the rules of inference to build arguments An example
1.  p  q
p It is sunny this afternoon
q It is colder than yesterday
2. r → p
r We go swimming 3.  r → s
s We will take a canoe trip 4. s → t
t We will be home by sunset (the conclusion)
5. t
Step
Step Reason
Reason
Reason
1. 
pp 
 qq Hypothesis
Hypothesis
Hypothesis Rule of inference
p→q
Tautology Name

p [ p  ( p → q)] → q Modus ponens

2. p Simplifica
Simplification
tionusing
using(1)
(1) q
q

r→p
p→q [q  ( p → q )] → p Modus tollen
3. Hypothesis
Hypothesis  p
p→q

4. r Modus
Modustollens
tollensusing
using(2)
(2)and
and(3)
(3) q→r
p→r
[( p → q)  (q → r )] → ( p → r ) Hypothetic al syllogism

pq
5. r → s Hypothesis p (( p  q)  p) → q Disjunctiv e syllogism
q

6. s Modus ponens using (4) and (5) p


pq
p → ( p  q) Addition

pq
7. s→t Hypothesis p
p
( p  q) → p Simplifica tion

q (( p)  (q)) → ( p  q ) Conjunctio n
8. t Modus ponens using (6) and (7) pq
pq
85
p  r [( p  q)  (p  r )] → ( p  r ) Resolution
q  r
THANKS!

86

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy