0% found this document useful (0 votes)
112 views

Discrete - Mathematics 2021 3

This document provides an overview of discrete mathematics, including logic, sets, functions, relations, induction, recursion, counting, graph theory, and Boolean algebras. It summarizes key concepts in logic such as propositions, truth tables, connectives like negation and conjunction, conditional statements, contrapositives, converses, inverses, and biconditionals. Propositions can be true or false, and logic uses syntax, meaning, and inference rules. Truth tables define the truth values of compound propositions based on connectives.

Uploaded by

Osama Alzaky
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

Discrete - Mathematics 2021 3

This document provides an overview of discrete mathematics, including logic, sets, functions, relations, induction, recursion, counting, graph theory, and Boolean algebras. It summarizes key concepts in logic such as propositions, truth tables, connectives like negation and conjunction, conditional statements, contrapositives, converses, inverses, and biconditionals. Propositions can be true or false, and logic uses syntax, meaning, and inference rules. Truth tables define the truth values of compound propositions based on connectives.

Uploaded by

Osama Alzaky
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Discrete Mathematics

Contain:
1\ Logic
2\ Sets, Functions, Relations
3\ Induction, Recursion
4\ Counting
5\ Graph Theory and Trees
6\ Boolean Algebras
Text :
Kenneth H. Rosen, Discrete Mathematics and Its Applications, 7th- ed, McGraw-Hill (2012).
Reference:
1. Epp, S. S. , Discrete mathematics with applications, Cengage learning (2010).
2. Goodaire, E. , & Parmenter, M. M., Discrete mathematics with graph theory, Prentice Hall PTR (2002).
The Foundations: Logic and Proofs
Logic :
It is a formal language for representing knowledge and for making logical inferences.
By logic, we define:
1. Syntax of statements. 2. The meaning of statements. 3. The rules of logical inferences.
Proposition:
It is a declarative sentence that is either true or false, but not both.
Remark :
1. We will use the letters p; q; r; s; ……. for propositional variables.
2. The truth value of a proposition is true (T) if it is a true proposition, and the truth value is false (F) if it is a
false proposition.
For the following are propositions:
1. “Khartoum is in Sudan ” (true) 2.“London is in Denmark” (false)
3. “2 < 4” (true), 4. “4 = 7 (false)”.
However the following are not propositions:
1. “what is your name?” (this is a question) 2. “do your homework” (this is a command)
3. “this sentence is false” (neither true nor false)
4. “x is an even number” (it depends on what x represents), “
The truth or falsehood of a proposition is called its truth value.
Connectives, Truth Tables.:
Connectives are used for making compound propositions. The main ones are the following (p and q represent
given propositions):
Name Represented Meaning
Negation “ Not ”
Conjunction “ and ”
Disjunction “ or ”
Exclusive Or “either or , but not both”
Implication “if then ”
Biconditional “ if and only if ”

Dr. Nader William Amin Page 1


The truth value of a compound proposition depends only on the value of its components. We can summarize the
meaning of the connectives in the following way:
Negation:
Let be a proposition. The negation of , denoted by: , is the statement "It is not the case that p." The truth
value of the negation of , , is the opposite of the truth value of .

Example :
1. Prop. : Today is Friday.  : It is not the case that today is Friday
2. Prop. : Ali eats ice-cream every day.  : It is not the case that Ali eats ice-cream every day.
3. Prop. : 10 is prime number.  : It is not the case that 10 is prime number.
Conjunction and Disjunction :
Let p and q be propositions.
1. The conjunction of and , denoted by , is the proposition " and ." The conjunction is true when
both and are true and is false otherwise.
2. The disjunction of and , denoted by , is the proposition "p or q." The disjunction is false when
both p and q are false and is true otherwise.

T T T T
T F F T
F T F T
F F F F
Example: Find the truth value of the following propositions:
1. 13 is a perfect square and 5 + 2 = 7. ( )
2. 9 is a prime number or 5 + 2 = 8. ( )
3 . 9 is perfect square and 13 is a prime number. ( )
Exclusive Or :
Let and be propositions. The proposition " exclusive or ", denoted by , is true when exactly one of
and is true and it is false otherwise.

T T F
T F T
F T T
F F F

Dr. Nader William Amin Page 2


Conditional Statements:
Let and be propositions. The conditional statement is the proposition "if , then ." The conditional
statement is false when is true and is false, and true otherwise. A conditional statement is also called
an implication. In the conditional statement , p is called the hypothesis and q is called the conclusion.
The conditional statement can be expressed in the following equivalent forms:
1. If , then . 2. implies . 3. only if . 4. p is sufficient for q.
5. A sufficient condition for is . 6. is necessary for . 7. A necessary condition for is .

T T T
T F F
F T T
F F T
Example :
1. Consider the two propositions: : "Ali studies hard" , : "Ali will get a good grade".
Express the statement as a statement in language.

2. Find the truth value of the statement: "if 10 is not prime numbers, then 2+3=6". ( )

3. Find the truth value of the statement: "if 9 is a perfect square, then 13 is a prime number". ( )

4. If = 3, what is the value of the variable x after the statement: "if 2 + 2 = 4, then ". ( )

