MWM ppt1
MWM ppt1
WORLD
1. ∀𝑥 ∈ ℛ, 𝑥 2 ≥ 0
• For any real number 𝑥, its square is greater than or
equal to 0.
Example:
Write as English sentences and say whether they
are true or false.
2
2. ∀𝑥, 𝑦 ∈ ℜ, 𝑥 + 𝑦 = 𝑥 2 + 2𝑥𝑦 + 𝑦 2
• For any real numbers 𝑥 and 𝑦, the squares of their
sum is equal to the sum of their squares plus twice
their product.
Example:
Write as English sentences and say whether they
are true or false.
3. ∃𝑚, 𝑛 ∈ ℤ, 𝑚 − 𝑛 ≤ 𝑚 + 𝑛
• There exist integers 𝑚 and 𝑛 such that 𝑚 minus 𝑛
is less than or equal to 𝑚 plus 𝑛.
OPERAND
• The operand is the object that is being worked on by
an operation. Operations can be mathematical ones
such as multiplication or addition, or they can be
more sophisticated functions.
OPERAND
• The operand is the object that is being worked on by
an operation. Operations can be mathematical ones
such as multiplication or addition, or they can be
more sophisticated functions.
• In all computer languages, expressions consist of
two types of components: operands and operators.
Operands are the objects that are manipulated, and
operators are the symbols that represent specific
actions.
OPERAND
For example, in the expression
5+x
x and 5 are operands and + is an operator. All
expressions have at least one operand.
TYPES OF OPERATORS
TYPES OF OPERATORS
UNARY
TYPES OF OPERATORS
UNARY
Unary means operation is
performed on one operand.
Example: a++, -a, ++a, etc.
TYPES OF OPERATORS
UNARY BINARY
Unary means operation is
performed on one operand.
Example: a++, -a, ++a, etc.
TYPES OF OPERATORS
UNARY BINARY
Unary means operation is Binary means operation is
performed on one operand. performed on two operands.
Example: a++, -a, ++a, etc. Example: a+b, a*b, a<b, a++b, etc.
Unary Set Operations
• In mathematics, a unary operation is an operation
with only one operand, i.e. a single input. An
example is the function f : A → A, where A is a set.
The function f is a unary operation on A.
Unary Set Operations
• In mathematics, a unary operation is an operation
with only one operand, i.e. a single input. An
example is the function f : A → A, where A is a set.
The function f is a unary operation on A.
• Common notations are prefix notation (e.g. +, −, ¬),
postfix notation (e.g. factorial n!), functional notation
(e.g. sin x or sin(x)), and superscripts (e.g. transpose
AT). Other notations exist as well.
Unary Set Operations
For example, in the case of the square root, a
horizontal bar extending the square root sign over the
argument can indicate the extent of the argument.
UNARY OPERATORS
• In common arithmetic, the unary operators are
negation, the reciprocal, and the absolute value.
UNARY OPERATORS
• In common arithmetic, the unary operators are
negation, the reciprocal, and the absolute value.
• Negation involves reversing the sign of a number.
For example, the negation of 4 is -4, and the
negation of -23 is 23.
UNARY OPERATORS
• In common arithmetic, the unary operators are
negation, the reciprocal, and the absolute value.
• Negation involves reversing the sign of a number.
For example, the negation of 4 is -4, and the
negation of -23 is 23.
• The reciprocal involves dividing 1 by the number.
Thus, the reciprocal of 4 is 1/4, and the reciprocal of
-23 is -1/23.
UNARY OPERATORS
• The absolute value involves reversing the sign of a
number if it is negative and leaving the number
unchanged if it is 0 or positive. Thus, the absolute
value of 4 is 4, and the absolute value of -23 is 23.
Unary negative and positive
As unary operations have only one operand they are
evaluated before other operations containing them.
Here is an example using negation:
3 − −2
Unary negative and positive
As unary operations have only one operand they are
evaluated before other operations containing them.
Here is an example using negation:
3 − −2
Here, the first '−' represents the binary subtraction
operation, while the second '−' represents the unary
negation of the 2 (or '−2' could be taken to mean the
integer −2). Therefore, the expression is equal to:
3 − (−2) = 5
Unary negative and positive
Technically there is also a unary positive, but it is not
needed since we assume a value to be positive:
(+2) = 2
Unary negative and positive
Technically there is also a unary positive, but it is not
needed since we assume a value to be positive:
(+2) = 2
Unary positive does not change the sign of a negative
operation:
(+(−2)) = (−2)
Unary negative and positive
Technically there is also a unary positive, but it is not
needed since we assume a value to be positive:
(+2) = 2
Unary positive does not change the sign of a negative
operation:
(+(−2)) = (−2)
In this case a unary negative is needed to change the
sign:
(−(−2)) = (+2)
BINARY OPERATIONS
OPERATION SYMBOL REPRESENTATION
Addition + a+b
Subtraction - a–b
Multiplication x or • a x b or a • b
Division ÷ a÷b
BINARY OPERATIONS
• In mathematics, a binary operation on a set is a
calculation that combines two elements of the set
(called operands) to produce another element of the
set. More formally, a binary operation is an operation
of parity (the number of arguments or operands that
the function takes) of two whose two domains and
one codomain are the same set.
BINARY OPERATIONS
• In mathematics, a binary operation on a set is a
calculation that combines two elements of the set
(called operands) to produce another element of the
set. More formally, a binary operation is an operation
of parity (the number of arguments or operands that
the function takes) of two whose two domains and
one codomain are the same set.
• Examples include the familiar elementary arithmetic
operations of addition, subtraction, multiplication and
division.
PROPERTIES OF BINARY
OPERATIONS
.
1. Closure of Binary Operations
The product and the sum of any two real numbers is
also a real number. In symbols, we write
∀ 𝑥, 𝑦 ∈ ℜ, 𝑥 + 𝑦 ∈ ℜ and 𝑥∙𝑦 ∈ ℜ
2. Commutativity of Binary Operations
A binary operation is said to be commutative if a
change in the order of the arguments results in
equivalence.
∀ 𝒙, 𝒚 ∈ 𝕽, 𝒙 + 𝒚 = 𝒚 + 𝒙 (addition)
∀ 𝒙, 𝒚 ∈ 𝕽, 𝒙 ∙ 𝒚 = 𝒚 ∙ 𝒙 (multiplication)
Example:
1+2=2+1
2∙3=3∙2
3. Associativity of Binary Operations
A binary operation is said to be associative if parentheses
can be reordered and the result is equivalent.
∀ 𝒙, 𝒚, 𝒛 ∈ 𝓡, 𝒙 + 𝒚 + 𝒛 = 𝒙 + 𝒚 + 𝒛 (addition)
∀ 𝒙, 𝒚, 𝒛 ∈ 𝓡, (𝒙 ∙ 𝒚) ∙ 𝒛 = 𝒙 ∙ (𝒚 ∙ 𝒛) (multiplication)
Example:
𝟏+𝟐 +𝟑=𝟏+ 𝟐+𝟑
𝟐 ∙ 𝟑 ∙ 𝟒 = 𝟐 ∙ (𝟑 ∙ 𝟒)
4. Distributive Property of Binary Operations
Distributivity applies when multiplication performed on
a group of two numbers added or subtracted together.
∀ 𝒙, 𝒚, 𝒛 ∈ 𝓡, 𝒛 𝒙 ± 𝒚 = 𝒛𝒙 ± 𝒛𝒚
Example:
𝟐 𝟑 + 𝟒 = 𝟐 𝟑 + 𝟐(𝟒)
5. Identity Elements of Binary Operations
An element 𝑒 is said to be an identity element (or neutral
element) of a binary operation if under the operation any
element combined with 𝑒 results in the same element.
∀ 𝒙 ∈ 𝕽, 𝒙 + 𝒆 = 𝒙 (addition)
∀ 𝒙 ∈ 𝕽, 𝒙 ∙ 𝒆 = 𝒙 (multiplication)
1. It is raining.
Examples of Propositions
1. It is raining.
2. When you work hard, you are rewarded with success.
Examples of Propositions
1. It is raining.
2. When you work hard, you are rewarded with success.
3. There are seven days in one week.
Examples of Propositions
The following are not propositions
1. Get out!
Examples of Propositions
The following are not propositions
1. Get out!
2. Logic is sweet.
Examples of Propositions
The following are not propositions
1. Get out!
2. Logic is sweet.
3. x + 3 = 5
Examples of Propositions
The following are not propositions
1. Get out!
2. Logic is sweet.
3. x + 3 = 5
4. How old are you?
LOGICAL CONNECTIVES
NEGATION
A statement is a negation of another if the word is not
introduced in the negative statement. Let 𝑃 be a proposition.
The negation of 𝑃 is “not 𝑃” or ¬𝑃.
𝑃 ¬𝑃
T F
F T
NEGATION
Conjunction of 𝑷 and 𝑸
Let 𝑃 and 𝑄 be propositions. The conjunction of 𝑃 and
𝑄, denoted by 𝑃 ∧ 𝑄 (read as “𝑃 and 𝑄”) is the proposition
whose truth value depends on 𝑃 and 𝑄. We call each 𝑃 and
𝑄 a conjunct.
Conjunction of 𝑷 and 𝑸
Let 𝑃 and 𝑄 be propositions. The conjunction of 𝑃 and
𝑄, denoted by 𝑃 ∧ 𝑄 (read as “𝑃 and 𝑄”) is the proposition
whose truth value depends on 𝑃 and 𝑄. We call each 𝑃 and
𝑄 a conjunct.
𝑃 𝑄 𝑃∧𝑄
T T T
T F F
F T F
F F F
Conjunction of 𝑷 and 𝑸
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
1. 𝑃 ∧ 𝑄
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
1. 𝑃 ∧ 𝑄
» Life is beautiful yet challenging.
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
¬
2. 𝑃 ∧ 𝑄
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
¬
2. 𝑃 ∧ 𝑄
» Life is not beautiful and challenging.
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
¬
3. 𝑃 ∧ 𝑄
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
¬
3. 𝑃 ∧ 𝑄
» Life is beautiful still life is not challenging.
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
¬ ¬
4. 𝑃∧ 𝑄
EXAMPLE
Let P: Life is beautiful.
Q: Life is challenging.
¬ ¬
4. 𝑃∧ 𝑄
» Life is not beautiful also not challenging.
Disjunction of 𝑷 and 𝑸
Let 𝑃 and 𝑄 be propositions. The disjunction of 𝑃 and
𝑄, denoted by 𝑃 ∨ 𝑄 (read as “𝑃 or 𝑄”) is the proposition
whose truth value depends on 𝑃 and 𝑄. We call each 𝑃 and
𝑄 a disjunct.
Disjunction of 𝑷 and 𝑸
Let 𝑃 and 𝑄 be propositions. The disjunction of 𝑃 and
𝑄, denoted by 𝑃 ∨ 𝑄 (read as “𝑃 or 𝑄”) is the proposition
whose truth value depends on 𝑃 and 𝑄. We call each 𝑃 and
𝑄 a disjunct.
𝑃 𝑄 𝑃∨𝑄
T T T
T F T
F T T
F F F
Disjunction of 𝑷 and 𝑸
SYMBOL TRANSLATION
.
P or Q;
𝑃∨𝑄 P unless Q
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
1. 𝑃 ∨ 𝑄
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
1. 𝑃 ∨ 𝑄
» Two is prime or even.
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
¬
2. 𝑃∨𝑄
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
¬
2. 𝑃∨𝑄
» Two is not prime unless it is even.
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
¬
3. 𝑃 ∨ 𝑄
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
¬
3. 𝑃 ∨ 𝑄
» Two is prime unless not even.
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
¬ ¬
4. 𝑃∨ 𝑄
EXAMPLE
Let P: 2 is prime.
Q: 2 is even.
¬ ¬
4. 𝑃∨ 𝑄
» Two is not prime or not even.
Conditional Statement or Implication
Let 𝑃 and 𝑄 be propositions. The conditional statement or
implication “if 𝑃 then 𝑄", denoted by 𝑃 ⟹ 𝑄 , is the
proposition whose truth value depends on 𝑃 and 𝑄. We call
each 𝑃 the hypothesis or premise and 𝑄 the conclusion.
Conditional Statement or Implication
Let 𝑃 and 𝑄 be propositions. The conditional statement or
implication “if 𝑃 then 𝑄", denoted by 𝑃 ⟹ 𝑄 , is the
proposition whose truth value depends on 𝑃 and 𝑄. We call
each 𝑃 the hypothesis or premise and 𝑄 the conclusion.
Conditional Statement or Implication
.
Example: Change to symbols.
“Buy one notebook, take one free pencil.”
P: I buy a notebook.
Q: I get a free pencil.
Answer:
B. I get my salary today and then; I don’t treat you to
dinner.
Biconditional Statement or an Equivalence
Let 𝑃 and 𝑄 be propositions. The conditional statement or an
equivalence “𝑃 if and only if 𝑄", denoted by 𝑃 ⇔ 𝑄, is the
proposition whose truth value depends on 𝑃 and 𝑄.
Biconditional Statement or an Equivalence
Let 𝑃 and 𝑄 be propositions. The conditional statement or an
equivalence “𝑃 if and only if 𝑄", denoted by 𝑃 ⇔ 𝑄, is the
proposition whose truth value depends on 𝑃 and 𝑄.
Biconditional Statement or an Equivalence
.
Express the following propositions in symbols,
where P, Q, R and S are defined as follows.
P: I understand logic.
Q: I am doing well in my class in Logic.
R: Logic is easy.
S: I will pass all my exams in Logic.
Converse: If Q then P.
Inverse: If not P then not Q.
Contrapositive: If not Q then not P.
Give the converse, inverse and
contrapositive of the following implications.