Recursion1.0 - yourself Tai(left and Snuppy(right the first puppy clone Last Updated 10:12 AM CSE 2011 Prof J Elder 4 Friends& Strong Induction

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Last Updated 12-01-24 10:12 AM CSE 2011 Prof. J. Elder - 1 - Recursion Chapter 3.5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Last Updated 12-01-24 10:12 AM CSE 2011 Prof. J. Elder - 2 - Divide and Conquer When faced with a difficult problem, a classic technique is to break it down into smaller parts that can be solved more easily. Recursion is one way to do this.
Background image of page 2
Last Updated 12-01-24 10:12 AM CSE 2011 Prof. J. Elder - 3 - Recursive Divide and Conquer You are given a problem input that is too big to solve directly. You imagine, “Suppose I had a friend who could give me the answer to the same problem with slightly smaller input.” “Then I could easily solve the larger problem.” In recursion this “friend” will actually be another instance (clone) of
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: yourself. Tai (left) and Snuppy (right): the first puppy clone. Last Updated 12-01-24 10:12 AM CSE 2011 Prof. J. Elder - 4 - Friends & Strong Induction Recursive Algorithm: •Assume you have an algorithm that works. •Use it to write an algorithm that works. If I could get in, I could get the key. Then I could unlock the door so that I can get in. Circular Argument! Last Updated 12-01-24 10:12 AM CSE 2011 Prof. J. Elder - 5 - Friends & Strong Induction Recursive Algorithm: •Assume you have an algorithm that works. •Use it to write an algorithm that works. To get into my house I must get the key from a smaller house...
View Full Document

This note was uploaded on 02/14/2012 for the course CSE 2011Z taught by Professor Elder during the Fall '11 term at York University.

Page1 / 5

Recursion1.0 - yourself Tai(left and Snuppy(right the first puppy clone Last Updated 10:12 AM CSE 2011 Prof J Elder 4 Friends& Strong Induction

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online