Question

Can someone please use layman's terms to explain to me the relationship between the notion of mathematical induction and recursion in computer science? I am struggling to understand the relationsh...

Can someone please use layman's terms to explain to me the relationship between the notion of mathematical induction and recursion in computer science?
I am struggling to understand the relationship

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Both the terms "recursive definition" and "inductive definition" are common, and the differences between the terms are usually so insignificant that either one will work (so it's not worth losing sleep over). Some people are very fastidious about whether they call each definition "inductive" or "recursive", which is respectable. But I cannot immediately think of an example where changing from one word to the other would change what is going on in a particular definition.

My best description is that "inductive definition" is more common when we are defining a set of objects "out of nothing", while "recursive definition" is more common when we are defining a function on an already-existing collection of objects.

A prototypical inductive definition is the following definition of the set of natural numbers:

  1. 0 is a natural number

  2. If n is a natural number, so is n+ 1

  3. Only numbers obtained from rules 1 and 2 are natural numbers.

Here we don't already have a set of natural numbers, we are describing a certain way to characterize which numbers are "natural numbers".

On the other hand, the following definition of the factorial function is usually called a "recursive definition"

n! = 1 if n=0 and = n.(n-1)! if n>0

The inductive definition of N, which we already have, is what justifies the use of a recursive definition for n!. Any inductive definition leads to an induction principle and a method of defining functions by recursion.

It does matter that, in defining N, we have to start with 0 and "work up". It doesn't work to try define the set N by saying that n is a natural number if n-1 is a natural number. But once we have an inductive definition of N we can leverage that for other purposes.

A few other things that can be defined inductively are the set of polynomials over a ring, the collection of rooted finite trees, and the collection of Borel sets. Inductive definitions are particularly important in computer science, mathematical logic, and related areas. One additional aspect of them is that they usually give a set of "terms" for the objects being described. For example, we know from the inductive definition of N that every natural number can be expressed as a finite string of the form 0+1+1+⋯1 (of some length).

Add a comment
Know the answer?
Add Answer to:
Can someone please use layman's terms to explain to me the relationship between the notion of mathematical induction and recursion in computer science? I am struggling to understand the relationsh...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT