Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views11 pages

Unit 5 Logic

Mathematics - Logic

Uploaded by

nameless0188
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views11 pages

Unit 5 Logic

Mathematics - Logic

Uploaded by

nameless0188
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Unit 5

Logic
Introduction
It is not easy to summarize in a few paragraphs the subject matter known as logic. For lawyers
and judges, logic is the science of correct reasoning. They often use logic to communicate more
effectively, construct valid arguments, analyze legal contracts, and make decisions. Law schools
consider a knowledge of logic to be one of the most important predictors of future success for their new
students. A sizeable portion of the LSAT (Law School Admission Test), which is required by law school
applicants as part of their admission process, concerns logical reasoning.

Many other professions also make extensive use of logic. For instance, programmers use logic
to design computer software, electrical engineers use logic to design circuits for smart phones, and
mathematicians use logic to solve problems and construct mathematical proofs.

In this chapter, you will encounter several facets of logic. Specifically, you will use logic to:

▪ analyze information and the relationship between statements,


▪ determine the validity of arguments
▪ determine valid conclusions based on given assumptions, and
▪ analyze electronic circuits.

5.1 Logic Statements and Quantifiers

One of the first mathematicians to make a serious study of symbolic logic was Gottfried Wilhelm
Leibniz (1646-1716). Leibniz tried to advance the study of logic from a merely philosophical subject to
a formal mathematical subject. Leibniz never completely achieved this goal; however, several
mathematicians, such as Augustus De Morgan (1806-1871) and George Boole (1815-1864),
contributed to the advancement of symbolic logic as a mathematical discipline.

Logic Statements

Every language contains different types of sentences, such as statements, questions, and
commands. For instance,

“Is the exam today?” is a question.

"Go get your phone” is a command.

“You are a nice girl” is an opinion.

“Manila is the capital of Philippines" is a statement of fact.

The symbolic logic that Boole was instrumental in creating applies only to sentences that are
statements as defined below.

A Statement

A statement is a declarative sentence that is either true or false, but not both true and false. It
may not be necessary to determine whether a sentence is true to determine whether it is a statement.
For instance, consider the following sentence.

“Doña Remedios Trinidad is the largest municipality in Bulacan”

You may not know if the sentence is true, but you do know that the sentence is either true or it
is false, and that it is not both true and false. Thus, you know that the sentence is a statement.

Example 01: Identify Statements

Determine whether each sentence is a statement.


a. Florida is a state in the United States.

b. How are you?

c. 99 + 2 is a prime number.

d. 𝑥 + 1 = 5.

TAKE NOTE: The following sentence is a famous paradox:

“This is a false sentence.”

It is not a statement, because if we assume it to be a true sentence, then it is false, and if we


assume it to be a false sentence, then it is true. Statements cannot be true and false at the same
time.

Simple Statements and Compound Statements

A simple statement is a statement that conveys a single idea. A compound statement is a


statement that conveys two or more ideas.

Connecting simple statements with words and phrases such as and, or, if ... then, and if and
only if creates a compound statement. For instance, “I will attend the meeting or I will go to school.” is
a compound statement. It is composed of the two simple statements, “I will attend the meeting." and "I
will go to school.” The word or is a connective for the two simple statements.

George Boole used symbols such as p, q, r, and s to represent simple statements and the
symbols →, ↔, ~,∧, and ∨ to represent connectives. See Table 5.1.

Table 5.1
Logic Connectives and Symbols

Statement Connective Symbolic form Type of statement


not p not ~𝑝 negation
p and q and 𝑝∧𝑞 conjunction
p or q or 𝑝∨𝑞 disjunction
If p, then q If … then 𝑝→𝑞 conditional
p if and only if q if and only if 𝑝↔𝑞 biconditional

Truth Value and Truth Tables

▪ The truth value of a simple statement is either true (T) or false (F).
▪ The truth value of a compound statement depends on the truth values of its simple statements
and its connectives.
▪ A truth table is a table that shows the truth value of a compound statement for all possible
truth values of its simple statements.

