Understanding Propositions in Logic
Understanding Propositions in Logic
Chapter I
LOGIC
Logic is the study of reasoning. It focuses on the relationship among statements
not on the content of the statements. It is also concerned on whether or not the
reasoning is correct or valid.
Mathematics, a deductive science is the major application area of logic.
Propositional Calculus or Propositional Logic are mathematical areas that evolved from
logic.
The design of modern digital computer is a product of logic. Hardware
Engineering or the building up of machines made up of electronic devices that behave
logically through Boolean operations is based on logic. On the software engineering
side, database management systems, programming languages and artificial intelligence
are based on logic.
numbers of degree higher than 1 has a complex solution or using a formula, polynomial
equations are in the form :
P(x) = anxn + an-1xn-1 + ... + a1x + a0 = 0,
Lemma is a theorem that is useful in proving another theorem. It is a proved
proposition which is used as a stepping stone to a larger result rather than as a
statement of interest by itself. Example : If n is a positive integer, then either n-1 is a
positive integer or n-1 = 0.
Letters are used to represent proposition (usually p,q,r,s . . . etc. ) just as letters
are used to denote numerical variables in programming. The truth value of a
proposition is denoted by T if true and F if it is false.
Propositional Function
Propositions, the truth value of which cannot be immediately determined is a
propositional function. Propositional function has the same property as an ordinary
mathematical function.
In the same way that function returns a unique value when we know the value(s)
of any parameter(s) supplied to it, the truth value of propositional function represented
by P(x) depends upon the value of its parameter, x.
Example:
1. Let P(x) denote “x > 10” and U be the integers. Then P(11) is true while P(5) is false.
2. Let P(x,y,z) denote that x*y/2=z and U be the integers for all three variables.
a. P(5,4,10) is a true propositional function
b. P(3,1,2) is a false proposition
c. P(2,3,3) is a true proposition
d. P(7,2,7) is a true proposition
Exercises 1.1
4
1. 27 + 35 = 62
2. Is ¼ the reciprocal of 4?
3. The factors of 20 are 1, 2, 4, 5, 10, 20
4. Is 12 the highest common multiple factor (HCM) of 84 and 360?
5. 7 is greater than 12.
6. x is greater than y.
7. The lowest common multiple (LCM) of 6 and 8 is 24
8. The pre-requisite of Discrete Mathematics is Algebra.
9. Do not forget to put your section code and course schedule in every paper you are
going to submit.
10. There is a number x such that x2 = 16.
11. Answer the phone.
12. 2+3+4+5 = 14
13. Please remain standing for the Phil National Anthem
14. Multiplying two like signs ( + and +) give a positive answer while multiplying two
unlike signs (+ and - ) results to a negative answer.
15. -4 – (-3) = -1
4. Let P(a,b,c) be the propositional function “ Peter needs to pay at least 20% down
payment a which will be deducted from the car’s selling price b so that he can pay
monthly amortizations on the remaining 80% c.
a. P(100K,500K,400K) b. P(20,10,80)
c. P(200K,800K,1M) d. P(250k, IM, 1.2M)
5. Let P(a,b,c) be the propositional function “A group of a adults and b kids going on an
eat all you can restaurant will need at least c budget”. Adult price per head is P300.00,
P150.00 for kids.”
a. P(5,3,P1950) b. P(5,3,2K)
c. P(3,5,2K) d. P(3,5, P1250)
6. Let P(x,y,z) be the propositional function Bob needs to work x days and y overtime
hours per week to earn z gross pay if he makes PHP500 in an 8-hr shift per day, and
his overtime-rate per hour b is 1.30% of his basic rate.
a. P(5, 6, 2987.25) b. P(6, 5, 3500)
c. P( 5, 4, 2500) d. P(6, 4, 3325)
7. Let P(a,b,c) be the propositional function the scale on the drawing is a is the ratio
drawing of length b and the actual length of the wall c.
a. P(1:12, 9, 108) b. P(1:6,18, 204)
c. P(2:4, 12, 24) d. P( 3:8, 12,32)
8. Let P(x,y,z) be the propositional function the ratio of flour to salt in a recipe for
molding a dough is x that Helen should use y cups of salt to his z cups of flour.
a. P(4:1, 2, 8) b. (5:2, 4, 10)
c. P(3:2, 6,12) d. (6:3, 4, 8)
9. Let P(x,y,z) be the propositional function Francis can tile x square ft. of floor in y that
he can finish minutes at the rate z.
a. P( 2, 20, 8:80) b. P(20, 2, 80:8)
c. P(4, 40, 16:160) d. P (4, 40, 10:60)
10. Let P(x,y,z) be the propositional function the jacket on sale has an original price x,
but now is being sold at y price after a discount of z.
a. P(PHP1250, 875, 30%) b. P(PHP2500, 750, 25%)
c. P (PHP1K, 750, 25%) d. P(PHP2500, 1750, 50%)
6
There are three basic logical operators; negation, conjunction and disjunction:
pvq: an object
travelling in a straight
line with constant
speed has constant
velocity or has variable
acceleration is true.
7
p^q: an object
travelling in a straight
line with constant
speed has constant
velocity and has
constant acceleration
is true.
Examples:
A. Write the propositions symbolically and determine the truth value of the compound
propositions. All the given propositions are assumed to be true
Given:
p: "The files on my folder are missing”
q: I will not panic
r : I have a back-up copy of all my files
s: All files are saved on the server and not on the individual
computers.
t: My files can be restored.
T^T∨T
T^T
T
p^r∨t is true
3. My files cannot be restored and I will not panic
. ¬t^q
¬T^T
F^T
9
F
¬t^q is false
4. I have a back-up copy of all my files or all files are saved on the server and not
on individual folders and my files can be restored.
r∨s^t
T∨T^T
T^T
T
r∨s^t is true
¬T∨ T
F∨T
T
¬q ∨ r is true
B. Translate into words, the following symbols and determine the truth value of the
compound proposition:
Given the following propositions and their truth value.
T - p:: an acute angle is an angle smaller than 90 ^
1. p∨q
Soln: p∨q
T∨T
T
10
2. r^s∨t
Soln: . r^s∨t.
F^T∨F.
F∨F
F.
The conjunction that the angle between lines y = 4x - 3 and y = 5x + 1 is
45 and the disjunction the unit of angular speed is radians per second or a
compact disc on a hi-fi system rotates at 15 radians per second is false.
3. ¬(p ∨ q)
Soln: ¬(p ∨ q)
¬(T ∨ T)
¬(T)
F
The negation of the disjunction an acute angle is an angle smaller than
90 or an angle bisector cuts an angle into two equal parts is false.
is an angle smaller than 90 or an angle bisector cuts an angle into two equal
parts is true.
5. ¬(p ∨ q) ∨r^s∨t
Soln: ¬(p ∨ q) ∨r^s∨t
¬(T ∨ T) ∨ F^T∨F
¬(T) ∨ F^T∨F
F∨F^TvF
F∨FvF
F∨F
F
The negation of the disjunction an acute angle is an angle smaller than
90 or an angle bisector cuts an angle into two equal parts or the conjunction of
the disjunction with the angle between lines y = 4x - 3 and y = 5x + 1 is 45
and the unit of angular speed is radians per second in conjunction with a
compact disc on a hi-fi system rotates at 15 radians per second is false.
12
Exercises 1.2
A. Let p,q,r,s be the following propositions.
p: The common factor of the nos. 49, 147 and 350 is 7
q: 10Kbytes of data = 10,000 bytes of data.
r: Improper fractions have numerator greater than the denominator.
s: Odd nos. are divisible by 2.
p and r has the truth value true while q and s are false.
Express the following in words and determine the truth value algebraically.
1. p^¬q
2. ¬p^¬q
3. r^s
4. p^( r^s)
5. ¬(p ∨ q)
6. (p ∨ q) ^s
7. (p∨ r^s)∨(q^¬(p ∨ q)
8. (p∨ r^s)∨(q^¬(p ∨ q) ∨(q^¬(p ∨ q)
9. ¬(p ∨ q) ∨r^s
10. (q^¬(p ∨ q) v ¬(p ∨ q) ∨r^s
B. Determine whether a report will be submitted on time using truth table . Three of
these condition must be satisfied before the report can be ready (truth value for p can
be true or false ,q and t should be true; r and should false).
p: PC has completed POST and is now on the ready mode.
q: Report has been edited and ready for printing .
r: Printer is either offline or out of paper
s: The file has not been downloaded yet.
13
p q p q
T T T
T F F
F T T
F F T
The arrow " " is the conditional operator, and in p q the statement p is called
the antecedent or hypothesis, and q is called the consequent, or conclusion. According
to the table, the compound proposition "p q" is true when p is false, no matter what the
truth value of q is.
Example:
If (x<10)
[Link](“x is greater than 10\n”);
If (x == 7)
[Link](“A match is found.\n”);
p q p q
T T T
15
T F F
F T F
F F T
The arrow " " is the bi-conditional operator. Each of the following is
equivalent to the bi-conditional p q.
p if and only if q.
p is necessary and sufficient for q.
p is equivalent to q.
Examples:
Determine the truth value of the of the following compound propositions:
1. 3+7 = 13 if and only if Mars is a black hole."
The compound proposition is true. The given statement has the form p q,
where p: "3+7=13" and q: "Mars is a black hole." Since both statements are false, the
bi-conditional p q is true.
2. Diamonds are unbreakable if and only if diamonds contain no carbon.
This compound proposition is false. The proposition “Diamonds are
unbreakable is true while Diamonds contain no carbon is false.
3. Crystal is the smallest piece of ice if we if keep on dividing it if and only if iron is
an artificial element.
This compound proposition is true since the proposition” Crystal is the smallest
piece of ice if we keep on dividing it” is false while the proposition “iron is an artificial
element is also false.
Order of Precedence
In the algebra of logic, brackets will often be inserted to make clear the order in
which operations are to be carried out. The rules of precedence are:
1. brackets
2. NOT (¬)
16
3. AND ( )
4. OR (∨)
Logical Equivalence
In logic, statements p and q are logically equivalent if they have the same
logical content. Two propositions are equivalent if they have the same truth value.
The logical equivalence table shows logical propositions that are logically
equivalent.
Equivalence Name
p∧T≡p
Identity laws
p∨F≡p
p∧F≡F
p∧p≡p
¬(¬p)≡p Double negation law
p∨q≡q∨p Commutative laws
p∧(q∨r)≡(p∧q)∨(p∧r)
¬(p∨q)≡¬p∧¬q
p∧(p∨q)≡p
p∧¬p≡F
17
1. p→q≡¬p∨q
2.
3. p→q≡¬q→¬p
4.
5. p∨q≡¬p→q
6.
7.
p∧q≡¬(p→¬q)
8.
9.
¬(p→q)≡p∧¬q
(p→q)∧(p→r)≡p→(q∧r)
(p→q)∨(p→r)≡p→(q∨r)
(p→r)∧(q→r)≡(p∨q)→r
(p→r)∨(q→r)≡(p∧q)→r
1. p↔q≡(p→q)∧(q→p) 2. p↔q≡¬p↔¬q
3. p↔q≡(p∧q)∨(¬p∧¬q) 4. ¬(p↔q)≡p↔¬q
Example:
2. Given the following propositions, determine the truth value of the compound
proposition: Assume that p is true while q and r is false.
18
p: The network cable is not connected to both the computer and the wall or
modem.
q: You cannot contact your network administrator
r : You cannot access the internet
B. What would be displayed on the screen when the following statements are
executed?
else if name is equal to “Mary Poppins” then display the message “Wear white
shoes”
1. temperature = 78;
month = 6;
19
2. temperature = 70;
month = 5;
name = “Mary Poppins”
3. temperature = 60;
month = 5;
name = “Mary Poppins”
4. temperature = 60;
month = 7;
name = “Juan Dela Cruz”
D. Prove that the following are logically equivalent using the specified law.
1. Given the following propositions, determine whether the proposition are logically
equivalent. Propositions p, s, t, and w are true and the rest have false truth
value.
p: an error code is flashed on your screen or an error messages is displayed on
the screen.
q : You cannot use the computer
r : The computer is on and everything is frozen and the mouse and keyboard
are not responding.
20
2. Given the following propositions. Determine the truth value and whether the
compound propositions are logically equivalent. Convert your final answer into words.
p: The 20th term in the sequence 5, 12, 19, 26, 33 is 138
q: The sum of the first 30 terms in the sequence 5, 12, 19, 26, 33 . . . . . . is
3196.
r: If a car with an average speed of 40 mph travels a distance of 50 miles then it
will take the car 1 hour to complete the journey.
s: The expansion of (x+5)3 = x3 + 15 x2 + 75 x + 125.
t: A common factor of the set (x2 + 3x +2) and X2 – 1) is (x+1)
a. p∨q≡¬p→q b. ¬(p→q)≡p∧¬q
c. (p→q)∨(p→r)≡p→(q∨r) d. (p→r)∨(q→r)≡(p∧q)→r
e. p∧(p∨q)≡ p∧q)→t
3. Convert the following proposition into symbols then determine the truth value.
T: p: If gas is compressed then its volume decreases.
F: q: Man can light a 121 watt bulb if and only if he eats food and burns it up using
2,500 calories of energy in a day.
F: r: Electric circuits of radios or televisions and other related equipment is soldered
using solder made of aluminum and copper only.
21
T:s: Chemical properties of the elements of matter have been found to repeat in
regular patterns and this can be found in the arrangement of atoms in the periodic
table.
T: t: The color of litmus paper turns from blue to red if you put a drop of acid to it.
F:u: If the measure of the second angle of a triangle is 20 more than the measure of
the first angle of the triangle and the measure of the third angle of the triangle is 40
more than the measure of the first angle then the measure of the largest angle is 60○.
T: v: The speed of light can be expressed as 6.71 x 108 miles per hour in scientific
notation which is 67,100,000 in standard notation.
F:w: Carlos needs at least 4 cans of paints if he wants to paint the ceiling of a room
that has a length of 16 and a width of 10 feet. One can of paint can cover about 75
square feet.
T: x: Heavy loads of steel in factories and stockyards are lifted if and only if powerful
magnets are used.
T:y: If a nutrient like a fertilizer is present in large quantities in a pond then
eutrophication occurs or plants grow and decay in large numbers suffocating the pond
by not leaving sufficient oxygen in water for supporting life.
a. Commutative Law for compound propositions p and q
b. De Morgans Law for compound proposition r and s
c. Absorption Law for proposition t and u.
d. Rule no. 9 for Logical Equivalence of Conditional propositions for p, q and r.
e. Rule no. 3 for Logical Equivalence of Biconditional propositions s, t.
22
Puzzles that can be solved using logical deduction are logic puzzles also known
as Quizzles. There are computer programs designed to solve quizzles which are
actually based on the rules of logic.
Example
Night Classes
Pamela, Dorothy , Rita, Eunice, and Bernice are each taking an art program and
a foreign language program. The art programs are painting, drawing, sculpture, pottery
and computer graphics. The foreign language programs are French, Italian, Spanish
German and Chinese. From the clues given, try to determine the art and language
programs each student is taking.
Clues:
1. The student taking sculpture is not taking Italian.
23
2. Bernice and Pamela do not study Chinese but one takes Pottery and the other
French.
3. The woman studying Italian is not Dorothy or Eunice and she is also not the woman
taking drawing or pottery.
4. Dorothy does not study German.
5. Bernice, Dorothy and Eunice drive to class together on Thursday night. In no
particular order one of these student takes computer graphics, one takes German,
and the other one takes pottery.
24
Solution:
Compute
Drawin r Paintin Sculptur Potter Frenc Chines Italia Germa Spanis
g Graphics g e y h e n n h
Pamela T F F F F T F F F F
Dorothy F T F F F F T F F F
Rita F F T F F F F T F F
Eunice F F F T F F F F T F
Bernice F F F F T F F F F T
French T F F F F
Chinese F T F F F
Italian F F T F F
German F F F T F
Spanish F F F F T
Exercises 1.4
F. College Roommates.
Five Engineering seniors, John, Oscar, Earl, Ernie and Marvin rent an off—campus
house. Each one is majoring in different fields; Architecture, Civil, Computer,
Electrical and Electronics. They are attending college on sports scholarships in five
areas: Football, Baseball track, Tennis and Swimming. Each is taking a different
Foreign Language course; French, Spanish, Italian, German and Russian. From the
clues given, try to determine the foreign language, the sports and the major of each
five students:
1. The Computer major, the swimmer, the student taking Italian and Marvin have
never missed any of Ernie’s home football games.
2. Neither Oscar nor Earl is the one who takes Spanish or the one who is an
Electronics major, but one of them is a baseball player.
3. Marvin and the track star had lunch with the Electrical major and later on met
Oscar after his German class.
29
4. The baseball player, the Electrical major and Oscar all have rooms on the top
floor, whereas John and the Electronics major have rooms on the ground floor.
5. The Architecture major is taking German.
6. The Computer major is not the track star and does not take Russian.
4. She sits for Tommy the day before Billy but the day after the Clark baby.
5. In no particular order the three youngest children are the Monday child, the
Tuesday child and Mrs Juanito’s child.
6. Mrs. Paras son Sam is not the oldest nor is he the child watched on Monday.
I. Birthday Boys
Mrs. Santos has five sons, Norman, Felix, Raymond, William and Edward. Each
was born in a different year ( 1998, 2000, 2001, 2006, 2007 ) and each was born in a
different month ( January, April, July, September, and November). No son was born on
a weekend but each son was born on a different day of the week. From the clues given
try to determine the day of the week, the month and the year of birth of each son.
1. William was not the son born on a Wednesday nor was he the son born in July.
2. Raymond is older than the son born on a Tuesday and younger than the son
born in November, however, it is the two remaining sons who are the oldest and
the youngest.
3. The second eldest one and Felix both wear glasses but the son born on a Friday,
the son born in January and Wilbur do not.
4. The son born in April was not born on Tuesday or Thursday and the son born in
2001 was not born on Monday or Friday.
5. The son born in 1998 was born on Wednesday and Norman was born on a
Monday.
J. Visiting Relatives
During summer vacation, John decided to visit some of his relatives: his cousin
his parents, his uncle, his nephew and his brother who all live in different cities. The
five cities they live are Laoag, Tuguegarao, Malolos, Batangas,and Legaspi. John used
different means of transportation to get from one city to another. He went by car , jeep,
bus, train and motorcycle. From the clues given try to determine the city in which each
of his relative live and the means of transportation John used to reach there.
1. He arrived by plane and bus at the two cities which are not on the north regions.
2. His uncle and cousin live on the south cities
3. His nephew met his plane when he arrived.
31
4. He did not arrive at his uncles city by car and his uncle does not live in Legaspi City.
5. He did not go by bus to Laoag City or to visit his parents and he did not go to his
cousin’s city by train or car.