Discrete Math: Propositional Logic

Ron McFarland PhD
7 min readJan 4, 2023

--

Discrete Math: Truth Table

As my promise to all Computer Science and Information Technology students who have contacted me, I am writing a small series of introductory articles on Discrete Math. As I’ve noted in other posts, Discrete Math is an essential skill for learners of Computer Science and Information technology.

An overview of Propositional Logic

Discrete math includes the following areas, as each is applied in CS/IT (skip this section and move to the next section if you’ve read my other works on Discrete Math, as this is duplicated for those who have ‘entered’ into the conversation at this point). Discrete math involves:

· Graph Theory: One of the main areas of study in discrete mathematics is graph theory, which studies graphs and their properties. A graph is a collection of vertices (also called nodes) and edges that connect them. Graph theory is used to model and analyze networks, such as social networks, transportation networks, and communication networks.

· Set Theory: Another important area of study in discrete mathematics is set theory, which studies ‘sets’ and their properties. A set is a collection of distinct objects, and set theory is used to study the properties of sets, such as unions, intersections, and complements. Set theory is also used to define mathematical concepts, such as functions and relations.

· Combinatorics: Combinatorics is another area of study in discrete mathematics, which deals with counting and combination. Combinatorics is used to study permutations, combinations, and the pigeonhole principle, which states that if n objects are placed into m containers with n > m, then at least one container must contain more than one object.

· Number Theory: Number theory studies the properties of integers, another important area of study in discrete mathematics. Number theory is used to study prime numbers, divisibility, and modular arithmetic.

· Boolean Algebra: Boolean algebra studies logical operations, such as AND, OR, and NOT, and their application in computer circuits. Boolean algebra is used to design and analyze digital circuits and is an important foundation for studying computer science.

· Algorithms: Algorithms are another important area of study in discrete mathematics and are methods for solving problems. Algorithms can be used for tasks such as sorting, searching, and optimization, and they are an important tool for computer scientists.

As we continue our journey through Discrete Math, one of the areas that we need to comprehend is Prepositional Logic. Please find a description of this below, as a starter.

What is Propositional Logic?

In propositional logic, also known as propositional or sentential logic, statements are represented using propositions, declarative statements that can be either true or false. The goal of prepositional logic is to use logical reasoning to deduce the truth or falsity of a given statement based on the truth or falsity of other statements.

In discrete math, propositional logic is often used as a foundation for more complex logic systems, such as predicate logic, which allows for manipulating variables and using quantifiers. It is also used in computer science and other fields to model and analyze the behavior of systems that exhibit certain types of logical behavior.

What are the applications of Propositional Logic?

Propositional logic has many applications in various fields, including computer science, mathematics, and philosophy. In computer science, prepositional logic is used to design and analyze the behavior of digital circuits, such as those found in computers and other electronic devices. It is also used in designing and analyzing algorithms, which are steps for solving problems or performing tasks. In mathematics, prepositional logic is used to study mathematics’ foundations and prove theorems rigorously. It is also used in the study of logic and set theory, which are fundamental areas of mathematics.

In philosophy, propositional logic is used to analyze arguments and determine whether they are logically sound. It is also used to study the nature of truth and the principles of reasoning.

Overall, propositional logic plays a significant role in many fields that require the rigorous analysis and evaluation of statements and arguments.

Propositional Equivalencies

Propositional equivalences are logical statements equivalent to one another, meaning they have the same truth value under all possible circumstances. In other words, if one of the statements is true, the other must also be true, and if one of the statements is false, the other must also be false.

Many different propositional equivalences are used in prepositional logic, including the commutative, associative, and distributive laws, De Morgan’s laws and the laws of contraposition and contradiction. These equivalencies are used to transform and simplify logical expressions and to reason about the truth or falsity of statements.

For example, the commutative law of conjunction states that “p and q” is equivalent to “q and p,” and the associative law of conjunction states that “p and (q and r)” is equivalent to “(p and q) and r.” These laws can be used to rearrange the order of conjunctions in a logical expression to make it easier to evaluate. Similarly, De Morgan’s laws state that “not (p and q)” is equivalent to “not p or not q,” and “not (p or q)” is equivalent to “not p and not q.” These laws can negate conjunctions and disjunctions in a logical expression.

