Induction and recursion

Source: Internet
Author: User


    • Introduction to Mathematical Inductive method  
    • Incomplete inductive method
      • Definition of incomplete inductive method
      • An example of incomplete inductive method  
    • Strong Inductive method
      • Strong inductive method definition
      • Example of strong inductive method 
    • Recursive definition and structural inductive method
      • Recursive definition
      • Structural inductive method

Introduction to Mathematical Inductive method

Mathematical induction is a powerful proving tool. Mathematical induction is a tool for proving theorems, but it is not possible to find theorems. That is to say, mathematical induction is a means of proving.

Mathematics Induction High School We have also studied, that time study is incomplete induction method. In discrete mathematics, we will learn three mathematical induction methods:

    • Incomplete induction (i.e. inductive method of high school description)
    • Strong Inductive method
    • Structural inductive method

There are also some interesting applications for recursive knowledge and mathematical induction.

The reference book in this chapter is "Discrete Mathematics and its application".

Incomplete inductive method

First of all we are familiar with incomplete induction, generally we call it a mathematical induction method.

About incomplete induction, although the name has "incomplete" three words, but this inductive method is precisely not incomplete. This naming is only frustration: because the strong inductive method is also called the complete induction method, so the induction method here is called the incomplete induction method.

For the incomplete inductive method, most books are illustrated by dominoes. Here we use the way to climb ladders to illustrate:

For ladders with n sections, we want to crawl from the first section to section N, using the following method:

    1. Can crawl to the first section
    2. If we can crawl to section K, then we can crawl to section k+1.

Now let's assume that the above two sentences are set up, so that you can use recursion to crawl to the nth staircase: first you can climb to the 1th staircase, and then make K=1, from the second sentence we can climb to the 2nd section, then make k=2, you can climb to the 3rd section. And so on, you can crawl to section N.

Incomplete inductive definition:

The above two steps to climb stairs are actually described using mathematical induction. The definition of incomplete inductive method is as follows:

In order to prove that all positive integers n,p (n) are true, where P (n) is a propositional function, it is necessary to complete the two-step proof:

Basic steps: proof P (1) is true

Induction step: Prove that for each integer k, the implication P (k) →p (K+1) is established. where P (k) is the inductive hypothesis.

This definition must be familiar to everyone, that is, the induction of high school in the definition of a discrete language to describe the chant.

For the stair problem above, P (n) is "able to climb to the nth staircase". The first step, then, is to get to the first stair, p (1), and then prove that the P (k+1) section ladder can be reached if P (k) can be reached. Complete the above two proofs to reach any staircase.

The above example is an abstract life example, below we give some of the mathematical use of incomplete inductive method of proof:

Examples of incomplete inductive methods:

For the proof of the summation formula:

A widely used area of incomplete generalization is the proof of the summation formula. It is important to note, however, that mathematical induction can only be used to prove, not to find, a theorem, so it is impossible to obtain a formula by means of a mathematical inductive method. Can only prove the correctness of the existing formula.

Example 1: proving the summation formula 1+2+3+...+n=n (n+1)/2 is correct


First the Propositional function P (n) is "1+2+3+...+n=n (n+1)/2", then the first is the basic step: The basic step: proof P (1) is true because P (1) is 1 =1*(1+1)/2=1, the equation is equal on both sides, and the proposition is proven. Induction steps: When P (k) is established, p (k+1) is True P (k) for:1+2+3+...+k=k (k +1)/2P (k+1For1+2+3+.. +k+1= (k +1) (k +2)/2Here's a way to turn P (k) into P (k)+1), very simple, with P (k) on the left and right side plus K +1, then it is: P (k)+k+1=k (k +1)/2+k+1= (k +1) (k +2)/2=p (k +1) since P (k) becomes P (k+1) then the right-hand equals p (k +1) on the right-hand side. And since P (k) is true, p1To be true, a proposition is to be proven.

There are a lot of questions to prove the summation formula, here first one, the other topic and this is similar, but there may be more skills.

For the proof of inequalities:

Example 2: proving that N<2^n is true for all positive integers

P (N) is"N<2^n is set for all positive integers"Basic steps: P (1) for 1<2^1=2 Establishment Induction step: P (k) is K<2^k;p (k +1) for K +1<2^ (k +1) Convert P (k) to P (k)+1), plus 1 on both sides, P (k)+1 for k +1<2^k+1and since 2^k+1<2(k +1) so K+1<2^k+1<2^ (k +1) that is K+1<2^ (k +1) was established, P (k +1) set up, the proposition to be proved.