CONVERSE, CONTRAPOSITIVE, AND INVERSE:


We can form some new conditional statements starting with a conditional statement . In particular, there
are three related conditional statements that occur so often that they have special names.
1. The converse of is the proposition proposition .
2. The contrapositive of is the proposition : .
3. The inverse of is proposition : .
Example : Show that of these three conditional statements formed from , only the contrapositive always
has the same truth value as .
Solution :

T T F F T T T T
T F F T F T F T
F T T F T F T F
F F T T T T T T
The truth table of the contrapositive, and the truth table of the conditional statement are
same .
Note that the converse and the inverse are both same truth table also .

Dr. Nader William Amin Page 3


Definition : Two compound propositions are called equivalent if they have the same truth values.
Remark: According to this definition, we have the following:
1. A conditional statement and its contrapositive are equivalent.
2. The converse and the inverse of a conditional statement are also equivalent.
3. Neither the converse nor the inverse of a conditional statement is equivalent to the original conditional
statement.
Example: What are the contrapositive, the converse, and the inverse of the conditional statement
"The home team wins whenever it is raining"
Solution: Because " whenever " is one of the ways to express the conditional statement , the original
statement can be rewritten as "If it is raining, then the home team wins."
Consequently, the contrapositive of this conditional statement is "If the home team does not win, then it is not
raining."
The converse is "If the home team wins, then it is raining."
The inverse is "If it is not raining, then the home team does not win."
Only the contrapositive is equivalent to the original statement.
Biconditionals :
Let and be propositions. The biconditional statement is the proposition " if and only if ."
The biconditional statement is true when p and q have the same truth values, and is false otherwise.
Biconditional statements are also called bi-implications.

T T T
T F F
F T F
F F T
Remark:
1. From the truth table, note that the statement is true when both the conditional statements and
are true and is false otherwise. That is, is equivalent to ( ) ( ).
2. This illustrate why we express this logical connective by "if and only if" and why it is symbolically written
by combining the symbols and .
3. There are some other common ways to express :
(a) " is necessary and sufficient for ." (b) "if then , and conversely."
Tautology, Contradiction, Contingency.
1. A proposition is said to be a tautology if its truth value is T for any assignment of truth values to its
components.
For example: The proposition is a tautology.
2. A proposition is said to be a contradiction if its truth value is F for any assignment of truth values to its
components.
For example: The proposition is a contradiction.
3. A proposition that is neither a tautology nor a contradiction is called a contingency.

T F T F
F T T F

Dr. Nader William Amin Page 4


Example : Prove that q
Solution:

T T F T T
T F F F F
F T T T T
F F T T T
Note that the compound propositions and q have the same truth values then and q are
logically equivalent
Example : Show that ( ) :
Solution:
( ) ( )
( )

Exercise:
A) Construct the truth table of the compound proposition:
1. ( ) ( ) 2. ( ) ( ) 3. ( )
B) Prove that :
1. ( ) 2. ( ) 3. ( )
4. ( ) 5. ( ) ( ) is a tautology.
6. ( ) ( ) is a contradiction.

Dr. Nader William Amin Page 5


Inferential Logic
Rules of Inferential Logic :
 The main concern of logic is how the truth of some propositions is connected with the truth of another.
Thus, we will usually consider a group of related propositions.
 An argument is a set of two or more propositions related to each other in such a way that all but one of
them (the premises) are supposed to provide support for the remaining one (the conclusion).
 The transition from premises to conclusion is the inference upon which the argument relies.
 Note: : Premises - : Conclusion
 Now, suppose that the premises of an argument are all true. Then the conclusion may be either true or
false. When the conclusion is true then the argument is said to be valid (An argument is valid if the
conjunction of the premises implies the conclusion, i.e., ( ) ) is a tautology).
When the conclusion is false then the argument is said to be invalid.
To test an argument for validity one proceeds as follows:
(1) Identify the premises and the conclusion of the argument.
(2) Construct a truth table including the premises and the conclusion.
(3) Find rows in which all premises are true.
(4) In each row of Step (3), if the conclusion is true then the argument is valid; otherwise the argument is
invalid.
Example :
 : is positive or is negative.
 : If is positive, then .
 : If is negative, then .
 : .
Prove that this argument is valid.
Solution:
You must check that ( ) ) is a tautology. First create variables for
1. : is positive
2. is negative
3.
: is positive or is negative , : If is positive, then
: If is negative, then
: ( ) ( ) ( )
( )
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Note: The conclusion is false for the integers (x = 0)

Dr. Nader William Amin Page 6


Example:
 : If Ali does his homework, he will pass the course.
 : Ali did not do his homework.
 : Ali failed the course.
Prove that this argument is invalid.
Solution:
: doing homework and : failing the course.
: If Ali does his homework, he will pass the course
: Ali did not do his homework
( ) ( )
T T
T F
F T
F F
This argument is invalid because ( ) is not a tautology.
Example :
Show that the argument

is invalid
Solution:
( ) ( ) ,( ) ( )- ( )
T T
T F
F T
F F
This argument is invalid because ,( ) ( )- ( ) is not a tautology.
Example : (Modus Ponens or the method of affirming)
a. Show that the argument

