1.-Logic

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

CHAPTER

6
Logic

Copyright © Cengage Learning. All rights reserved.


6.1
Section Logic Statements and
Quantifiers

Copyright © Cengage Learning. All rights reserved.


Logic Statements

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

“Is the test today?” is a question.


“Go get the newspaper” is a command.
“This is a nice car” is an opinion.
“Denver is the capital of Colorado” is a statement of fact.

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

5
Example 1 – 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. x + 1 = 5.

Solution:
a. Florida is one of the 50 states in the United States, so
this sentence is true and it is a statement.

b. The sentence “How are you?” is a question; it is not a


declarative sentence. Thus it is not a statement.
6
Example 1 – Solution cont’d

c. You may not know whether 99 + 2 is a prime number;


however, you do know that it is a whole number
larger than 1, so it is either a prime number or it is not
a prime number. The sentence is either true or it is
false, and it is not both true and false, so it is a
statement.

d. x + 1 = 5 is a statement. It is known as an open


statement. It is true for x = 4, and it is false for any
other values of x. For any given value of x, it is true or
false but not both.

7
Simple Statements and
Compound Statements

8
Simple Statements and Compound Statements

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.
9
Simple Statements and Compound 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

Logic Connectives and Symbols

10
Simple Statements and Compound 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 p is false, and if a
statement p is false, its negation p is true.
11
Example 2 – 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.

Solution:
a. Ellie Goulding is not an opera singer.

b. The dog needs to be fed.

12
Simple Statements and Compound Statements

We will often find it useful to write compound statements in


symbolic form.

13
Example 3 – Write Compound Statements in Symbolic Form

Consider the following simple statements.


p: Today is Friday.
q: It is raining.
r: I am going to a movie.
s: 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.
14
Example 3 – Solution

15
Simple Statements and Compound Statements

In the next example, we translate symbolic statements into


English sentences.

16
Example 4 – Translate Symbolic Statements

Consider the following statements.


p: The game will be played in Atlanta.
q: The game will be shown on CBS.
r: The game will not be shown on ESPN.
s: The Mets are favored to win.

Write each of the following symbolic statements in words.

17
Example 4 – Solution

a. The game will be shown on CBS and the game will be


played in Atlanta.

b. The game will be shown on ESPN and the Mets are


favored to win.

c. The Mets are favored to win if and only if the game will
not be played in Atlanta.

18
Compound Statements and
Grouping Symbols

19
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 illustrates the use of parentheses to indicate


groupings for some statements in symbolic form.

20
Compound Statements and Grouping Symbols

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.

21
Compound Statements and Grouping Symbols

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.

22
Example 5 – Translate Compound Statements

Let p, q, and r represent the following.


p: You get a promotion.
q: You complete the training.
r: 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.

23
Example 5(a) – Solution
Because the p and the q statements both appear in
parentheses in the symbolic form, they are placed to the
left of the comma in the English sentence.

Thus the translation is: If you get a promotion and complete


the training, then you will receive a bonus.

24
Example 5(b) – Solution cont’d

Because the not p and the not r statements are both to


the right of the comma in the English sentence, they are
grouped together in parentheses in the symbolic form.

Thus the translation is:

25
Compound Statements and Grouping Symbols

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 if either p or q is false.

The truth table at the right


shows the four possible
cases that arise when we
form a conjunction of two
statements.

26
Compound Statements and Grouping Symbols

Any disjunction is true if p is true or q is true or both


p and q are true. The truth table 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.

27
Example 6 – 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.

Solution:
a. 7 ≥ 5 means 7 > 5 or 7 = 5. Because 7 > 5 is true, the
statement 7 ≥ 5 is a true statement.
b. This is a false statement because 5 is not an even
number.
c. This is a true statement because each simple
statement is true. 28
Quantifiers and Negation

29
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.

30
Quantifiers and Negation
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.”

31
Quantifiers and Negation
Table illustrates how to write the negation of some
quantified statements.

Quantified Statements and Their Negations

32
Example 7 – 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.

Solution:
a. No airports are open.
b. Some movies are not worth the price of admission.
c. Some odd numbers are divisible by 2.

33

You might also like