Connect with us

Hi, what are you looking for?

Data Science

Math For Data Science (Propositional Logic) – 1

Math For Data Science (Propositional Logic) - 1
Math For Data Science (Propositional Logic) - 1

In this course, we going to look at propositional logic for data science. I’ll simplify the topics in this course to be don’t complex (I hope going to be useful, math is a really important and difficult subject for according to many)

What Is Propositional Logic?

Propositions are statements that state whether an event is true or false. It is defined as a declarative sentence that is either right or wrong, but not both. True and False logic is used in binary code, for example, 0 is false and 1 is true. The value of a proposition in mathematics can likewise be true or false, never takes any other value 2, 3, 4, etc. any other value to the value of a proposition.

Propositional Sentences And Non Propositional Sentences

Before pass to deep math operations, we should know the difference between propositional and non-propositional sentences.

x:"this is so good"
y:(1 == 1)

In the example above, the first sentence is not a proposition because we cannot answer with true or false (subjective sentences are never proposition.)

The second sentence is a proposition that is correct (Don’t get stuck with the symbols, we’ll look at them again.)

d: "Today weather is rainy"
y:(12 / 2 == 6)
a:(2 ^ 5 == 16)

p:"Is the weather good today"

Above, the first 3 sentences are also suggestions, but the last sentence is not a proposition. Propositional sentences may have an incorrect value. (question phrases can never be propositional sentences)

Symbols For Propositional Logic

We’ll need a few symbols to create propositions. You can’t do them with the keyboard, no problem, these symbols are made easy in programming languages, but today we’re going to look at symbols in math.

 ≡ -> Used to represent a propositional (assignment operator)
!≡ -> Used to show that there is no proposition. (not equivalent sign)
p: -> Used to show the name of the proposition.
~ -> holds the opposite of proposition. ( x: True , ~x: False)
Truth Table Logic

The truth table is consist of row and column, show how the truth or falsity of a proposition changes as its components change. Below, I gave a simple truth table example.

Truth Table

above is a simple truth table. As you can see, every time the value of the proposition changes, too, nonproposition changes.

Truth Table Properties
  • A table consists of at least 2 statements.
  • each statement in the table affects each others. (We going to learn in compound statements)
  • The values ​​in the table are only 0 or 1, in other words, true or false.

In this section, we learned propositional logic, truth tables, propositional symbols, and propositional sentences. In the second part of this tutorial, the topics will become more severe, we will learn about compound propositions, operations in propositions, and morgan’s rule.

I hope it has been helpful and if you find any mistakes, you can post in the comments and I will update the post.

CONGRATULATIONS, YOU PASSED MATH FOR DATA SCIENCE (PROPOSITIONAL LOGIC) – 1

Click to comment

Leave a Reply

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

You May Also Like

Cyber Security

In this article, we are going to examine real-world logic bombs. Also, we are going to create one with Python for seeing how to...

Cyber Security

Welcome to the second tutorial on networks for hackers. We are going to learn network types and weaknesses and strengths of networks in this...

Programming

In this tutorial, we going to learn file handling with Python. At the end of the article, you will be ready to work with...

Cyber Security

In this article, we going to learn how networking works and simple terms in networking. Also, we are going to learn simple network attacks....