Predicates and Quantifiers

In discrete mathematics, predicates are statements that can be either true or false depending on the values of certain variables. For example, the statement “x is even” is a predicate because it is either true or false, depending on the value of x. Predicates are often used in predicate logic, a more powerful and expressive form than prepositional logic.

Quantifiers are symbols used in predicate logic to specify the extent to which a predicate is true or false. There are two main types of quantifiers: universal quantifiers and existential quantifiers.

The universal quantifier “for all” (represented by the symbol ∀) indicates that a predicate is true for all values of the variables. For example, the statement “for all x, x is even” means that the predicate “x is even” is true for every possible value of x.

The existential quantifier “there exists” (represented by the symbol ∃) indicates that a predicate is true for at least one value of the variables. For example, the statement “there exists an x such that x is even” means that the predicate “x is even” is true for at least one value of x.

Quantifiers are used in predicate logic to make statements about collections of objects or sets of values. They are often used in conjunction with predicates to make more complex and nuanced statements about the properties of these collections or sets.

Nested Quantifiers

In discrete math, nested quantifiers are quantifiers that are placed inside of other quantifiers. For example, the statement “for all x, there exists a y such that x + y = 0” is a nested quantifier statement, because the existential quantifier “there exists a y” is inside of the universal quantifier “for all x.”

Nested quantifiers are used in predicate logic to make statements about collections of objects or sets of values that have more complex or nuanced properties. For example, the statement “for all x, there exists a y such that x + y = 0” could be used to say that for every possible value of x, there is a corresponding value of y such that the sum of x and y is 0.

It is important to be careful when working with nested quantifiers because the order in which the quantifiers are nested can affect the statement’s meaning. For example, the statement “there exists an x such that for all y, x + y = 0” has a different meaning than the statement “for all y, there exists an x such that x + y = 0.” In the first statement, the existential quantifier “there exists an x” is outermost, while in the second statement, the universal quantifier “for all y” is outermost. This difference in the order of the quantifiers changes the meaning of the statement and the values of x and y for which it is true.

Summary

We’ve hit on a few salient topics related to Propositional Logic. It is interesting to observe how each item relates to CS/IT and is directly applied in programming, databases, and networks.

As a note…

As you continue studying CS/IT, don’t hesitate to reach out with any questions about this article. Also, I’m glad to discuss CS/IT and math-related topics with you (no homework advice - unless you are my student). Keep in touch.

About the Author

Ron McFarland, Ph.D., CISSP is a Senior Cybersecurity Consultant at CMTC (California Manufacturing Technology Consulting) in Torrance, CA. He received his doctorate from NSU’s School of Engineering and Computer Science, an MSc in Computer Science from Arizona State University, and a Post-Doc graduate research program in Cyber Security Technologies from the University of Maryland. He taught Cisco CCNA (Cisco Certified Network Associate), CCNP (Cisco Certified Network Professional), CCDA (Design), CCNA-Security, and other Cisco courses. He was honored with the Cisco Academy Instructor (CAI) Excellence Award in 2010, 2011, and 2012 for excellence in teaching. He also holds multiple security certifications, including the prestigious Certified Information Systems Security Professional (CISSP) certification and several Cisco certifications.

CONTACT Dr. Ron McFarland, PhD, MSc, CDNA, CISSP

· CMTC Email: rmcfarland@cmtc.com

· Email: highervista@gmail.com

· LinkedIn: https://www.linkedin.com/in/highervista/

· Website: https://www.highervista.com

· YouTube Channel: https://www.youtube.com/@RonMcFarland/featured

--

--

Ron McFarland PhD
Ron McFarland PhD

Written by Ron McFarland PhD

Cybersecurity Consultant, Educator, State-Certified Digital Forensics and Expert Witness (California, Arizona, New Mexico)