S. Arun-Kumar, CSE
Introduction to Title Page
Computer Science JJ
Contents
II
S. Arun-Kumar J I
Page 1 of 709
Department of Computer Science and Engineering Go Back
I. I. T. Delhi, Hauz Khas, New Delhi 110 016.
Full Screen
March 19, 2007 Close
Quit
,Contents
1 Computing: The Functional Way 3
1.1 Introduction to Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Our Computing Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.3 Primitives: Integer & Real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 IIT Delhi
1.4 Example: Fibonacci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
1.5 Primitives: Booleans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
S. Arun-Kumar, CSE
2 Algorithms: Design & Refinement 114
2.1 Technical Completeness & Algorithms . . . . . . . . . . . . . . . . . . . . . . . . 114 Title Page
2.2 Algorithm Refinement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
2.3 Variations: Algorithms & Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
2.4 Names, Scopes & Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Contents
3 Introducing Reals 242
3.1 Floating Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 JJ II
3.2 Root Finding, Composition and Recursion . . . . . . . . . . . . . . . . . . . . . . 264
J I
4 Correctness, Termination & Complexity 294
4.1 Termination and Space Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . 294
4.2 Efficiency Measures and Speed-ups . . . . . . . . . . . . . . . . . . . . . . . . . 333 Page 2 of 709
4.3 Invariance & Correctness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
5 Compound Data 390 Go Back
5.1 Tuples, Lists & the Generation of Primes . . . . . . . . . . . . . . . . . . . . . . . 390
5.2 Compound Data & Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Full Screen
5.3 Compound Data & List Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . 457
6 Higher Order Functions & Structured Data 486 Close
6.1 Higher Order Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
6.2 Structured Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
Quit
, 6.3 User Defined Structured Data Types . . . . . . . . . . . . . . . . . . . . . . . . . 547
7 Imperative Programming: An Introduction 570
7.1 Introducing a Memory Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
7.2 Imperative Programming: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
7.3 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 IIT Delhi
8 A large Example: Tautology Checking 640
8.1 Large Example: Tautology Checking . . . . . . . . . . . . . . . . . . . . . . . . . 640 S. Arun-Kumar, CSE
8.2 Tautology Checking Contd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
Title Page
9 Lecture-wise Index to Slides 680
Contents
JJ II
J I
Page 3 of 709
Go Back
Full Screen
Close
Quit
, 1. Computing: The Functional Way
1.1. Introduction to Computing
1. Introduction
IIT Delhi
2. Computing tools
3. Ruler and Compass S. Arun-Kumar, CSE
4. Computing and Computers
Title Page
5. Primitives
6. Algorithm
Contents
7. Problem: Doubling a Square
8. Solution: Doubling a Square JJ II
9. Execution: Step 1
J I
10. Execution: Step 2
11. Doubling a Square: Justified Page 4 of 709
12. Refinement: Square Construction
Go Back
13. Refinement 2: Perpendicular at a point
14. Solution: Perpendicular at a point Full Screen
15. Perpendicular at a point: Justification
Close
Next: Our Computing Tool
Quit