0% found this document useful (0 votes)
29 views6 pages

Logic

Ai

Uploaded by

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

Logic

Ai

Uploaded by

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

Note that in the Wumpus environment each case for which the agent draws a

conclusion from the available information, that conclusion is guaranteed to be


correct if the available information is correct. This is a fundamental property of
logical reasoning.
Logic is a system of principles that uses reason to determine if a conclusion is
true or untrue.
we said that knowledge bases consist of sentences. These sentences are
expressed according to the syntax of the representation language, which
specifies all the sentences that are well formed. The notion of syntax is clear
enough in ordinary arithmetic: “x+y = 4” is a well-formed sentence, whereas
“x4y+ =” is not. A logic must also define the semantics, or meaning, of
sentences. The semantics defines the truth of each sentence with respect to each
possible world. For example, the semantics for arithmetic specifies that the
sentence “x+y=4” is true in a world where x is 2 and y is 2, but false in a world
where x is 1 and y is 1. In standard logics, every sentence must be either true or
false in each possible world—there is no “in between.

Propositional logic (PL) is the simplest form of logic where all the statements
are made by propositions. A proposition is a declarative statement which is
either true or false. It is a technique of knowledge representation in logical and
mathematical form.

Example:

1. a) It is Sunday.
2. b) The Sun rises from West (False proposition)
3. c) 3+3= 7(False proposition)
4. d) 5 is a prime number.

o Propositional logic is also called Boolean logic as it works on 0 and 1.


o In propositional logic, we use symbolic variables to represent the logic,
and we can use any symbol for a representing a proposition, such A, B, C,
P, Q, R, etc.
o Propositions can be either true or false, but it cannot be both.
o Propositional logic consists of an object, relations or function, and logical
connectives.
o These connectives are also called logical operators.
o The propositions and connectives are the basic elements of the
propositional logic.
o Connectives can be said as a logical operator which connects two
sentences.
o A proposition formula which is always true is called tautology, and it is
also called a valid sentence.
o A proposition formula which is always false is called Contradiction.
o A proposition formula which has both true and false values is called
o Statements which are questions, commands, or opinions are not
propositions such as "Where is Rohini", "How are you", "What is your
name", are not propositions.

Syntax of propositional logic:

The syntax of propositional logic defines the allowable sentences for the
knowledge representation. There are two types of Propositions:

a. Atomic Propositions

b. Compound propositions

o Atomic Proposition: Atomic propositions are the simple propositions. It


consists of a single proposition symbol. These are the sentences which
must be either true or false.

1. a) 2+2 is 4, it is an atomic proposition as it is a true fact.


2. b) "The Sun is cold" is also a proposition as it is a false fact.
Compound proposition: Compound propositions are constructed by
combining simpler or atomic propositions, using parenthesis and logical
connectives.

Example:

1. a) "It is raining today, and street is wet."


2. b) "Ankit is a doctor, and his clinic is in Mumbai."
Logical Connectives:
Logical connectives are used to connect two simpler propositions or
representing a sentence logically. We can create compound propositions with
the help of logical connectives. There are mainly five connectives, which are
given as follows:

Negation: A sentence such as ¬ P is called negation of P. A literal can be either


Positive literal or negative literal.
Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a
conjunction.
Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called
disjunction, where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.
Implication: A sentence such as P → Q, is called an implication. Implications
are also known as if-then rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example
If I am breathing, then I am alive
P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.

Following is the summarized table for Propositional Logic Connectives:


Truth Table:

In propositional logic, we need to know the truth values of propositions in all


possible scenarios. We can combine all the possible combination with logical
connectives, and the representation of these combinations in a tabular format is
called Truth table. Following are the truth table for all logical connectives:
Truth table with three propositions:

We can build a proposition composing three propositions P, Q, and R. This truth


table is made-up of 8n Tuples as we have taken three proposition symbols.

You might also like