The negation of the statement "Today is Friday." is the statement "Today is not Friday.” In
symbolic logic, the tilde ~ symbol is used to denote the negation of a statement. If a statement p is true,
its negation ~𝑝 is false, and if a statement 𝑝 is false, its negation ~𝑝 is true. See the table below.

𝒑 ~𝒑
T F
F T

The negation of the negation of a statement is the original statement. Thus ~(~𝑝) can be
replaced by 𝑝 in any statement.

2|P age
Example 02: Write the Negation of a Statement

Write the negation of each statement.

a. Ellie Goulding is an opera singer.

b. The dog does not need to be fed.

c. The Queen Mary 2 is the world's largest cruise ship.

d. The fire engine is not red.

We will often find it useful to write compound statements in symbolic form.

Example 03: Write Compound Statements in Symbolic Form

Consider the following simple statements.

𝑝: Today is Friday.

𝑞: It is raining.

𝑟: I am going to a movie.

𝑠: I am not going to the basketball game.

Write the following compound statements in symbolic form.

a. Today is Friday and it is raining.

b. It is not raining and I am going to a movie.

c. I am going to the basketball game or I am going to a movie.

d. If it is raining, then I am not going to the basketball game.

e. Today is not Friday and I am going to a movie.

f. I am going to the basketball game and I am not going to a movie.

In the next example, we translate symbolic statements into English sentences.

Example 04: Translate Symbolic Statements

1. Consider the following statements.

𝑝: The game will be played in Atlanta.

𝑞: The game will be shown on CBS.

𝑟: The game will not be shown on ESPN.

𝑠: The Mets are favored to win.

Write each of the following symbolic statements in words.

a. 𝑞 ∧ 𝑝

b.∼ 𝑟 ∧ 𝑠

c. 𝑠 ↔ ~𝑝

3|P age
2. Consider the following statements.

𝑒: All men are created equal.

𝑡: I am trading places.

𝑎: I get Abe's place.

𝑔: I get George's place.

Write each of the following symbolic statements in words.

a. 𝑒 ∧ ~𝑡

b. 𝑎 ∨∼ 𝑡

c. 𝑡 ↔ 𝑔

Compound Statements and Grouping Symbols

If a compound statement is written in symbolic form, then parentheses are used to indicate which
simple statements are grouped together. Table 5.2 illustrates the use of parentheses to indicate
groupings for some statements in symbolic form.

Table 5.2
Symbolic form The parentheses indicate that:
𝑝 ∧ ( 𝑞 ∨ ~𝑟) 𝑞 and ~𝑟 are grouped together.
(𝑝 ∧ 𝑞) ∨ 𝑟) p and 𝑞 are grouped together.
𝑝 and ~𝑞 are grouped together.
(𝑝 ∧∼ 𝑞) → (𝑟 ∨ 𝑠)
𝑟 and 𝑠 are also grouped together.

If a compound statement is written as an English sentence, then a comma is used to indicate


which simple statements are grouped together. Statements on the same side of a comma are grouped
together. See Table 5.3.

TABLE 5.3

English sentence The comma indicates that:


𝑞 and ~𝑟 are grouped together because they are both
𝑝, and 𝑞 or not 𝑟.
on the same side of the comma.
𝑝 and 𝑞 are grouped together because they are both on
𝑝 and 𝑞, or 𝑟.
the same side of the comma.
𝑝 and ~𝑞 are grouped together because they are both
on the left side of the comma.
If 𝑝 and not 𝑞, then 𝑟 or 𝑠.
𝑟 and 𝑠 are grouped together because they are both on
the right side of the comma.

If a statement in symbolic form is written as an English sentence, then the simple statements
that appear together in parentheses in the symbolic form will all be on the same side of the comma that
appears in the English sentence.

Example 05: Translate Compound Statements

1. Let 𝑝, 𝑞, and 𝑟 represent the following.

𝑝: You get a promotion.

𝑞: You complete the training.

4|P age
𝑟: You will receive a bonus.

a. Write (𝑝 ∧ 𝑞) → 𝑟 as an English sentence.

b. Write "If you do not complete the training, then you will not get a promotion and you will not
receive a bonus.” in symbolic form.

2. Let 𝑝, 𝑞, and 𝑟 represent the following.

𝑝: Kesha's singing style is similar to Uffie's.

𝑞: Kesha has messy hair.

𝑟: Kesha is a rapper.

a. Write (𝑝 ∧ 𝑞) → 𝑟 as an English sentence

b. Write "If Kesha is not a rapper, then Kesha does not have messy hair and Kesha's singing
style is not similar to Uffie's." in symbolic form

The use of parentheses in a symbolic statement may affect the meaning of the statement. For
instance, ~(𝑝 ∨ 𝑞) indicates the negation of the compound statement
𝑝 ∨ 𝑞. However, ~𝑝 ∨ 𝑞 indicates that only the p statement is negated.

The statement ~(𝑝 ∨ 𝑞) is read as, "It is not true that, p or q. The statement ~𝑝 ∨ 𝑞 is read as,
“Not p or q.”

If you order cake and ice cream in a restaurant, the waiter will bring both cake and ice cream. In
general, the conjunction 𝑝 ∧ 𝑞 is true if both p and q are true, and the conjunction is false of either p or
q is false. The truth table below shows the four possible case that arise when we form a conjunction of
two statements.

Truth Table for 𝒑 ∧ 𝒒

𝒑 𝒒 𝒑∧𝒒
T T T
T F F
F T F
F F F
T: True F: False

The Truth Table of a Conjunction

The conjunction of 𝑝 ∧ 𝑞 is true if and only if both p and q are true.

Sometimes the word “but” is used in place of the connective “and”. For instance, "I ride my bike
to school, but I ride the bus to work," is equivalent to the conjunction, "I ride my bike to school and I
ride the bus to work"

Any disjunction 𝑝 ∨ 𝑞 is true if p is true or q is true or both p and q are true. The truth table at
below shows that the disjunction p or q is false if both p and q are false, however, it is true in all other
cases.

Truth Table for 𝒑 ∨ 𝒒


𝒑 𝒒 𝒑∨𝒒
T T T
T F T
F T T
F F F
T: True F: False
5|P age
Truth Value of a Disjunction

The disjunction 𝑝 ∨ 𝑞 is true if and only if p is true, q is true, or both p and q are true.

Example 06: Determine the Truth Value of a Statement

Determine whether each statement is true or false.

a. 7 ≥ 5.

b. 5 is a whole number and 5 is an even number.

c. 2 is a prime number and 2 is an even number.

d. 21 is a rational number and 21 is a natural number.

e. 4 ≥ 9

Quantifiers and Negation

In a statement, the word some and the phrases there exists and at least one are called
existential quantifiers. Existential quantifiers are used as prefixes to assert the existence of
something.

In a statement, the words none, no, all, and every, are called universal quantifiers. The
universal quantifiers none and no deny the existence of something, whereas the universal quantifiers
all and every, are used to assert that every element of a given set satisfies some condition.

Recall that the negation of a false statement is a true statement and the negation of a true
statement is a false statement. It is important to remember this fact when forming the negation of a
quantified statement. For instance, what is the negation of the false statement, "All dogs are mean"?
You may think that the negation is "No dogs are mean," but this is also a false statement. Thus the
statement "No dogs are mean" is not the negation of "All dogs are mean." The negation of "All dogs
are mean," which is a false statement, is in fact "Some dogs are not mean," which is a true statement.
The statement "Some dogs are not mean" can also be stated as "At least one dog is not mean" or
"There exists a dog that is not mean."

What is the negation of the false statement, "No doctors write in a legible manner"? Whatever
the negation is, we know it must be a true statement. The negation cannot be "All doctors write in a
legible manner, because this is also a false statement. The negation is "Some doctors write in a legible
manner" This can also be stated as, "There exists at least one doctor who writes in a legible manner."

Table 5.4A illustrates how to write the negation of some quantified statements.

Table 5.4A
Quantified Statements and Their Negations

Statement Negation
All X are Y. Some X are not Y.
No X are Y. Some X are Y.
Some X are not Y. All X are Y.
Some X are Y. No X are Y.

In Table 5.4A, the negations of the statements in the first column are shown second column.
Also, the negation of the statements in the second column are the statements in the first column, Thus
the information in Table 5.4A can be shown more compactly as in Table 5.4B.

6|P age
Table 5.4B
Quantified Statements and Their Negations
Displayed in a Compact Format

negation
All X are Y. Some X are not Y.
negation
No X are Y. Some X are Y.

Example 07: Write the Negation of a Quantified Statement

Write the negation of each of the following statements

a. Some airports are open.

b. All movies are worth the price of admission.

c. No odd numbers are divisible by 2.

d. All bears are brown.

5.2 Truth Tables, Equivalent Statements, and Tautologies

Truth Tables

In section 5.1, we defined truth tables for the negation of a statement, the conjunction of two statements,
and the disjunction of two statements. Each of these truth tables is shown below for review purposes.

Negation Conjunction Disjunction


𝒑 ~𝒑 𝒑 𝒒 𝒑∧𝒒 𝒑 𝒒 𝒑∨𝒒
T F T T T T T T
F T T F F T F T
F T F F T T
F F F F F F

In this section, we consider methods of constructing truth tables for a statement that involves a
combination of conjunctions, disjunctions, and/or negations. If the given statement involves only two
simple statements, then start with a table with four rows (see the table below), called the standard
truth table form, and proceed as shown in Example 1.

𝒑 𝒒 Given statement
T T
T F
F T
F F
Standard truth table form for a given statement
that involves only the two simple statements p and q

Example 1: Truth Tables

a. Construct a table for ~(~𝑝 ∨ 𝑞) ∨ 𝑞.

b. Use the truth table from part a to determine the truth value of~(𝑝 ∨ 𝑞) ∨ 𝑞, given that 𝑝 is
true and 𝑞 is false

Solution:

a. Start with the standard truth table form and then include a ~𝑝 column.

7|P age
𝒑 𝒒 ~𝒑
T T F
T F F
F T T
F F T
Now use the truth values from the ~𝑝 and 𝑞 columns to produce the truth values for ~𝑝 ∨ 𝑞, as
shown in the rightmost column of the following table.

𝒑 𝒒 ~𝒑 ~𝒑 ∨ 𝒒
T T F T
T F F F
F T T T
F F T T

Negate the truth values in the ~𝑝 ∨ 𝑞 column to produce the following:

𝒑 𝒒 ~𝒑 ~𝒑 ∨ 𝒒 ~(~𝒑 ∨ 𝒒)
T T F T F
T F F F T
F T T T F
F F T T F
As our last step, we form the disjunction of ~(~𝑝 ∨ 𝑞) with q and place the results in the
rightmost column of the table. See the following table. The shaded column is the truth table for
~(~𝑝 ∨ 𝑞) ∨ 𝑞

𝒑 𝒒 ~𝒑 ~𝒑 ∨ 𝒒 ~(~𝒑 ∨ 𝒒) ~(~𝒑 ∨ 𝒒) ∨ 𝒒
T T F T F T row 1
T F F F T T row 2
F T T T F T row 3
F F T T F F row 4
b. In row 2 of the above truth table, we see that when p is true, and q is false, the
statement ~(~𝑝 ∨ 𝑞) ∨ 𝑞 in the rightmost column is true.

Compound statements that involve exactly three simple statements require a standard truth table
form with 23 = 8 rows, as shown below.

𝒑 𝒒 𝒓 Given statement
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F

Example 2: Truth Tables

a. Construct a truth table for (𝑝 ∧ 𝑞) ∧ (~𝑟 ∨ 𝑞).

b. Use the truth table from part a to determine the truth value of (𝑝 ∧ 𝑞) ∧ (~𝑟 ∨ 𝑞) given that p
is true, q is true, and r is false.

Solution:

a. Using the procedures developed in Example 1, we can produce the following table. The
shaded column is the truth table for (𝑝 ∧ 𝑞) ∧ (~𝑟 ∨ 𝑞). The numbers in the squares below the columns
8|P age
denote the order in which the columns were constructed. Each truth value in the column numbered 4
is the conjunction of the truth values to its left in the columns numbered 1 and 3.

𝒑 𝒒 𝒓 𝒑∧𝒒 ~𝒓 ~𝒓 ∨ 𝒒 (𝒑 ∧ 𝒒) ∧ (~𝒓 ∨ 𝒒)
T T T T F T T row 1
T T F T T T T row 2
T F T F F F F row 3
T F F F T T F row 4
F T T F F T F row 5
F T F F T T F row 6
F F T F F F F row 7
F F F F T T F row 8
1 2 3 4
b. In row 2 of the above truth table, we see that (𝑝 ∧ 𝑞) ∧ (~𝑟 ∨ 𝑞) is true when p is true, q is
true, and r is false.

Alternative Method for the Construction of a Truth Table

1. If the given statement has 𝑛 simple statements, then start with a standard form that has 2𝑛
rows. Enter the truth values for each simple statement and their negations.
2. Use the truth values for each simple statement and their negations to enter the truth values
under each connective within a pair of grouping symbols, including parentheses (), brackets
[ ], and braces { }. If some grouping symbols are nested inside other grouping symbols, then
work from the inside out. In any situation in which grouping symbols have not been used, then
we use the following order of precedence agreement.
First assign truth values to negations from left to right, followed by conjunctions from left
to right, followed by disjunctions from left to right, followed by conditionals from left to right,
and finally by biconditionals from left to right.
3. The truth values that are entered into the column under the connective for which truth values
are assigned last, form the truth table for the given statement.

Example 3: Use the Alternative Procedure to Construct a Truth Table

Construct a truth table for 𝑝 ∨ [~(𝑝 ∧ ~𝑞)]

Solution:

Step 1: The given statement 𝑝 ∨ [~(𝑝 ∧ ~𝑞)] has the two simple statements p and q. Thus, we
start with a standard form that has 22 = 4 rows. In each column, enter the truth values for the
statements 𝑝 and ~𝑞, as shown in the columns numbered 1, 2, and 3 of the following table.

𝒑 𝒒 𝒑 ∨ [~ (𝒑 ∧ ~𝒒)]
T T T T F
T F T T T
F T F F F
F F F F T
1 2 3

Step 2: Use the truth values in columns 2 and 3 to determine the truth values under the "and"
connective. See column in the following truth table. Now negate the truth values in column 4 to produce
the truth values in column 5.

𝒑 𝒒 𝒑 ∨ [~ (𝒑 ∧ ~𝒒)]
T T T T T F F
T F T F T T T
F T F T F F F
F F F T F F T
1 5 2 4 3

9|P age
Step 3: Use the truth values in the columns 1 and 5 to determine the truth values to enter
under the "or" connective. See column 6 in the following table. Shaded column 6 is the truth table for
𝑝 ∨ [~(𝑝 ∧ ~𝑞)].

𝒑 𝒒 𝒑 ∨ [~ (𝒑 ∧ ~𝒒)]
T T T T T T F F
T F T T F T T T
F T F T T F F F
F F F T T F F T
1 6 5 2 4 3

Equivalent Statements