is valid.
b. Show that the argument

is valid.
Dr. Nader William Amin Page 7
Solution:
a)
( ) ,( ) -
T T
T F
F T
F F
This argument is valid because ,( ) - is a tautology.
b) Follows from (a) by replacing with and with .
Example : Show that the argument

is invalid.
Solution:
( ) ,( ) -
T T
T F
F T
F F
This argument is invalid because ,( ) - is not a tautology.
Remark: An argument of this form is referred to as converse error because the conclusion of the argument
would follows from the premises if is replaced by its converse .
Example: (Modus Tollens or the method of denial)
a) Show that the argument

is valid.
b) Show that the argument

is invalid
Solution:
a)
( ) ,( ) -
T T
T F
F T
F F
This argument is valid because ,( ) - is a tautology.
Remark: This is known as inverse error because the conclusion of the argument would follow from the
premises if is replaced by the inverse .
Dr. Nader William Amin Page 8
Example : (Disjunctive Addition)
a. Show that the argument

is valid.
b. Show that the argument

is valid.
Solution :
H.W.
Example : (Conjunctive addition)
Show that

is valid.
Solution :
H.W.
Example : (Conjunctive Simplification)
a) Show that the argument

is valid.
b) Show that the argument

is valid.
Solution :
H.W.
Example : (Disjunctive Syllogism)
a) Show that the argument

is valid.
b. Show that the argument

is valid.
Solution :
H.W.
Example : (Hypothetical Syllogism)
Show that the argument

is valid.
Solution :
H.W.

Dr. Nader William Amin Page 9


Exercise:
1) Use modus ponens or modus tollens to fill in the blanks in the argument below so as to produce valid
inferences.
If √ is rational, then √ for some integers and .
It is not true that √ for some integers and .

2) Use a truth table to determine whether the argument below is valid.

3) Use a truth table to determine whether the argument below is valid.

4) Use symbols to write the logical form of the given argument and then use a truth table to test the
argument for validity.
If Tom is not on team A, then Hua is on team B.
If Hua is not on team B, then Tom is on team A.
Tom is not on team A or Hua is not on team B.
5) Use the valid argument forms of this section to deduce the conclusion from the premises.

6) Use the valid argument forms of this section to deduce the conclusion from the premises.

Propositions and Quantifiers :


 A predicate is an expression involving one or more variables defined on some domain, called the
domain of discourse. Substitution of a particular value for the variable(s) produces a proposition which
is either true or false.
 In the expression ( ); is called a free variable. As varies the truth value of ( ) varies as well. The
set of true values of a predicate ( ) is called the truth set and will be denoted by .
Example :
Let ( ) 3 with domain the collection of natural numbers (i.e. the numbers ). What are the
truth values of the propositions ( ) and ( )?
Solution:
By substitution in the expression of Q we find: ( ) is false since .
On the contrary, ( ) is true since .
 If ( ) and ( ) are two predicates with a common domain then the notation ( ) ( )
means that every element in the truth set of ( ) is also an element in the truth set of ( ).

Dr. Nader William Amin Page 10


Example:
Consider the two predicates ( ) : is a factor of 4 and ( ) : is a factor of 8. Show that ( ) ( ).
Solution:
Finding the truth set of each predicate we have: * + and * +. Since every number
appearing in also appears in we have ( ) ( ).
 If two predicates ( ) and ( ) with a common domain are such that then we use the
notation ( ) ( )
Example :
Let ( is real number set ). Consider the two predicates ( ) and ( ) | | .
Show that ( ) ( ).
Solution:
Indeed, if then the distance from to the origin is at most 2. That is, | | and hence . Now,
if then | | ,i.e., ( )( ) .that means :
Either : ( ) and ( ) that is given : and , i.e: that is
Or: ( ) and ( ) that is given: and , i.e: not found (this case is not
allowed).
( ) ( )
 Another way to generate propositions is by means of quantifiers. For example ; ( ) is a
proposition which is true if ( ) is true for all values of in the domain of
For example: if is an nonnegative integer, then the predicate ( ) is even is true for all . We write:
,( is even).The symbol is called the universal quantifier.
 The proposition ; ( ) is false if ( ) is false for at least one value of , In this case x is
called a counter example.
Example:
Show that the proposition is false.
Solution:
A counterexample is : Clearly, .

Example:
Write in the form ; ( ) the proposition : “ every real number is either positive, negative or 0.”
Solution:

 The notation ; ( ) is a proposition that is true if there is at least one value of where
( ) is true; otherwise it is false. The symbol is called the existential quantifier.
Example:
Let ( ) denote the statement: What is the truth value of the proposition ; ( ).
Solution:
Since and ; the given proposition is true.
 The proposition ; ( ) ( ) is called the universal conditional proposition.
For example, the proposition ; if then is a universal conditional proposition.
Example:
Rewrite the proposition: „if a real number is an integer then it is a rational number” as a universal conditional
proposition.
Solution:
; if is an integer then is a rational number

Dr. Nader William Amin Page 11


