{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Recursion1.0

# Recursion1.0 - yourself Tai(left and Snuppy(right the first...

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

Last Updated 12-01-24 10:12 AM CSE 2011 Prof. J. Elder - 1 - Recursion Chapter 3.5

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

View Full Document
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.
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

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

View Full Document
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

{[ snackBarMessage ]}