AI Unit-2
AI Unit-2
(5A24ARI)
• It is Sunday.
• The Sun rises from West (False proposition)
• 3 + 3 = 7 (False proposition)
• 5 is a prime number.
Syntax of propositional logic:
• The allowed sentences for knowledge representation are defined by the syntax of propositional
logic. Propositions are divided into two categories:
Atomic Propositions.
Compound propositions.
• Atomic propositions: Simple assertions are referred to as atomic propositions. It is made up of
only one proposition sign. These are the sentences that must be true or untrue in order to pass.
Example:
• 2+2 is 4, it is an atomic proposition as it is a true fact.
• "The Sun is cold" is also a proposition as it is a false fact.
• Compound proposition: Simpler or atomic statements are combined with parenthesis and logical
connectives to form compound propositions.
Example:
• "It is raining today, and street is wet."
• "Ankit is a doctor, and his clinic is in Mumbai."
Basic facts about propositional logic:
• Because it operates with 0 and 1, propositional logic is also known as Boolean logic.
• In propositional logic, symbolic variables are used to express the logic, and any symbol
can be used to represent a proposition, such as A, B, C, P, Q, R, and so on.
• Propositions can be true or untrue, but not both at the same time.
• An object, relations or functions, and logical connectives make up propositional logic.
• Logical operators are another name for these connectives.
• The essential parts of propositional logic are propositions and connectives.
• Connectives are logical operators that link two sentences together.
• Tautology, commonly known as a legitimate sentence, is a proposition formula that is
always true.
• Contradiction is a proposition formula that is always false.
• Statements that are inquiries, demands, or opinions are not propositions, such
as "Where is Rohini","How are you", and "What is your name" are not propositions.
Logical Connectives
• Logical connectives are used to link two simpler ideas or to logically represent
a statement. With the use of logical connectives, we can form compound
assertions. There are five primary connectives, which are listed below
1) Negation: A statement like ¬P is referred to as a negation of P. There are
two types of literals: positive and negative literals.
Example: Rohan is intelligent and hardworking. It can be written as,
P = Rohan is intelligent,
Q = Rohan is hardworking. What is then -P ?, -Q ?
2) Conjunction:A conjunction is a sentence that contains ∧ connective such
as, P ∧ Q.
Example: "Ritika is a girl and Engineer",
Here P = Ritika is a girl. Q = Ritika is Engineer, so we can write it as P ∧ Q.
3) Disjunction: A disjunction is a sentence with a connective ∨ , such as
P ∨ Q, where P and Q are the propositions.
4) Implication: An implication is a statement such as P → Q. If-then
rules are another name for implications. It can be expressed as follows:
If it rains, the street is flooded.
Because P denotes rain and Q denotes a wet street, the situation is
written as P and Q
5) Biconditional: A sentence like P Q, for example, is a biconditional
sentence. I am alive if I am breathing.
P= I am breathing, Q = I am alive, it can be represented as P ⇔ Q.
Following is the summarized Truth table for Propositional Logic
Connectives
Precedence of connectives:
Precedence Operators
•This is not possible to represent relations like ALL, some, or none with
propositional logic. Example:
•All the girls are intelligent.
•Some apples are sweet.
•The expressive power of propositional logic is restricted.
•We can't explain propositions in propositional logic in terms of their qualities or
logical relationships.
Predicate Logic:
• In monotonic reasoning, once the conclusion is taken, then it will remain the
same even if we add some other information to existing information in our
knowledge base. In monotonic reasoning, adding knowledge does not
decrease the set of prepositions that can be derived.
• To solve monotonic problems, we can derive the valid conclusion from the
available facts only, and it will not be affected by new facts.
• Monotonic reasoning is not useful for the real-time systems, as in real time,
facts get changed, so we cannot use monotonic reasoning.
• Monotonic reasoning is used in conventional reasoning systems, and a logic-
based system is monotonic.
• Any theorem proving is an example of monotonic reasoning.
Example: Earth revolves around the Sun.
• It is a true fact, and it cannot be changed even if we add another sentence in
knowledge base like, "The moon revolves around the earth" Or "Earth is not
round," etc.
Advantages of Monotonic Reasoning:
• In monotonic reasoning, each old proof will always remain valid.
• If we deduce some facts from available facts, then it will remain valid for always.
Disadvantages of Monotonic Reasoning:
• We cannot represent the real world scenarios using Monotonic reasoning.
• Hypothesis knowledge cannot be expressed with monotonic reasoning, which
means facts should be true.
• Since we can only derive conclusions from the old proofs, so new knowledge
from the real world cannot be added.
Non-monotonic Reasoning