Example:
a. What is the negation of the proposition ( )?
b. What is the negation of the proposition ( )?
c. What is the negation of the proposition ( ) ( )?
Solution:
a. ( )
b. ( )
c. Since ( ) ( ) ( ( )) ( ) we have ( ( ) ( )) ( ) ( )
Example:
Consider the universal conditional proposition: ; if ( ) then ( )
a. Find the contrapositive.
b. Find the converse.
c. Find the inverse.
Solution:
a. ; if ( ) then ( )
b. ; if ( ) then ( )
c. ; if ( )) then ( ).
Example:
a. Let ( ) denote the statement: What is the truth value of the proposition
( )( ) ( )?
b. Let ( ) denote the statement What is the truth value of the proposition
( )( ) ( )?
Solution:
a. The given proposition is always true.
b. The proposition is false. For otherwise, one can choose to obtain 0which is
impossible.
Example:
Find the negation of the following propositions:
a. ( )
b. ( )
Solution:
a. ( )
b. ( )
Example:
The symbol stands for the phrase “ there exists a unique”. Which of the following statements are true and
which are false.
a.
b. integer such that is an integer.
Solution:
a. True. Let
b. False since and are both integers with integer reciprocals.
Exercise:
1) By finding a counterexample, show that the proposition: “For all positive integers and ;
" is false.
2) Consider the statement: such that
Which of the following are equivalent ways of expressing this statement?
a. The square of each real number is 2. b. Some real numbers have square 2.
c. The number has square , for some real number
d. If is a real number, then e. Some real number has square 2.
f. There is at least one real number whose square is 2.

Dr. Nader William Amin Page 12


Arguments with Quantified Premises
In this section we discuss three types of valid arguments that involve the universal quantifier.
 The rule of universal instantiation:
( )

( )
Example :
Use universal instantiation to fill in valid conclusion for the following argument.
All positive integers are greater than or equal to 1
3 is a positive integer
--------------------------------------------------------------------------------------------------------
Solution:
All positive integers are greater than or equal to 1
3 is a positive integer

 Universal Modus Ponen:


( ) ( )
( )
( )
Example:
Use the rule of the universal modus ponens to fill in valid conclusion for the following argument.
.

---------------------------------------------------------------------------
Solution:
.

0 is an even number
 Universal Modus Tollens:
( ) ( )
( )
( )
Example:
Use the rule of the universal modus tollens to fill in valid conclusion for the following argument.
All healthy people eat an apple a day.
Harry does not eat an apple a day.
---------------------------------------------------------------------------
Solution:
All healthy people eat an apple a day.
Harry does not eat an apple a day.
Harry is not healthy
Next, we discuss a couple of invalid arguments whose premises involve quantifiers.
 The rule of converse error:
( ) ( )
( )
( )

Dr. Nader William Amin Page 13


Example:
What kind of error does the following invalid argument exhibit?
All healthy people eat an apple a day.
Helen eats an apple a day.
Helen is healthy
Solution:
This invalid argument exhibits the converse error.
 The rule of inverse error:
( ) ( )
( )
( )
Example:
What kind of error does the following invalid argument exhibit?
All healthy people eat an apple a day.
Hubert is not a healthy person.
: Hubert does not eat an apple a day.
Solution:
This invalid argument exhibits the inverse error.
Exercise:
1) Use the rule of universal modus ponens to _ll in valid conclusion for the argument.
For all real numbers ; and , if and then 4; and
are particular real numbers such that and
---------------------------------------------------------------------------
2) Use the rule of universal modus tollens to fill in valid conclusion for the argument.
If a computer is correct, then compilation of the program does not produce error messages.
Compilation of this program produces error messages.
---------------------------------------------------------------------------
3) Use the rule of universal modus ponens to fill in valid conclusion for the argument.
All freshmen must take writing.
Caroline is a freshman.
---------------------------------------------------------------------------
4) What kind of error does the following invalid argument exhibit?
All cheaters sit in the back row.
George sits in the back row.
George is a cheater.
5) What kind of error does the following invalid argument exhibit?
All honest people pay their taxes.
Darth is not honest.
Darth does not pay his taxes.

Dr. Nader William Amin Page 14


