J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:17

T: 27/11/2018

Master in Informatics and Computing Engineering
Programming Fundamentals
Instance: 2018/2019


Lecture #17 :: 27/11/2018

Goals

By the end of this class, the student should be able to:

  • Describe recursive algorithms
  • Describe how to process recursive data structures
  • Describe infinite recursion and mutual recursion
  • Describe significant case studies that are recursive by nature

Content

  • Recursion
    • Case study: factorial
    • Scope of a recursive function
    • 10.1 Drawing Fractals
    • 10.2 Recursive data structures
    • 10.3 Processing recursive number lists
    • Infinite recursion
    • 10.4 Case study: Fibonacci numbers
    • 10.5 Example with recursive directories and files
    • 10.7 Mutual Recursion

Bibliography

  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3, 2018 (Chapter10) PDF

Materials

  • J. Correia Lopes, Script and illustrations, 17-recursion.pdf
  • FPRO, 2018/19, Python code, Lecture's on GitHub
  • Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers (Chapter 15) HTML
  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3 (RLE), 2012 (Chapter 18) HTML

Summary

  • Recursion. Recursive case studies: factorial, Fibonacci numbers, fractals. Recursive data structures. Mutual recursion. Infinite recursion.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/17.txt · Last modified: 26/11/2018 19:56 by Correia Lopes