Two statements are equivalent if they both have the same truth value for all possible truth values
of their simple statements. Equivalent statements have identical truth values in the final columns of
their truth tables. The notation 𝑝 ≡ 𝑞 is used to indicate that the statements p and q are equivalent

Example 4: Verify That Two Statements Are Equivalent

Show that ~(𝑝 ∨ ~𝑞) and ~𝑝 ∧ 𝑞 are equivalent statements.

The truth tables in Table 5.5 show that ~(𝑝 ∨ 𝑞) 𝑎𝑛𝑑 ~𝑝 ∧ ~𝑞 are equivalent statements. The
truth tables in Table 5.6 show that ~(𝑝 ∧ 𝑞) and ~𝑝 ∨ ~𝑞 are equivalent statements.

Table 5.5 Table 5.6


𝒑 𝒒 ~(𝒑 ∨ 𝒒) ~𝒑 ∧ ~𝒒 𝒑 𝒒 ~(𝒑 ∧ 𝒒) ~𝒑 ∨ ~𝒒
T T F F T T F F
T F F F T F T T
F T F F F T T T
F F T T F F T T

These equivalences are known as De Morgan's laws for statements.

De Morgan's Laws for Statements

For any statements p and q,

~(𝑝 ∨ 𝑞) ≡ ~𝑝 ∧ ~𝑞

~(𝑝 ∧ 𝑞) ≡ ~𝑝 ∨ ~𝑞

De Morgan’s laws can be used to restate certain English sentences in an equivalent form.

Example 5: State an Equivalent Form

Use one of De Morgan's laws to restate the following sentence in an equivalent form.

1. It is not true that, I graduated or I got a job.

10 | P a g e
Solution:

Let p represent the statement "I graduated." Let q represent the statement "I got a job." In
symbolic form, the original sentence is ~(𝑝 ∨ 𝑞). One of De Morgan's laws states that this is equivalent
to ~𝑝 ∧ ~𝑞. Thus, a sentence that is equivalent to the original sentence is "I did not graduate and I did
not get a job."

2. I am not going to the bar and I am not going to the game.

Tautologies and Self-Contradictions

A tautology is a statement that is always true. A self-contradiction is a statement that is always


false.

Example 6: Verify Tautologies and Self-Contradictions

1. Show that 𝑝 ∨ (~𝑝 ∨ 𝑞) is a tautology.

Solution:

Enter the truth values for each simple statement and its negation as shown in the
columns numbered 1, 2, and 3. Use the truth values in columns 2 and 3 to determine
the truth values to enter in column 4, under the "or” connective. Use the truth values in columns 1
and 4 to determine the truth values to enter in column 5, under the "or" connective.

𝒑 𝒒 𝒑 ∨ (~𝒑 ∨ 𝒒)
T T T T F T T
T F T T F F F
F T F T T T T
F F F T T T F
1 5 2 4 3

Column 5 of the table shows that 𝑝 ∨ (~𝑝 ∨ 𝑞) is always true. Thus 𝑝 ∨ (~𝑝 ∨ 𝑞) is a
tautology.

2. Show that 𝑝 ∧ (~𝑝 ∧ 𝑞) is a self-contradiction.

Solution:

Enter the truth values for each simple statement and its negation as shown in the
columns numbered 1, 2, and 3. Use the truth values in columns 2 and 3 to determine
the truth values to enter in column 4, under the "and” connective. Use the truth values in columns
1 and 4 to determine the truth values to enter in column 5, under the "and" connective.

𝒑 𝒒 𝒑 ∧ (~𝒑 ∧ 𝒒)
T T T F F F T
T F T F F F F
F T F F T T T
F F F F T F F
1 5 2 4 3

Column 5 of the table shows that 𝑝 ∧ (~𝑝 ∧ 𝑞) is always false. Thus 𝑝 ∧ (~𝑝 ∧ 𝑞) is a self-
contradiction.

11 | P a g e

You might also like