Proof of the Divide problem:

This division problem high School also baffled me for some time ah, here we look at how to solve the problem.

Example 3: when n is an integer, prove that n^3-n can be divisible by 3

Basic steps: P (1) for 1^3-1=0 divisible by 3 inductive steps: P (k) for K^3-k,p (k +1) for (k + 1 ^3-(+1)               expand (k+1) ^3-(+ k1) k^3 +3k^2+3k+1-k-1= (k^3-K) +3* (k^2+k) This equation can be divisible by 3, the proof. 

The peculiar application of inductive method:

Mathematical induction can sometimes be used in some unexpected situations to look at the following questions:

Example 4: use the right triple domino to cover a 2^nx2^n chessboard and leave only one space on the board

This is the right triple domino, to rotate the words can also get another three kinds:

So first to prove the case of P (1)

Basic steps: When the k=1, the chessboard is 2x2, then only need any of the above the domino can be covered, the proof of the proposition.

Induction step: Meet the conditions under the 2^kx2^k checkerboard, then 2^ (k+1) x2^ (k+1) can also meet the conditions

We divide the board into four parts:

Known by P (k), the lower right corner of the sub-chessboard must be able to use the Domino's only one space left:

Next we put a domino:

In this way, the extra spaces in the remaining three boards are filled up so that P (k) can be fully filled. So the final whole board will only have a space next to the next, the proposition to be proof.

Strong inductive method (fully inductive method)

Sometimes the use of incomplete induction is not easy to prove some propositions, this time we can consider the strong inductive method to prove.

Definition of strong inductive method:

To prove that P (N) is true for all positive integer n, where P (n) is a propositional function, we need to demonstrate the following two steps:

Basic steps:

P (1) established

Induction steps:

For all positive integer n, the implied formula [P (1) ∧p (2) ∧p (3) ∧ ... ∧p (k)]→p (K+1) was established. where P (1) ∧p (2) ∧p (3) ∧ ... ∧p (k) is an inductive hypothesis.

It is noted that the strong induction method and the incomplete induction method differ only in the inductive steps. The incomplete induction method is derived from P (k) to P (k+1). The strong inductive rule is deduced from the former P (k) condition to P (k+1) conditions.

Sometimes strong inductive method is better used than incomplete inductive method. So we use the order of induction is the first thought of strong induction, and then think of incomplete inductive method.

Some examples of strong inductive methods:

Example 1: if n is an integer greater than 1, then n can be written as the product of a prime number

basic steps: For 2, it is obvious that it is the prime number induction step: if K+1 is a prime number, then obviously it is the prime number, the proposition is established. If k+1 is composite, then there must be i,j satisfying 2<=i<=j<k+1 and K +1=i*j. Since i,j are less than or equal to K, the correctness of P (k) knows that i,j can be written as a product of primes. Then the k+1 can be written as a number of primes, then P (k +1) is established

You can also use the strong inductive method to prove some problems in life.

Example 2: consider a match-taking game in which two contestants take turns to remove any number of matches from a pair of matches, and the person who took the last match wins. Verification: When each pile starts to have n matches, the back is sure to win.

This topic means that there are two stacks of matches, with two players taking matches from them, but they can only be picked up in a match pile at a time. Finally the man who took all the matches was victorious. The man who requires proof that the second step is sure to win.

Basic steps: when n=1, the initiator has only one choice: Pick one out of the two match stacks (because there is only one match per match). At this time, you can take the other match away. The proposition is to be proven. Inductive steps: The first inductive assumption is that when a bunch of matches have a match (1<=i<=k), the proposition is proven. It is now necessary to prove the proposition of each pile of k+1 matches. This time if the initiator took the r match, the hand can be in another pile of examples also take r root matches. So the two stacks of matches are the K +1-R (1<=k+1-r<=k), this time the condition becomes the condition of inductive hypothesis. The proposition is true by inductive hypothesis.

Recursive definition and structural inductive method

The so-called recursive definition, believe that every learning computer knows, is to define their own time in their own definition of the use of their own definition.

Recursive definition functions:

Basic step: Specify the value of this function at 0

Recursive steps: Give a rule to find the current value from a small value

In mathematics is actually a compound function. The most famous recursive definition function is the Fibonacci sequence:

Fibonacci the number of f0,f1,f2 ... is a function that is recursively defined using the f0=0,f1=1,fn=fn-1+fn-2 of a set of equations.

Recursively define structures and collections:

Like recursive definition functions, recursive definition of collections and structures also has basic steps and recursive steps. Take a look at the following three recursive definitions:

Definition 1:

Consider a subset of the integer set defined below s:

Basic steps: 3∈s

Recursive steps: If X∈s and Y∈s, then X+y∈s

This recursive definition defines a set of numbers, including 3,6,9,12, and so on.

Definition 2:

The string set on the alphabet a ' recursive definition is:

Basic steps: Empty string Λ∈a '

Recursive steps: If Ω∈a ' and x∈a, then ωx∈a. Here ωx is the connection to the string, which refers to connecting the X string behind the Ω string.

The string is defined recursively here.

There are many recursive definitions in the data structure, including the structure definition of the linked list, the structure definition of the binary tree, and the definition of the adjacency table of the graph. It can be seen that recursive definitions still have an important place in the computer.

Definition of structural inductive method:

Structural induction is an inductive method specifically designed to demonstrate the definition of recursive structures:

Basic step: proves that the result is true for all elements belonging to the set defined by the underlying step of the recursive definition

Inductive steps: Prove that if the proposition is true for each element that is used to construct the new element in the defined recursive step, the result is set for these new elements.

Examples of structural inductive methods:

Here is an example of how the structural induction method proves:

First look at some of the recursive definitions for a two-fork tree:

Full two fork tree:

Basic step: There is a full two-fork tree with only a single point

Inductive steps: If the t1,t2 are full two forks, there is a full two-fork tree represented as T1 T2, which contains the root r and the edges connected from R to the left subtree T1 and right subtree T2

full two fork tree height h (T):

Basic step: The height of the full two-tree T with root R only is H (t) =0

Induction step: If the t1,t2 are full two forks, then the full two fork tree T=t1 T2 has a height of H (T) =1+max (H (T1), H (T2))

Defines the number of tree nodes with a full two fork N (T):

Basic step: Height H (t) =0 with only tree root R full two forks

Recursive steps: If the t1,t2 are full two forks, then the number of nodes full two tree T1 T2 is n (T) =1+n (T1) +n (T2)

Example 1:

If T is full two fork tree, then prove N (t) <=2^[h (t) +1]-1

Basic step: When T has only roots, n (t) =1<=2^(0+1)-1=1 Establishment Induction step: for inductive hypothesis, when T1 and T2 are full of two fork tree, N (T1)<=2^[h (T1) +1]-1 and N (T2) <=2^[h (T2) +1]-1 was established. According to the recursive formula of N (t) and H (t) know N (t) =1+n (T1) +n (T2), h (T) =1+Max (H (T1), H (T2)). Bring in Formula know: N (T)=1+n (T1) +N (T2)<=1+(2^[h (T1) +1]-1)+(2^[h (T2) +1]-1)<=2*max (2^[h (T1) +1]-1,2^[h (T2) +1]-1) -1<=2*2^max (2^[h (T1) +1]-1,2^[h (T2) +1]-1) -1=2^[h (T) +1] -1Proposition set up

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: