2. 2
Course Objectives
1.Express statements with the precision of formal logic
2.Analyze arguments to test their validity
3.Apply the basic properties and operations related to sets
4.Apply to sets the basic properties and operations related
to relations and function
5.Define terms recursively
6.Prove a formula using mathematical induction
7.Prove statements using direct and indirect methods
3. 3
Course Objectives
8.Identify and use the formulas of combinatorics in different
problems
9.Illustrate the basic definitions of graph theory and
properties of graphs
10.Relate each major topic in Discrete Mathematics to an
application area in computing
4. 4
ā¢ What is Discrete Mathematics?:
ā¢ Discrete Mathematics concerns processes
that consist of a sequence of individual
steps.
Continuous
Discrete
6. 6
Logic
ā¢ LOGIC:
ā¢ Logic is the study of the principles and methods that
distinguishes between a valid and an invalid argument.
ā¢ SIMPLE STATEMENT:
ā¢ A statement is a declarative sentence that is either true
or false but not both.
ā¢ A statement is also referred to as a proposition
ā¢ Example: 2+2 = 4, It is Sunday today
ā¢ If a proposition is true, we say that it has a truth value of
"trueā.
ā¢ If a proposition is false, its truth value is "false".
ā¢ The truth values ātrueā and āfalseā are, respectively,
denoted by the letters T and F.
7. 7
Logic
ā¢ EXAMPLES :
ā¢ Grass is green.
ā¢ 4 + 2 = 6
ā¢ 4 + 2 = 7
ā¢ There are four fingers in a hand.
are propositions
9. 9
Logic
ā¢ Rule:
ā If the sentence is preceded by other sentences that make
the pronoun or variable reference clear, then the sentence is
a Statement.
ā¢ Example
ā¢ Bill Gates is an American
ā¢ He is very rich
ā¢ He is very rich is a statement with truth-value TRUE.
ā¢ Example:
ā¢ x = 1
ā¢ x > 2
ā¢ x > 2 is a statement with truth-value FALSE.
11. 11
Logic
ā¢ UNDERSTANDING STATEMENTS:
ā¢ x + 2 is positive. Not a statement
ā¢ May I come in? Not a statement
ā¢ Logic is interesting. A statement
ā¢ It is hot today. A statement
ā¢ -1 > 0 A statement
ā¢ x + y = 12 Not a statement
12. 12
Logic
ā¢ COMPOUND STATEMENT :
ā¢ Simple statements could be used to build a
compound statement.
ā¢ EXAMPLES:
ā¢ 1. ā3 + 2 = 5ā and āLahore is a city in Pakistanā
ā¢ 2. āThe grass is greenā or ā It is hot todayā
ā¢ 3. āDiscrete Mathematics is not difficult to meā
ā¢ AND, OR, NOT are called LOGICAL
CONNECTIVES.
13. 13
Logic
CONNECTIV MEANING SYMBOL CALLED
Negation not ~ Tilde
Conjunction and ļ Hat
Disjunction or ļ Vel
Conditional ifā¦thenā¦ ļ® Arrow
Biconditional if and only if ļ« Double arrow
14. 14
Logic
ā¢ SYMBOLIC REPRESENTATION:
ā Statements are symbolically represented by
letters such as p, q, r,...
ā¢ EXAMPLES:
ā¢ p = āIslamabad is the capital of Pakistanā
ā¢ q = ā17 is divisible by 3ā
15. 15
Logic
ā¢ EXAMPLES:
ā¢ p = āIslamabad is the capital of Pakistanā
ā¢ q = ā17 is divisible by 3ā
ā¢ p ļ q = āIslamabad is the capital of Pakistan and
17 is divisible by 3ā
ā¢ p ļ q = āIslamabad is the capital of Pakistan or
17 is divisible by 3ā
ā¢ ~p = āIt is not the case that Islamabad is the
capital of Pakistanā or simply āIslamabad is not
the capital of Pakistanā
16. 16
Logic
ā¢ TRANSLATING FROM ENGLISH TO
SYMBOLS:
ā¢ Let p = āIt is hotā, and q = āIt is sunnyā
ā¢ SENTENCE SYMBOLIC FORM
ā¢ 1. It is not hot. ~ p
ā¢ 2. It is hot and sunny. p ļq
ā¢ 3. It is hot or sunny. p ļ q
ā¢ 4. It is not hot but sunny. ~ p ļq
ā¢ 5. It is neither hot nor sunny. ~ p ļ ~ q
17. 17
Logic
ā¢ EXAMPLE:
ā¢ Let h = āZia is healthyā
ā¢ w = āZia is wealthyā
ā¢ s = āZia is wiseā
ā¢ Translate the compound statements to symbolic form:
ā¢ 1. Zia is healthy and wealthy but not wise. (h ļ w) ļ (~s)
ā¢ 2. Zia is not wealthy but he is healthy and wise. ~w ļ (h
ļ s)
ā¢ 3. Zia is neither healthy, wealthy nor wise. ~h ļ ~w ļ ~s
18. 18
Logic
ā¢ TRANSLATING FROM SYMBOLS TO ENGLISH:
ā¢ Let m = āAli is good in Mathematicsā
ā¢ c = āAli is a Computer Science studentā
ā¢ Translate the following statement forms into plain English:
ā¢ ~ c Ali is not a Computer Science student
ā¢ cļ m Ali is a Computer Science student or good in Maths.
ā¢ m ļ ~c Ali is good in Maths but not a Computer Science
student
ā¢ A convenient method for analyzing a compound statement is to
make a truth table for it.
ā¢ A truth table specifies the truth value of a compound proposition for
all possible truth values of its constituent propositions.
19. 19
Logic
ā¢ NEGATION (~):
ā¢ If p is a statement variable, then negation
of p, ānot pā, is denoted as ā~pā
ā¢ It has opposite truth value from p i.e., if p
is true, ~p is false; if p is false, ~p is true.
21. 21
Logic
ā¢ CONJUNCTION (ļ):
ā¢ If p and q are statements, then the
conjunction of p and q is āp and qā,
denoted as āp ļ qā.
ā¢ It is true when, and only when, both p and
q are true. If either p or q is false, or if
both are false, pļq is false.
23. 23
Logic
ā¢ DISJUNCTION (ļ) or INCLUSIVE OR
ā¢ If p & q are statements, then the
disjunction of p and q is āp or qā,
denoted as āp ļ qā.It is true when at least
one of p or q is true and is false only when
both p and q are false.
26. 26
Logic
ā¢ Draw Truth Tables for:
ā¢ ~ p ļ q
ā¢ ~ p ļ (q ļ ~ r)
ā¢ (pļq) ļ ~ (pļq)
27. 27
Summary
ā¢ What is a statement?
ā¢ How a compound statement is formed.
ā¢ Logical connectives (negation,
conjunction, disjunction).
ā¢ How to construct a truth table for a
statement form.
Editor's Notes
An argument is a reason or set of reasons given in support of an idea, action or theory.