Fundamentals of Mathematical Proofs
In this section we discuss some common methods of proof and the standard terminology that accompanies
them.
- A mathematical system consists of axioms, definitions, and undefined terms.
- An axiom is a statement that is assumed to be true.
- A definition is used to create new concepts in terms of existing ones.
- A theorem is a proposition that has been proved to be true.
- A lemma is a theorem that is usually not interesting in its own right but is useful in proving another theorem.
- A corollary is a theorem that follows quickly from a theorem.
For example of mathematical system:
- Points and lines are examples of undefined terms.
- An example of a definition: Two angles are supplementary if the sum of their measures is 180.
- An example of an axiom: Given two distinct points, there is exactly one line that contains them.
- An example of a theorem: If two sides of a triangle are equal, then the angles opposite them are equal.
- An example of a corollary: If a triangle is equilateral, then it is equiangular.
- An argument that establishes the truth of a theorem is called a proof. Logic is a tool for the analysis of
proofs.
Methods of Direct Proof :
- We discuss methods for proving a theorem of the form “ such that ( ).” This theorem guarantees the
existence of at least one for which the predicate ( ) is true.
- The proof of such a theorem is constructive: that is, the proof is either by finding a particular that makes
( ) true or by exhibiting an algorithm for finding .
- By a nonconstructive existence proof, we mean a method that involves either showing the existence of
using a proved theorem (or axioms) or the assumption that there is no such leads to a contradiction.
The disadvantage of nonconstructive method is that it may give virtually no clue about where or how to
find .
- Theorems are often of the form “ if ( ) then ( )” . We call ( ) the hypothesis and ( ) the
conclusion.
- Let us first consider a proposition of the form , if ( ) . Then this can be written in the form
“ , if then ( )”. If is a finite set, then one checks the truth value of ( ) for each .
This method is called the method of exhaustion.
- Finally, to show that a proposition of the form “ ; if ( ) then ( )” is false it suffices to find an
element where ( ) is true but ( ) is false. Such an is called a counterexample.
Example : Show that there exists a positive integer whose square can be written as the sum of the squares of
two positive integers.
Solution:
Indeed, one example is
Example : Show that there exists an integer such that
Solution:
Applying the well-known algorithm of extracting the square root we find that : √
Dr. Nader William Amin Page 15
Example: Show that for each integer is a prime number.
Solution: The given proposition can be written in the form “ , if then ( ) is prime"
where ( ) . Using the method of exhaustion we see that
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( )
Remark:
- The most powerful technique for proving a universal proposition is one that works regardless of the size of
the domain over which the proposition is quantified. It is called the method of generalizing from the
generic particular.
- The method consists of picking an arbitrary element of the domain (known as a generic element) for which
the hypothesis ( ) is satisfied, and then using definitions, previously established results, and the rules of
inference to conclude that Q(x) is also true.
- By a direct method of proof we mean a method that consists of showing that if ( ) is true for then
( ) is also true.
Example : Prove the following theorem: For all , if and are even then so is .
Proof: Let and be two even integers. Then there exist integers and such that and .
We must show that is even, that is, an integer multiple of 2. Indeed,
( )
where Thus, by the definition of even, is even
Example: Prove the following theorem: Every integer is a rational number.
Proof: Let be an arbitrary integer. Then . By the definition of rational numbers, is rational
Example: Prove the following theorem: If then .
Proof:
Let and be two rational numbers. Then there exist integers and such that and
. By the property of addition of two fractions we have

By letting and , we get : That is,


Example: Prove the following corollary :The double of a rational number is rational.
Proof:
Let in the previous theorem we see that
Remarks: some common mistakes that must be avoided in proving theorems:
1) Arguing from examples. The validity of a general statement cannot be proved by just using a particular
example.
2) Using the same letters to mean two different things. (For example, suppose that and are any two
given even integers. Then by writing and this would imply that which is
inconsistent with the statement that and are arbitrary).
3) Jumping to a conclusion.
( Let us illustrate by an example. Suppose that we want to show that if the sum of two integers is even so is their
difference. Consider the following proof: Suppose that is even. Then there is an integer such
that . Then, and so is even.The problem with this proof is that the crucial
step ( ) is missing. The author of the proof has jumped prematurely
to a conclusion).

Dr. Nader William Amin Page 16


Example: Disprove the proposition ; then :
Solution: A counterexample is the following. Let and : Then but
Exercise:
1) Prove the following theorem: “ The product of two rational numbers is a rational number “.
2) Use the previous exercise to prove the following Corollary: ”The square of any rational number is
rational”.
3) Use the method of constructive proof to show that if r and s are two real numbers with then there
exists a real number such that ”.
More Methods of Proof:
- A vacuous proof is a proof of an implication in which it is shown that p is false.
- A trivial proof of an implication is one in which q is shown to be true without any reference to p.
- The method of proof by cases is a direct method of proving the conditional proposition
. The method consists of proving the conditional propositions
; ; ; .
Example:
Use the method of vacuous proof to show that if ; then David is playing pool.
Solution:
Since the proposition ; is always false, the given proposition is vacuously true .
Example:
Use the method of trivial proof to show that if is an even integer then is divisible by 1.
Solution:
Since the proposition n is divisible by 1 is always true, the given implication is trivially true
Example:
Show that if is a positive integer then is an even.
Solution.
We use the method of proof by cases.
Case 1: Suppose that is even. Then there is such that .
In this case, ( ) this is an even.
Case 2: Suppose that is odd. Then there is a such that .
In this case, ( ) ( )

( ) which is an even
Example:
Use the proof by cases to prove the triangle inequality: | | | | | |.
Solution:
Case 1: and : Then and so | | | | | |
Case 2: and : Then | | | | | |.
On the other hand, ( ) ( ) ( ) | | | | | |.
Thus, if | | then | | | | | | and if | | ( ) then | | | | | |.
Case 3: The case and is similar to case 2.
Case 4: Suppose and : Then and therefore
| | ( ) ( ) ( ) | | | |.
So in all four cases | | | | | | .
Exercise:
1) Prove that for any integer the product ( ) is even.
2) Prove that the square of any integer has the form or for some integer
3) Prove that ( )( ) is divisible by 4 ,for any integer .
Dr. Nader William Amin Page 17
Methods of Indirect Proofs: Contradiction and Contraposition :
Recall that in a direct proof one starts with the hypothesis of an implication and then proves that the
conclusion is true. Any other method of proof will be referred to as an indirect proof. In this section we study
two methods of indirect proofs, namely, the proof by contradiction and the proof by contrapositive.
- Proof by contradiction: We want to show that is true. We assume it is not and therefore is true and
then derive a contradiction.
- Proof by contrapositive: We already know that .So to prove we sometimes
instead prove .
Example:
Prove that: If is an even integer so is .
Proof:
Suppose the contrary. That is suppose that is odd. Then there is an integer such that . In
this case, ( ) ( is odd and this contradicts the assumption that is even. Hence,
must be even.
Example:
Prove that the number √ is irrational.
Proof:
Suppose √ is not irrational. That is, suppose that √ is rational. Then there exist two integers and
with no common divisors such that √ .
Squaring both sides of this equality we find that . Thus, is even. (By above example), m is even.
That is, divides : But then for some integer .
Taking the square we find that ; that is . This says that is even and (By above
example). is even.
We conclude that 2 divides both and and this contradicts our assumption that and have no common
divisors. Hence, √ is irrational.
Example:
Prove that he set of prime numbers is infinite.
Proof:
Suppose not. That is, suppose that the set of prime numbers is finite. Then these prime numbers can be listed,
say, . Now, consider the integer . By the Unique Factorization Theorem,
can be factored into primes.
Thus, there is a prime number such that ( is divided by ) . But since we have
= 1; a contradiction since
Example:
Prove that If is an integer such that is odd then is also odd.
Proof:
Suppose that is an integer that is even. Then there exists an integer such that .
But then ( ) which is even.
Exercise :
1) Use the proof by contradiction to prove the proposition “ There is no greatest even integer.”
2) Prove by contradiction that the difference of any rational number and any irrational number is irrational.
3) Use the proof by contraposition to show that if a product of two positive real numbers is greater than
100, then at least one of the numbers is greater than 10.
4) Use the proof by contradiction to show that the product of any nonzero rational number and any
irrational number is irrational.
Dr. Nader William Amin Page 18
Method of Proof by Induction:
We want to prove that a predicate ( ) is true for any nonnegative integer . The steps of mathematical
induction are as follows:
(i) (Basis of induction) Show that ( ) is true.
(ii) (Induction hypothesis) Assume ( ) is true.
(iii) (Induction step) Show that ( ) is true.
Example:
Use the technique of mathematical induction to show that
( )

Solution:
( )
Let ( ) . Then
( )
(i) (Basis of induction) ( ) . That is, ( ) is true.
( )
(ii) (Induction hypothesis) Assume ( ) is true. That is, ( ) .
( )( )
(iii) (Induction step) We must show that ( ) ( ) .Indeed,
( ) ( )( )
( ) ( ) ( )0 1
Example:
( )
a. Use induction to show ( ) ∑ .
b. Show that .

Solution:
a. We use the method of proof by mathematical induction.
( ) ( )
(i) (Basis of induction) ∑ .That is, ( ) is true.
( )
(ii) (Induction hypothesis) Assume ( ) is true. That is, ∑
( )
(iii) (Induction step)We must show that ( ) is true. That is, ∑ . Indeed,
( )
∑ ∑

( )

b. by a. we have
( . / )
( )

Dr. Nader William Amin Page 19


Example: Use induction to show For all integers is divisible by 3.
Proof:
Let ( ) is divisible by 3. Then
(i) (Basis of induction) ( ) is true since is divisible by 3.
(ii) (Induction hypothesis) Assume ( ) is true. That is, is divisible by 3.
(iii) (Induction step) We must show that is divisible by 3. Indeed,
Let , Now

( )

( )

Therefore, is divisible by 3
Example:
Use induction to prove that for all non-negative integers .
Solution:
a. Let ( ) We want to show that ( ) is valid for all . By the method of mathematical
induction we have
(i) (Basis of induction) . That is, . Thus, ( ) is true.
(ii) (Induction hypothesis) Assume ( ) is true. That is, .
(iii) (Induction step) We must show that ( ) is also true. That is, . Indeed,
( ) ( )
( )

where we used the fact that


Exercise:
1) Use induction to prove that for all non-negative integers .
2) Let . Use induction to show that ( ) ( ) .
3) Use the method of induction to show that for all integers .
4) Use mathematical induction to prove that for all integers .
( )( )
5) Use mathematical induction to show that for all integers .
( )
6) Use mathematical induction to show that for all integers .
7) Use mathematical induction to show that ( )
for all integers .

Dr. Nader William Amin Page 20


