search for books and compare prices
Tables of Contents for Programming for Mathematicians
Chapter/Section Title
Page #
Page Count
Programming Proverbs
1
5
Above all, no tricks!
1
1
Do not chewing gum while climbing stairs
2
1
Name that which you still don't know
2
1
Tomorrow, things will be better; the day after, better still
2
1
Never execute an order before it is given
3
1
Document today to avoid tears tomorrow
3
1
Descartes' Discourse on the Method
3
2
Review of Arithmetic
5
24
Euclidean Division
5
1
Numeration Systems
6
1
Prime Numbers
7
2
The number of primes smaller than a given real number
8
1
The Greatest Common Divisor
9
2
The Bezout Theorem
10
1
Gauss's Lemma
10
1
Congruences
11
1
The Chinese Remainder Theorem
12
2
The Euler phi Function
14
1
The Theorems of Fermat and Euler
15
1
Wilson's Theorem
16
1
Quadratic Residues
17
1
Prime Number and Sum of Two Squares
18
1
The Moebius Function
19
2
The Fibonacci Numbers
21
1
Reasoning by Induction
22
3
Solutions of the Exercises
25
4
An Algorithmic Description Language
29
30
Identifiers
30
1
Arithmetic Expressions
31
1
Numbers
31
1
Operations
31
1
Arrays
32
1
Function calls and parentheses
32
1
Boolean Expressions
32
1
Statements and their Syntax
33
9
Assignments
34
1
Conditionals
34
1
For loops
35
1
While loops
35
1
Repeat loops
35
1
Sequences of statements
36
1
Blocks of statements
36
1
Complex statements
37
1
Layout on page and control of syntax
38
2
To what does the else belong?
40
1
Semicolons: some classical errors
40
2
The Semantics of Statements
42
17
Assignments
42
1
Conditionals
42
1
First translations
43
2
The boustrophedon order
45
2
The for loop
47
1
The while loop
48
2
The repeat loop
50
1
Embedded loops
51
1
Which Loop to Choose?
51
1
Choosing a for loop
52
1
Choosing a while loop
52
1
Choosing a repeat loop
52
1
Inspecting entrances and exits
52
2
Loops with accidents
54
1
Gaussian elimination
55
1
How to grab data
56
3
How to Create an Algorithm
59
32
The Trace of an Algorithm
59
1
First Method: Recycling Known Code
60
4
Postage stamps
60
1
How to determine whether a postage is realizable
61
1
Calculating the threshold value
62
2
Second Method: Using Sequences
64
14
Creation of a simple algorithm
66
1
The exponential series
67
2
Decomposition into prime factors
69
2
The least divisor function
71
1
Cardinality of an intersection
71
3
The CORDIC Algorithm
74
4
Third Method: Defered Writing
78
7
Calculating two bizarre functions
80
1
Storage of the first N prime numbers
81
3
Last recommendations
84
1
How to Prove an Algorithm
85
3
Crashes
85
1
Infinite loops
85
1
Calculating the GCD of two numbers
86
1
A more complicated example
86
1
The validity of a result furnished by a loop
87
1
Solutions of the Exercises
88
3
Algorithms and Classical Constructions
91
18
Exchanging the Contents of Two Variables
91
1
Diverse Sums
92
3
A very important convention
92
1
Double sums
93
1
Sums with exceptions
94
1
Searching for a Maximum
95
1
Solving a Triangular Cramer System
96
1
Rapid Calculation of Powers
97
1
Calculation of the Fibonacci Numbers
98
1
The Notion of a Stack
99
2
Linear Traversal of a Finite Set
101
1
The Lexicographic Order
102
3
Words of fixed length
102
2
Words of variable length
104
1
Solutions to the Exercises
105
4
The Pascal Language
109
26
Storage of the Usual Objects
109
1
Integer Arithmetic in Pascal
110
3
Storage of integers in Pascal
110
3
Arrays in Pascal
113
1
Declaration of an Array
114
1
Product Sets and Types
115
2
Product of equal sets
115
1
Product of unequal sets
116
1
Composite types
116
1
The Role of Constants
117
2
Litter
119
1
Procedures
119
5
The declarative part of a procedure
120
1
Procedure calls
121
1
Communication of a procedure with a exterior
122
2
Visibility of the Variables in a Procedure
124
1
Context Effects
125
4
Functions
127
1
Procedure or function?
128
1
Procedures: What the Program Seems To Do
129
5
Using the model
133
1
Solutions of the Exercises
134
1
How to Write a Program
135
24
Inverse of an Order 4 Matrix
135
9
The problem
136
1
Theoretical study
136
2
Writing the program
138
2
The function det
140
3
How to type a program
143
1
Characteristic Polynomial of a Matrix
144
8
The program Leverrier
147
5
How to Write a Program
152
4
A Poorly Written Procedure
156
3
The Integers
159
66
The Euclidean Algorithm
159
2
Complexity of the Euclidean algorithm
160
1
The Blankinship Algorithm
161
2
Perfect Numbers
163
2
The Lowest Divisor Function
165
2
The Moebius Function
167
2
The Sieve of Eratosthenes
169
2
Formulation of the algorithm
171
4
Transforming the algorithm to a program
172
3
The Function pi(x)
175
6
Legendre's formula
175
3
Implementation of Legendre's formula
178
1
Meissel's formula
179
2
Egyptian Fractions
181
6
The program
183
3
Numerical results
186
1
Operations on Large Integers
187
7
Addition
187
1
Subtraction
188
1
Multiplication
189
1
Declarations
190
1
The program
191
3
Division in Base b
194
6
Description of the division algorithm
194
2
Justification of the division algorithm
196
1
Effective estimates of integer parts
197
3
A good division algorithm
200
1
Sums of Fibonacci Numbers
200
3
Odd Primes as a Sum of Two Squares
203
4
Sums of Four Squares
207
1
Highly Composite Numbers
208
5
Several properties of highly composite numbers
210
2
Practical investigation of highly composite integers
212
1
Permutations: Johnson's' Algorithm
213
5
The program Johnson
215
3
The Count is Good
218
7
Syntactic trees
219
6
The Complex Numbers
225
28
The Gaussian Integers
225
9
Euclidean division
226
1
Irreducibles
226
5
The program
231
3
Bases of Numeration in the Gaussian Integers
234
6
The modulo beta map
234
1
How to find an exact system of representatives
235
1
Numeration system in base beta
236
1
An algorithm for expression in base beta
237
3
Machin Formulas
240
13
Uniqueness of a Machin formula
242
1
Proof of Proposition 9.3.1
243
1
The Todd condition is necessary
244
1
The Todd condition is sufficient
244
1
Kern's algorithm
245
4
How to get rid of the Arctangent function
249
2
Examples
251
2
Polynomials
253
44
Definitions
253
1
Degree of a Polynomial
254
1
How to Store a Polynomial
254
2
The Conventions we Adopt
256
3
Euclidean Division
259
2
Evaluation of Polynomials: Horner's Method
261
1
Translation and Composition
262
3
Change of origin
262
3
Composing polynomials
265
1
Cyclotomic Polynomials
265
4
First formula
266
2
Second formula
268
1
Lagrange Interpolation
269
4
Basis Change
273
2
Differentiation and Discrete Taylor Formulas
275
3
Discrete differentiation
275
3
Newton-Girard Formulas
278
2
Stable Polynomials
280
6
Factoring a Polynomial with Integral Coefficients
286
11
Why integer (instead of rational) coefficients?
286
2
Kronecker's factorization algorithm
288
2
Use of stable polynomials
290
1
The program
291
3
Last remarks
294
3
Matrices
297
40
Z-Linear Algebra
297
21
The bordered matrix trick
300
1
Generators of a subgroup
301
1
The Blankinship algorithm
301
2
Hermite matrices
303
2
The program Hermite
305
7
The incomplete basis theorem
312
4
Finding a basis of a subgroup
316
2
Linear Systems with Integral Coefficients
318
5
Theoretical results
318
1
The case of a matrix in column echelon form
318
2
General case
320
1
Case of a single equation
321
2
Exponential of a Matrix: Putzer's Algorithm
323
3
Jordan Reduction
326
11
Review
326
1
Reduction of a nilpotent endomorphism
327
2
The Pitttelkow-Runckel algorithm
329
3
Justification of the Pittelkow-Runckel algorithm
332
1
A complete example
333
3
Programming
336
1
Recursion
337
22
Presentation
337
6
Two simple examples
337
2
Mutual recursion
339
1
Arborescence of recursive calls
340
1
Induction and recursion
340
3
The Ackermann function
343
2
The Towers of Hanoi
345
3
Baguenaudier
348
3
The Hofstadter Function
351
1
How to Write a Recursive Code
352
7
Sorting by dichotomy
353
6
Elements of compiler theory
359
64
Pseudocode
359
26
Description of pseudocode
360
5
How to compile a pseudocode program by hand
365
1
Translation of a conditional
366
2
Translation of a loop
368
1
Function calls
369
3
A very efficient technique
372
2
Procedure calls
374
3
The factorial function
377
2
The Fibonacci numbers
379
2
The Hofstadter function
381
1
The Towers of Hanoi
382
3
A Pseudocode Interpreter
385
15
How to Analyze an Arithmetic Expression
400
10
Arithmetic expressions
401
3
How to recognize an arithmetic expression
404
6
How to Evaluate an Arithmetic Expression
410
5
How to Compile an Arithmetic Expression
415
8
Polish notation
415
5
A Compiler for arithmetic expressions
420
3
References
423
2
Index
425