0% found this document useful (0 votes)
26 views44 pages

3

The document discusses recursive definitions and algorithms, emphasizing the importance of initial conditions and closed formulas in defining sequences. It explains the concept of mathematical induction and structural induction for proving results about recursively defined sets. Additionally, it includes examples related to logical propositions and counterexamples for universally quantified statements.

Uploaded by

mhmtyvuzz01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views44 pages

3

The document discusses recursive definitions and algorithms, emphasizing the importance of initial conditions and closed formulas in defining sequences. It explains the concept of mathematical induction and structural induction for proving results about recursively defined sets. Additionally, it includes examples related to logical propositions and counterexamples for universally quantified statements.

Uploaded by

mhmtyvuzz01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

• The initial conditions for a recursively defined sequence specify the

terms that precede the first term where the recurrence relation takes
effect
• We say that we have solved the recurrence relation together with the
initial conditions when we find an explicit formula, called a closed
formula, for the terms of the sequence.
• The technique used in Example 10 is called iteration
SUMMATION
Mathematical Induction

Remark: In a proof by mathematical induction it is not assumed that P(k)


is true for all positive integers! It is only shown that if it is assumed that
P(k) is true, then P(k + 1) is also true. Thus, a proof by mathematical
induction is not a case of begging the question, or circular reasoning.
The sums of the first n positive odd integers
EXAMPLE
• Any number n, where n>= 12 can be written as n=4a+5b where
a,b>=0 are integers.
Recursive Definitions
• Sometimes it is difficult to define an object explicitly. However, it may
be easy to define this object in terms of itself. This process is called
recursion.
• When we define a set recursively, we specify some initial elements in
a basis step and provide a rule for constructing new elements from
those we already have in the recursive step. To prove results about
recursively defined sets we use a method called structural induction.
Such a definition is called a recursive or inductive definition. Note that a function
f(n) from the set of nonnegative integers to the set of a real numbers is the same as a
sequence a0, a1, . . . where ai is a real number for every nonnegative integer i.
Recursive Algorithms
Recursion and Iteration
• A recursive definition expresses the value of a function at a positive
integer in terms of the values of the function at smaller integers.
• This means that we can devise a recursive algorithm to evaluate a
recursively defined function at a positive integer. Instead of
successively reducing the computation to the evaluation of the
function at smaller integers, we can start with the value of the
function at one or more integers, the base cases, and successively
apply the recursive definition to find the values of the function at
successive larger integers. Such a procedure is called iterative.
Examples
1. Write the truth table of given proposition (p → q) ∨ (¬p → q)

2. Explain, without using a truth table, why (p ∨¬q) ∧ (q ∨¬r) ∧ (r ∨¬p) is true when p, q, and r
have the same truth value and it is false otherwise.

3. What is the value of x after each of these statements is encountered in a computer program, if x = 1
before the statement is reached?
a) if x + 2 = 3 then x := x + 1
b) if (x + 1 = 3) OR (2x + 2 = 3) then x := x + 1

4. Showthat¬p → (q → r) and q → (p ∨ r) are logically equivalent.

5. Find a counterexample, if possible, to these universally quantified statements, where the domain for
all variables consists of all integers.
a) ∀x(x2 ≥ x)
b) ∀x(x > 0 ∨x < 0)
c) ∀x(x = 1)
Reference
• 1. Discrete Mathematics and its Applications (7th Edition) by Kenneth
H. Rosen (McGraw-Hill, Inc., New York, 2007)

You might also like