Chapter 16

Time-Space Trade-off

Objectives

After reading this chapter, you should understand:

  • Time-Space Tradeoff: Meaning, Relevance and Techniques
  • How to design a Space Efficient and a Time Efficient Solution
  • The Knuth-Morris-Pratt String Matching Algorithm along with its Complexity Analysis
  • Real World Problems where Time-Space Tradeoff can be profitably employed
  • The Role of Time-Space Tradeoff in Algorithm Research

Chapter Outline

16.1 Introduction

16.1.1 An Example of Time-Space Trade-Off

16.2 A Quick Review of Complexity

16.3 Time-Space Trade-Off

16.3.1 Some Simple Examples

16.4 Time Space Trade Off in Algorithm Research

16.5 Case Study—Perrin Numbers

16.5.1 Perrin Numbers

16.5.2 First Try—Straight-Forward Implementation

16.5.3 Second ...

Get Design and Analysis of Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.