Save this video free

CS3130FS26Module3AVidProc

DrHeUMSLTeaching · 1:02:06 · Watch on YouTube

Part of University of Missouri-St. Louis CS 3130. See all 21 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Recursive algorithms trade additional memory and function-call overhead for simpler solutions to problems whose structure repeats at smaller sizes. The lesson develops a reusable method (define base cases, assume a smaller instance is solved, and connect it to the current instance) then applies it to factorial and the Tower of Hanoi, where three disks take seven moves and the general solution uses two recursive calls around one disk move.

Key takeaways

Chapters

0:00 When Recursive Thinking Helps More Than Iteration
7:00 How a LIFO Stack Supports Recursive Function Calls
13:00 Deep Recursion, Memory Limits, and Stack Overflow
18:27 Factorial as a First Example of Recursive Problem Solving
22:00 A Three-Step Framework for Recursive Thinking
27:00 Deriving the Factorial Recurrence and Validating 0!
34:00 Why Factorial Recursion Is a Teaching Example, Not the Fastest Choice
35:30 Tower of Hanoi Rules and the Goal of Solving n Disks
39:30 Use Small Hanoi Instances to Find the Recursive Structure
45:00 Solving Three-Disc Hanoi in Seven Moves
51:00 Generalizing Hanoi with Two P(n−1) Calls
1:00:00 Turning the Hanoi Strategy into Recursive Pseudocode

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 Module three, the title recursive algorithm. So, this is a very powerful type of algorithms for this class. Part A, introduction to recursive algorithm. First, let let me give you some uh basic understanding of the recursive algorithm. The first thing we need to adapt our thinking to this type of special thinking, recursive thinking. For many people, if you do not get the training, recursive training, so many people cannot use this kind of thinking

0:50 comfortably. All right. So, what is that recursive thinking? Why it is important in problem solving? So, let me explain So, usually people use the straightforward non-recursive thinking in problem solving because people feel comfortable. So, you do step-by-step. But not in a recursive way. But there is a problem. For many relatively hard questions, for many relatively hard questions, not easy questions. Easy question, we do not need to use recursions. For harder questions,

1:39 so you will feel so very difficult if you only if you apply non-recursive thinking. All right. So, we will see the power of this special way of thinking. All right. But there are some problems that actually uh many problems many problems can be solved both non-recursively and recursively. We have two ways to solve problem. Or people even can say most of the problems, but to claim in that way uh it may not be good. Like our textbook.

2:29 It's our textbook even claims all the problem can be solved in these two ways. So that because that mean sometimes may not be doable. May not be doable. All right. The power of recursion. Some relatively hard problems can only be solved by recursion. So although so you know there is some argument here, but uh we just uh here we do not need to you know

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, DrHeUMSLTeaching.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.