Understanding Mutual Recursion's Impact on Time-Space Trade Off, Study notes of Computer Science

The concept of recursion, focusing on mutual recursion and its impact on the time-space trade off. It includes a discussion on the importance of having a base case and making progress in recursive cases, as well as the benefits of recursive solutions. The document also touches upon the connection between recursion and computer science complexity, and the role of recursion in software engineering. Key topics include cohesion, coupling, immutable classes, side effects, static, scope, interfaces, polymorphism, event-based programming, inheritance, abstract classes, object-oriented design, crc cards, and recursion itself.

Typology: Study notes

Pre 2010

Uploaded on 08/19/2009

koofers-user-1wm
koofers-user-1wm 🇺🇸

9 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Recursion, Efficiency, and
the Time-Space Trade Off;
Mutual Recursion
Checkout
Recursion2
project from SVN
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Understanding Mutual Recursion's Impact on Time-Space Trade Off and more Study notes Computer Science in PDF only on Docsity!

Recursion, Efficiency, and

the Time-Space Trade Off;

Mutual Recursion

Checkout Recursion2 project from SVN

 Exam 2, tomorrow, open-book, open notes

◦ Can start at 7:30am if you want extra time

 Key Topics:

o Cohesion

o Coupling

o Immutable Classes

o Side Effects

o static

o Scope

o Interfaces

o Polymorphism

o Event-based prog.:

o ActionListener

o MouseListener

o Inheritance

o Abstract classes

o Object-oriented design

o CRC Cards

o Recursion

 Always have a base case that doesn’t recurse

 Make sure recursive case always makes

progress, by solving a smaller problem

 You gotta believe

◦ Trust in the recursive solution

◦ Just consider one step at a time

 Why does recursive Fibonacci take so long?!?

 Can we fix it?

 A deep discovery of computer science

 In a wide variety of problems we can tune the

solution by varying the amount of storage

space used and the amount of computation

performed

 Studied by “Complexity Theorists”

 Used everyday by software engineers

Q

 Two or more methods that call each other

repeated

Q

 Hofstadter Female and Male Sequences:

 Questions:

◦ How often are the sequences different in the first

50 positions? first 500? first 5000?