1 / 5

Recursion: The Real Bear Game

Join us as we dive into the exciting world of recursion through "The Real Bear Game". This engaging session presents the properties of successful recursive algorithms and challenges participants with the journey of the Three Bears. Learn how to derive new bear counts through the odd/even rules while exploring the captivating Box Stuffing problem. Can you fit teddy bears of various set sizes into a box with a capacity of 27? Enhance your understanding of recursion and algorithmic thinking in this interactive and educational event!

brody
Télécharger la présentation

Recursion: The Real Bear Game

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recursion: The Real Bear Game March 27, 2006

  2. Outline • Handouts(1) • Perils of JavaSchools • Announcements • Properties of Successful Recursive Algorithms • Three Bears + 1 • Box Stuffing

  3. Successful Recursion • Has to Stop • Reentrant

  4. Three Bears + 1 • X = # of bears • If X is odd, the new number of bears that you have is 3 * X + 1 • If X is even, the new number of bears that you have is X / 2. • For all X, does this sequence always converge to 1 bear?

  5. Box Stuffing • The problem is to exactly (or mostly) fit a box with sets of teddy bears. • If you have bears in sets of 1, 2, 3, 5, 10, 15, and 20, can you fit a box with the capacity of 27?

More Related