Recursion:
- A recurrence relation for a sequence is a relation that defines in terms
of . The formula relating to earlier values in the sequence is called the generating
rule. The assignment of a value to one of the a's is called an initial condition .
- A solution to a recurrence relation is explicit formula for an in terms of .
The most basic method for finding the solution of a sequence defined recursively is by using iteration.
The iteration methods consist of starting with the initial values of the sequence and
then calculate successive terms of the sequence until a pattern is observed.
At that point one guesses an explicit formula for the sequence and then uses mathematical induction to prove
its validity.
Example:
The Fibonacci sequence :
is a sequence in which every number after the first two is the sum of the preceding two numbers. Find the
generating rule and the initial conditions.
Solution:
The initial conditions are and the generating rule is
Example:
Find a solution for the recurrence relation
Solution:
Listing the first five terms of the sequence one finds

Hence, a guess is It remains to show that this formula is valid by using mathematical
induction.
Basis of induction: For , ( ) .
Induction hypothesis: Suppose that :
Induction step: We must show that ( ) . By the definition of we have
( ) ( )
Example: Find a solution to the recurrence relation

( )
Solution: Listing the first five terms of the sequence one finds

Hence, a guess is
( )
( )
We next show that the formula is valid by using induction on
( )
Basis of induction: For , .
( )
Induction hypothesis: Suppose that .
( )
Induction step: We must show that . By the definition of we have
( ) ( )

Dr. Nader William Amin Page 21


Remark:
When iteration does not apply, other methods are available for finding explicit formulas for special classes of
recursively defined sequences. The method explained below works for sequences of the form
( )
where is greater than or equal to some fixed nonnegative integer and and are real numbers with
.Such an equation is called a second- order linear homogeneous recurrence relation with constant coefficients.
For example: the Fibonacci sequence is defined recursively by and
Thus, an satisfies a second-order linear homogeneous relation with A = B = 1.
Theorem:
Equation (*) is satisfied by the sequence where if and only if t is a solution to the
characteristic equation ( )
Proof:
( ) Suppose that is a nonzero real number such that the sequence satisfies (*). We
will show that satis_es the equation Indeed, for we have

Since we can divide through by and obtain


(  ) Suppose that is a nonzero real number such that
Multiply both sides of this equation by to obtain

This says that the sequence satisfies (*).


Theorem:
If and are solutions to (*) then for any real numbers and the sequence

is also a solution.
Proof:
Since and are solutions to (*), for we have

Therefore,
( ) ( )
( ) ( )

so that an satisfies (*)


Theorem:
Let and be real numbers and suppose that the characteristic equation: has a single root .
Then the sequences * + and * + both satisfy the recurrence relation

Proof:
Since is a root to the characteristic equation, the sequence * +g is a solution to the recurrence
relation

Now, since is the only solution to the characteristic equation we have


( )
This implies that and . Let . Then
( ) ( )
( ) ( )
( ) ( )

Dr. Nader William Amin Page 22


So is a solution to

Example: Consider the recurrence relation

Find two sequences that satisfy the given generating rule and have the form
Solution:
According to theorem, must satisfy the characteristic equation:

Solving for we find or . So the two solutions to the given recurrence sequence are
and ( ) ( ) ( ) ( )
Example: Find a solution to the recurrence relation

Solution:
Consider the recurrence relation:
According to theorem, must satisfy the characteristic equation:

Solving for we find or . So the two solutions to the given recurrence sequence are
and ( ) ( ) ( ) ( )
According to theorem, ( ) is also a solution to the recurrence relation

If satisfies the system then we must have


( )
( )
This yields the system

Solving this system to find and .Hence, ( ) ( )


Example: Find an explicit formula for the Fibonacci sequence

Solution:
The roots of the characteristic equation

√ √
are and .Thus,
√ √
( ) ( )
is a solution to

Using the values of and we obtain the system


√ √
( ) ( )

√ √
( ) ( )

Dr. Nader William Amin Page 23


√ √
( ) ( )

Solving this system to obtain


√ √
√ √
Hence,
√ √
( ) ( )
√ √
Example: Find an explicit formula for

Solution:
Solving the characteristic equation

we _nd the single root . Thus,


( ) ( )
is a solution to the equation . Since and ;
we obtain the following system of equations:
( ) ( )
( ) ( )
Hence,
( ) ( )

Exercise:
1) Find the first four terms of the following recursively defined sequence:

2) Prove each of the following for the Fibonacci sequence:


a)
b)
c)
3) Find a formula for each of the following sums:
a) ( )
b)
4) Use iteration to guess a formula for the following recursively defined sequence and then use
mathematical induction to prove the validity of your formula: , for all .
5) Use iteration to guess a formula for the following recursively defined sequence and then use
mathematical induction to prove the validity of your formula: , for all .
6) Determine whether the recursively defined sequence: and satisfies the
recursive formula ( )
7) Let be the sequence defined by the recursive formula where
and are real numbers.
a. Find and so that and , What is in this case?
b. Find and so that and , What is in this case?

Dr. Nader William Amin Page 24


