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

Programming

This article was created for those who want to use functional programming in their career or who are learning new programming paradigms. We will...

Programming

Functions are pieces of code that combine the integrity of the code used to perform a task into a single structure. If you are...

Programming

Computers can solve an event in different ways, we call these ways algorithms, each algorithm works differently from the others and has different processing...

Data Science

SQL (Structured Query Language) is one of the most used tools by data scientists, data analysts, and data engineers. Almost all companies use a...