Chapter 4: Orders of Growth and Tree Recursion
Chapter 4: Orders of Growth and Tree Recursion
Questions To Ask About Computational Processes (Again)
Algorithms
Example: Sorting
Selection Sort
Merge Sort
An Experiment in Sorting Efficiency
Chart Comparing Times
Drawbacks of Timing Physical Processes
Analyzing Selection Sort
Θ (Big Theta) Terminology
Computing Time Spent on Selection Sort
Analyzing Merge Sort 1
Analyzing Merge Sort 2
Analyzing Merge Sort 3
Analyzing Merge Sort 4
Comparing n, nlogn, and n
2
Recursion in Merge Sort
Linear vs Tree Recursion
Divide and Conquer
Digital Signatures
Digital Signature System Components
Digital Signature System Component Diagram
Digest Functions
Simplified Digital Signature System Component Diagram
Signing Functions
Verification Functions
Signing and Verifying Using Modular Arithmetic
Modular Arithmetic (Remainder Arithmetic)
Some Properties of Modular Arithmetic
Making the Signing and Verification Functions Inverses
Determining the Signing Exponent and Modulus
The Verification Function
Creating the Signature
Solving the Huge Number Problem
First Attempt: mod-expt
Testing mod-expt
Using Tree Recursion
Second Attempt: mod-expt
Tree of Multiplications
Exercise 4.2a(1), p. 92
Third Attempt: mod-expt
A Dramatic Improvement
From Tree to Single Branch
Logarithmic Recursion
Logarithmic Iteration
Converting Linear to Logarithmic Iteration
Space and Time Comparisons
Fractal Curves
Sierpinski's Gasket
Self-Similarity in Sierpinski's Gasket
Curve Levels
Sierpinski's Gasket Levels 0, 1, 2
Basis Similarity
Drawing Lines in DrRacket
C-curve Level 0
C-curve Level 1
Subdividing a Curve
C-curve Level 2
C-curve Level 3
C-curve Levels 6 and 10
Defining c-curve