Elements of Graph Theory
In this section we present the basic concepts related to graphs and trees such as the degree of a vertex,
connectedness, Euler and Hamiltonian circuits, isomorphisms of graphs, rooted and spanning trees.
Graphs, Paths, and Circuits
- An undirected graph consists of a set of vertices and a set of edges such that each edge is
associated with an unordered pair of vertices, called its endpoints.
- A directed graph or digraph G consists of a set of vertices and a set of edges such that each edge
is associated with an ordered pair of vertices.
- We denote a graph by ( ).
- Two vertices are said to be adjacent if there is an edge connecting the two vertices. Two edges associated
to the same vertices are called parallel.
- An edge incident to a single vertex is called a loop. A vertex that is not incident on any edge is called an
isolated vertex.
- A graph with neither loops nor parallel edges is called a simple graph.
Example: Consider the following graph
a. Find and .
b. List the isolated vertices.
c. List the loops.
d. List the parallel edges.
e. List the vertices adjacent to .
f. Find all edges incident on .
Solution:
a. * + and * +.
b. There is only one isolated vertex, .
c. There is only one loop, .
d. * +. e. * +. f. * +
Example: Which one of the following graphs is simple.

Solution:
a. is not simple since it has a loop and parallel edges. b. is simple.
- A complete graph on vertices, denoted by , is the simple graph that contains exactly one edge between
each pair of distinct vertices.
Example: Draw and .
Solution:

Dr. Nader William Amin Page 25


- A graph in which the vertices can be partitioned into two disjoint sets and with every edge incident on
one vertex in and one vertex of is called bipartite graph.
Example:
a. Show that the graph is bipartite.

b. Show that is not bipartite.


Solution:
a. From graph , we notice that * + and * + .
Thus, according to the definition of bipartite graph, the graph is bipartite
b.

From graph , we notice that * + , * + and * + ,


* +, * + and * +. Any two sets of vertices of will have one set
with at least two vertices. Thus, according to the definition of bipartite graph, is not bipartite.
- A complete bipartite graph is the graph that has its vertex set partitioned into two disjoint subsets of
and vertices, respectively. Moreover, there is an edge between two vertices if and only if one vertex is
in the first set and the other vertex is in the second set.
Example: Draw and
Solution:

* +, * + * +, * +

* + * +
* + * +
* +
- The degree of a vertex in an undirected graph, in symbol ( ); is the number of edges incident on it.
By definition, a loop at a vertex contributes twice to the degree of that vertex.
- The total degree of is the sum of the degrees of all the vertices of .

Dr. Nader William Amin Page 26


Example: What are the degrees of the vertices in the following graph and the total degree of the graph?
Solution:

( ) ( ) ( )
The total degree of the graph= 6

Theorem:
For any graph ( ) , we have
| | ∑ ( )

Proof:
Suppose that * + and | | . Let . If is a loop then it contributes 2 to the total
degree of . If is not a loop then let and denote the endpoints of . Then e contributes 1 to ( )
and contributes 1 to the ( ) . Therefore, contributes 2 to the total degree of G. Since was chosen
arbitrarily, this shows that each edge of G contributes 2 to the total degree of G. Thus,
| | ∑ ( )

The following is easily deduced from the previous theorem.


Theorem:
In any graph there is an even number of vertices of odd degree.
Proof:
Let ( ) be a graph. By the previous theorem, the sum of all the degrees of the vertices is | |,
an even number. Let be the sum of the numbers ( ), each which is even and the sum of numbers
( ) each which is odd. Then . That is, . Since both and are even, is also
even. This implies that there must be an even number of the odd degrees. Hence, there must be an even number
of vertices with odd degree.
Example: Find a formula for the number of edges in .
Solution:
Since is complete, each vertex is adjacent to the remaining vertices. Thus, the degree of each of the vertices
is , and we have the sum of the degrees of all of the vertices being ( )
By Theorem , ( ) | | . This completes a proof of the theorem

- In an undirected graph a sequence of the form with no edge repeated is


called a path of length or a path connecting to .
- If is a path such that then it is called a circuit or a cycle.
- A path or circuit is simple if it does not contain the same vertex more than once. A graph that does not
contain any circuit is called a cyclic.

Dr. Nader William Amin Page 27


Example: In the graph below, determine whether the following sequences are paths, simple paths, circuits, or
simple circuits.
a. .
b. .
c.
d. .
Solution:
a. a path (no repeated edge), not a simple path (repeated vertex ),
not a circuit
b. a simple path
c. a simple circuit
d. a circuit, not a simple circuit (vertex v4 is repeated)
- An undirected graph is called connected if there is a path between every pair of distinct vertices of the
graph. A graph that is not connected is said to be disconnected.
Example: Determine which graph is connected and which one is disconnected.

(a) (b)
Solution:
a. Connected.
b. Disconnected since there is no path connecting the vertices and .
- A simple path that contains all edges of a graph is called an Euler path. If this path is also a circuit, it is
called an Euler circuit.
Theorem:
If a graph has an Euler circuit then every vertex of the graph has even degree.
Proof:
Let be a graph with an Euler circuit. Start at some vertex on the circuit and follow the circuit from vertex to
vertex, erasing each edge as you go along it. When you go through a vertex you erase one edge going in and one
edge going out, or else you erase a loop. Either way, the erasure reduces the degree of the vertex by 2.
Eventually every edge gets erased and all the vertices have degree 0. So all vertices must have had even degree
to begin with.
It follows from the above theorem that if a graph has a vertex with odd degree then the graph can not have an
Euler circuit.
The following provides a converse to the above theorem.

Dr. Nader William Amin Page 28

You might also like