Predicate logic, Propositional logic and Logical
Reasoning in Computer Science
Propositional logic
- It is also a part of Artificial Intelligence study
- It is about asserting a statement whether it is true or false
based on proved facts and validating it as Boolean result
- Propositional logic can be used for encoding arguments. The
arguments are involved in natural languages.
- It can help validating using truth tables
- Examples are
- “Mango is yellow”
- “Earth is spherical” ,
- 2+2 =4
- In computer science it finds it way as
- digital electronic circuits
- Conditions using loops like for, while , do while switch case ,
if , else, in programming
- Boolean operators in programming
- Database queries
Technical Example
- A :Good televisions are not cheap
- B : Cheap televisions are not good
- C : A implies B
- D : B implies A<>
- E: A is equivalent to B
Result : C, D and E are correct using a truth
table as below explained
a and b are 2 propositions
a : Good televisions
b: cheap televisions
A and B can be expressed as follows
A: a --> ~b
B: b--> ~a
Let u check using Truth table as below
a b ~a ~ b A B
T T F F F F
T F F T T T
F T T F T T
F F T T T T
Since A and B are equal, C, D, E are correct.
Predicate Logic
Predicate logic also part of Artificial Intelligence and it is
the general notation of a property or a characteristic of a subject
referred in a statement
Example:
Create definition and Premises to prove using Predicate
Logic.
L :≡ Labrador ( is a popular breed of a dog)
A (x) :≡ " x is an animal"
M(x) :≡ "x is Mortal"
A(L) - Labrador is a animal
x A(x) -> M(X) - "All animals are mortal"
Result : It is proved that Labrador is
mortal
Logical Resulting
- Logical Reasoning is the key aspect in computer science and
software programming
- Logical reasoning is applied in problem solving
- Logical reasoning is applied in Machine Learning algorithms to
predict a output as true or false based on input variables
- Based on input data , one system can conclude a result
- Computer science uses set of rules , applied by algorithms
using logical reasoning
- Logical reasoning is reaching into conclusions
based on Propositional logic , predicate logic too.
Examples which I explained in above are
applicable to logical reasoning. Let me some more below
- When a fruit is round , big ,depressed on top and red in colour
it can be an apple . Saying apple based on the given data , is the
conclusion as a logical reasoning. This kind of conclusion and
analysis can be done using Machine Learning
algorithms by training the machine with data about fruits
which will group and classify based on their unique features and
with the predefined output as apple, orange or banana etc as part
of Supervised Learning .
- In an Unsupervised Learning, the input
variables will be trained to the machine without output variable as
the machine . So the machine will group the fruits based on its
features like colour (red, yellow, green) and produce an output
variable without seeing it earlier and without predefined output
.