Math For Data Science (Propositional Logic) – 2

In this tutorial, we going to learn logical connectives, operations with propositional, and the De Morgan rule. After this tutorial, we going to pass the final propositional tutorial (The next tutorial will be the end of this topic) then we going to look at clusters.

What Are Logical Connectives?

It is used to connect two conditions, you should read this section very carefully and do train if necessary, the reason for this is that this topic will also in computer programming, if you want to see its syntax in Python, you can read my article.

Before moving on to how we connect the two propositions, let’s look at why we do. If the two propositions will label the same result, in which case we can connect these two propositions.

Logical Connectives

1 – Conjunction

You can link two statements with the “conjunction”. For the result to be true, both statements must have the same value. The symbol is Λ, Below, I gave example for “conjunction”.

p: True
x: True
p Λ x ≡ True

p: False
x: True
p Λ x ≡ False

p: False
x: False
p Λ x ≡ False

As you can see, both values must be the same for a correct result. It is similar to the “And” operator in Python.

 

2 – Disjunction 

If one of the two propositions is true makes the result true. If at least one proposition is true the condition is met. This expression can also be thought of as “Or”.

p: False
x: False
p v x ≡ False

p: True
x: False
p v x ≡ True

 

3 – Exclusive Or

In this structure, the fact that only one proposition is true makes the result true, but both statements must not be true or false at the same time.

p: True
x: True
p ⊻ y ≡ False

p: False
x: True
p ⊻ y ≡ True

 

4 – Implication 

this connector can be thought of as “equals”, making the on the right value equal to the left one. It’s okay if you don’t understand anything from this sentence, it simply assigns the value on the left to the value of the right proposition.

p: True
x: False
p -> x ≡ True # The value of p is now equal to x.

p: False
x: True
p -> x ≡ False

p: True
p -> ~p ≡ True #Since the value of p is true, "~p" is also true.

 

5 – Biconditional 

Used to connect two “Implication” conjunction. Here, two too propositions must true or false for the result to be true.

p: True
x: True
p <-> x ≡ True

p: False
x: True
p <-> x ≡ False
De Morgen Rule
p: True
x: False

~(p v x) v ~(p -> x) # ~ mean this is "not"

According to the De morgan rule we used in the example above, we take the opposite of the values ​​in the parentheses. Let’s take the opposite of the first parenthesis as an example.

~(p v x) ≡ (False Λ True)

we write the opposite of the above values, after understanding the logic, I will give the opposite of conjunctions. Now let’s take the opposite of the second parenthesis.

~(p -> x) ≡ (False -> True)

here we do not change signs, we just take the opposite of the propositions given. Let’s look at the result now. We will look at changing the signs from now on.

First - (False Λ True) v (False -> True)
Second - (False) v (False)
Third - Result: False

We did step by step operations to find the result, now let’s look at changing these signs and exercise to get used to it.

~(p v q) ≡ ~(p Λ q)
~(p Λ q) ≡ ~(p v q)

CONGRATULATIONS, YOU PASSED MATH FOR DATA SCIENCE (PROPOSITONAL LOGIC)  – 2

Leave a Reply

Your email address will not be published. Required fields are marked *