Tuesday 22 February 2011

LOGIC

Definition: The study of the principles of valids, using rules to operate on a statement or several statements to reach a correct solution.

Truth Value: any sentence or statement which can be either true or false , but not both. That sentence can be assigned the Truth Value, True (T or 1) or False (F or 0). Then it is a meaningful propositon. Proposition which contains more than one sentence is called compound proposition.

DISJUNCTION

Definition : A disjunction is a compound statement formed by joining two statements with    the connector OR. The disjunction "p or q" is symbolized by ∨ q  . A disjunction is false if and only if both statements are false; otherwise it is true. The truth values of ∨ q are listed in the truth table below.A disjunction, both statements must be false for the disjunction to be false.

Example 1:
Given:
p: Ann is on the softball team.
q: Paul is on the football team.
Problem:
What does ∨ q represent?

Solution: In Example 1, statement p represents, "Ann is on the softball team" 
and statement q represents, "Paul is on the football team." The symbol ∨ 
is a logical connector which means "or." Thus, the compound 
statement ∨ q represents the sentence, "Ann is on the softball team or
Paul is on the football team." The statement ∨ q is a disjunction.


p
q
∨ q
T
T
T
T
F
T
F
T
T
F
F
F

Example 2:
Given:
a: A square is a quadrilateral.
b: Harrison Ford is an American actor.
Problem:  
Construct a truth table for the disjunction "a or b."
Solution:
a
b
∨ b 
T
T
T
T
F
T
F
T
T
F
F
F

Example 3:
Given:
r: x is divisible by 2.
s: x is divisible by 3.
Problem:
What are the truth values of  ∨ 

Solution:
If x = 6, then r is true, and s is true. The disjunction r ∨ s is true.
If x = 8, then r is true, and s is false. The disjunction ∨ s  is true.
If x = 15, then r is false, and s is true. The disjunction ∨ s  is true.
If x = 11, then r is false, and s is false. The disjunction ∨ s  is false.

CONJUNCTION

Definition : A conjunction is a compound statement formed by joining two statements with the connector AND. The conjunction "p and q" is symbolized by p ˄ q. A conjunction is true when both of its combined parts are true; otherwise it is false. With a conjunction, both statements must be true for the conjunction to be true.
 Example 1:
Statement p represents the sentence, "Ann is on the softball team," and 
statement q represents the sentence, "Paul is on the football team." The symbol ˄ 
is a logical connector which means "and." Therefore, the compound statement 
˄ q represents     the sentence, "Ann is on the softball team and Paul is on
 the footballteam." The statement p ˄ q is a conjunction.

p
q
p ˄ q
T
T
T
T
F
F
F
T
F
F
F
F


Example 2:
Given:
a: A square is a quadrilateral.
b: Harrison Ford is an American actor.
Problem: 
Construct a truth table for the conjunction "a and b."
Solution:
a
b
a ˄ b
T
T
T
T
F
F
F
T
F
F
F
F


Example 3:
Given:
r: The number x is odd.
s: The number x is prime.
Problem:
Can we list all truth values for r ˄ s in a truth table?Why or why not?

Solution: 
If x = 3, then r is true, s is true. The conjunction r ˄ s is true.
If x = 9, then r is true, s is false. The conjunction r ˄ s is false.
If x = 2, then r is false, s is true. The conjunction r ˄ s is false.
If x = 6, then r is false, s is false. The conjunction r ˄ s is false.

IMPLICATION


Definition : An implication, symbolized by pq, is an if-then statement in which p 
is a hypothesis and q is a conclusion. The logical connector in a conditional statement
is denoted by the symbol . The conditional is defined to be true unless 
a true hypothesis leads to a false conclusion. A truth table for pq is shown below.

Example 1:
Given:
p: I do my homework.
q: I get my allowance.
Problem:
What does pq represent?

Solution:
In Example 1, p represents, "I do my homework," and q represents "I get my 
allowance." The statement pq is a conditional statement which represents 
"If p, then q.
p
q
pq
T
T
T
T
F
F
F
T
T
F
F
T

Example 2:

Given:
a: The sun is made of gas.
b: 3 is a prime number.
Problem:
Write ab as a sentence. Then construct a truth table for this conditional.


Solution: The conditional ab represents "If the sun is made of gas, then 
3 is a prime number."
a
b
ab
T
T
T
T
F
F
F
T
T
F
F
T


Example 3:
Given:
r: 8 is an odd number.
false
s: 9 is composite.
true
Problem:
What is the truth value of  rs?

Solution:Since hypothesis r is false and conclusion s is true,the implication
r→ s