0% found this document useful (0 votes)
50 views42 pages

Ex 1.2 Applications of Propositional Logic

Here are the steps to solve this problem: 1) List the given numbers: 1,3,5,7,41,43 2) Find the pattern: The numbers are increasing by 2 each time with the exception of the jump from 7 to 41. 3) The pattern is odd numbers increasing by 2, with a jump of 34 between 7 and 41. Therefore, the numbers in the list are the odd numbers from 1 to 43, increasing by 2 each time, with a special jump between 7 and 41.

Uploaded by

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

Ex 1.2 Applications of Propositional Logic

Here are the steps to solve this problem: 1) List the given numbers: 1,3,5,7,41,43 2) Find the pattern: The numbers are increasing by 2 each time with the exception of the jump from 7 to 41. 3) The pattern is odd numbers increasing by 2, with a jump of 34 between 7 and 41. Therefore, the numbers in the list are the odd numbers from 1 to 43, increasing by 2 each time, with a special jump between 7 and 41.

Uploaded by

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

Truth table (Example)

1
● Draw truth table of p ∨ (q ∧ r)
● Number of variables = 3
● Number of rows = 23 = 8
Truth table (Example)
2
● Show that p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r)
are logically equivalent
Applications of propositional logic
3

1. Translation of English sentences


2. Inference and reasoning:
– new true propositions are inferred
from existing ones
– Used in Artificial Intelligence:
• Rule based (expert) systems
3. Design of logic circuit
Translation
4

• Step 1 : find logical connectives


• Step 2: break the sentence into basic
propositions
• Step 3: rewrite the sentence in
propositional
logic
Translation
5

● Example: If you are senior citizen and it is a


Tuesday then you can have free coffee
Step 1 : find logical connectives
Translation
6

● Example: If you are senior citizen and it is a


Tuesday then You can have free coffee

Step 1 : find logical connectives


Translation
7

● Example: If you are senior citizen and it is a


Tuesday then you can have free coffee

Step 2: break the sentence into basic


propositions
Translation
8

● Example:
if you are senior citizen and it is a Tuesday then
a b
you can have free coffee
c

Step 2: break the sentence into basic


propositions
Translation
9

● Example:
if you are senior citizen and it is a Tuesday then
a b
you can have free coffee
c

Step 3: rewrite the sentence in propositional


logic
Translation
10

● Example:
if you are senior citizen and it is a Tuesday then
a b
you can have free coffee
c

Step 3: rewrite the sentence in propositional


logic
aɅb→c
Translating English Sentences
11

Example:
“Ali is not wealthy but he is healthy and wise.”
Translating English Sentences
12

Example:
“Ali is not wealthy but he is healthy and wise.”
Translating English Sentences
13

Example:
“Ali is not wealthy but he is healthy and wise.”

h = “Ali is healthy”
w = “Ali is wealthy”
s = “Ali is wise”
Translating English Sentences
14

Example:
“Ali is not wealthy but he is healthy and wise.”

w = “Ali is wealthy”
h = “Ali is healthy”
s = “Ali is wise”

~wɅhɅs
Translating English Sentences
15

Example:
If it is below freezing, it is snowing.
Translating English Sentences
16

Example:
If it is below freezing, it is snowing.
Translating English Sentences
17

Example:
If it is below freezing, it is snowing.

h = it is below freezing
w = it is snowing
Translating English Sentences
18

Example:
If it is below freezing, it is snowing.

h = it is below freezing
w = it is snowing

hw
Translation
19

• Example: You can have free coffee if you are


senior citizen and it is a Tuesday

Step 1 : find logical connectives


Translation
20

• Example: You can have free coffee if you are


senior citizen and it is a Tuesday

Step 1 : find logical connectives


Translation
21

• Example: You can have free coffee if you are


senior citizen and it is a Tuesday

Step 2: break the sentence into


basic
propositions
Translation
22

• Example:
You can have free coffee if you are senior citizen
a b
and it is a Tuesday.
c

Step 2: break the sentence into basic


propositions
Translation
23

• Example:
You can have free coffee if you are senior citizen
a b
and it is a Tuesday.
c
Step 3: rewrite the sentence in propositional
logic
bɅc→a
Logic Circuits
24

• A logic circuit (or digital circuit) receives


input signals p1, p2, . . . , pn, [either 0 (off)
or 1 (on)], and produces output signals
s1, s2, . . . , sn,.
Logic gates
25

● Logic gates are electronic circuits that operate


on one or more input signals and perform basic
operation to produce standard output signal

● building blocks of all the circuits in a computer


NOT Gate (inverter)
26

A A

Input Output

A A

0 1

1 0
Conjunction / AND Gate
27

A
C = A ɅB
B

Inputs Output
A B C = A ɅB
0 0 0
0 1 0
1 0 0
1 1 1
Disjunction /OR gate
28

A
C=AV
B B

Inputs Output

A B C=A VB

0 0 0

0 1 1

1 0 1

1 1 1
Exclusive-OR
(XOR) 29

A C =A
B
B
Inputs Output

A B C =A  B
0 0 0

0 1 1

1 0 1

1 1 0
Example
30

Determine the output for combinatorial circuit

C
Example
31

Determine the output for combinatorial circuit


Output = A Ʌ BVC

AND
A AɅB
A Ʌ BVC
B
C
OR
Example
32

Determine the output for combinatorial circuit

C
Example
33

Determine the output for combinatorial circuit

A
D=~A Ʌ B v C
NOT

B BvC AND

C OR
Class Activity
34

• Determine the output for combinatorial circuit

A
B
Class Activity
35

• Determine the output for combinatorial circuit


A AvB

B

C= AvB  Ʌ ~A Ʌ B

A ɅB ~A Ʌ B AND

AND NOT
Class Activity
36
• Determine the output for combinatorial
circuit
Example
37

• Build a digital circuit that produces the output


A ∧ B ∨C
Example
38

• Build a digital circuit that produces the output


A ∧ B ∨C

AND
A A∧
B
B A ∧ B∨C
C
OR
Example
39

• Build a digital circuit that produces the output


(A ∧ B) V (C ∧ D) V ( E ∧ F)
Example
40

• Build a digital circuit that produces the output


(A ∧ B) V (C ∧ D) V ( E ∧ F)
Class Activity
41

● Write the output of the following circuit

● Build a digital circuit that produces the output


(p ∧ ¬ r) ∨ ( ¬ q ∧ r)
Practice Problems
42

• Q: 1,3,5,7,41,43

You might also like