Algorithms in Pascal, Addison-Wesley

Algorithms in Pascal
Algorithms in Pascal

This book is in the
Addison-Wesley Series in Computer Science

Introduction
The objective of this book is to study a broad variety of important and
useful algorithms: methods for solving problems which are suited for
computer implementation. We’ll deal with many different areas of application,
always trying to concentrate on “fundamental” algorithms which are
important to know and interesting to stu.dy. Because of the large number of
areas and algorithms to be covered, we won’t have room to study many of
the methods in great depth. However, we will try to spend enough time on
each algorithm to understand its essential characteristics and to respect its
subtleties. In short, our goal is to learn a large number of the most important
algorithms used on computers today, well enough to be able to use and
appreciate them.
To learn an algorithm well, one must implement it. Accordingly, the
best strategy for understanding the programs presented in this book is to
implement and test them, experiment with variants, and try them out on
real problems. We will use the Pascal programming language to discuss and
implement most of the algorithms; since, however, we use a relatively small
subset of the language, our programs are easily translatable to most modern
programming languages.
Readers of this book are expected to have at least a year’s experience
in programming in high- and low-level languages. Also, they should have
some familiarity with elementary algorithms on simple data structures such
as arrays, stacks, queues, and trees. (We’ll review some of this material but
within the context of their use to solve particular problems.) Some elementary
acquaintance with machine organization and computer architecture is also
assumed. A few of the applications areas that we’ll deal with will require
knowledge of elementary calculus. We’ll also be using some very basic material
involving linear algebra, geometry, and discrete mathematics, but previous
knowledge of these topics is not necessary.


................................................................
.......................................... ...... .. .................................
..... : ..... : ..... : ...... : ..... :
: ........
...........
:
...... ... .
... : ... : ... : ... : ... : ... : ::: ... : ... : ... : .... :
: : .... : .:.‘: .. . : : : .. : .... I .... .
.. ....................
........... .:: ‘LE. -
. *
........ . :: : :
: .... .... . . ... : ....... . ..: ... .: ... :.: .................... .:. ..... :...............
............................................. ..'...: .:....:..:...:.
... : ... : .... : ... : : -..: ... : ... : ... : :: : ... : ::: ... : ... : ... : .:. : .... : ... : : .. : ... : ... : ... : .
........ . .:. ..:........ : ........ . .:: . :....... : ..... .:: . .:. . : .. ..... : :..:. ... . .:. . : ....... : ......
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
:..: :..: .:. : :. :.:. : .:..:-:. : .:. : :. :.:.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-:.::.: : :: : :: . .. .. .* . . . . . . . . . . . . . :.:. .
. . . . . . . . . . . . . . . : ::: .:: : :. :-:-. . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
:. :.::: :. : .:: : :. : :..: :. : :*. :.:. :-:.
. . . . . . . . . . . . . . . . . . . . . . . . *.. . . . . . . . . . . . .
. :. . : . :. :: . :. . : . :. : : . :... : . ::.
:. : :. : :. : :..: :. :-:. : :. : :. : :. : :.
. . . . . . . . ::.. . .:. ..:a: . . . . . . .:. : . . . :..: ..:..
. . . . . . . . . . . . . . . . . . . . . * . . . . . . *.. .
:. : :. : :. : :. : ::: :. : :. :.:. : :. : ::
..:....: . .::. :.. :... : ..::. ..: . .:. ..::. :...
. . . : . . . : . . . : .*. : . . . : . . . : . . . . . .*. : .*. : . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . a:: . ..: . .:.*. . . . : :.. . . . . . . . . .
. . . . . ..: : . . . :.:.. :.... : . . . . . ..: : . . . : . . ::..
. . . . . . . . . . . . . . . . . . . . . . . . . :-. :*:. I
........................................
:.a: ... : :: ..: ... : .... : .... . .:. : .:. : ... : .... : .:..: .
...............................................
...................... : .... :::.: :.: : *.- : :.: :::.: -:.: - .....................................
................................................
..:...:...... ..: .:..:.: ............................... ... : :: : .... : ... : .:. : : .. : :..: .... : .
........ . .:: . : ....... : ........ . . .:. . : .. : .... : ......
..................................
: .. : .:. : ... : ... : ... : ... : ... : ... : ... : .... : :: : .
. I ,
........ ...... ... :........... : ... ::. ... . . ..: ........ .
... : ... : ..... ... : .... . .....................
- -.,- : :
.............: ... : ... : ... : : .. : ... : .
........ .:... : ....... :......... : .:. . : .. :...:: ...... :.:,,; .*. : . . . : . ..‘. . . . : . . . : . . . : . . . : . . . : . . . : . . . : .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .-... . .:..: . . . . . . . :... . ..: .:... . . . . . . . . . . . . . . . . . . . . . .
. ...,: ..; : . . -. . . : . . . . . . . :*. . :. . : : . . s-:. . : . . . . . . . . :. : :‘. :.:. : ::: :: : :. : ::. :-:. : ::: . ................................ ......................................................
...............................................
... : ... : .... . ::: ... : ... : ... : .‘: : .:. : ... : ... :
: .: ..: ... : .... :.: ... . ....
:
.:. : ... :; .... . .... . .
................... ..............
..... ..:....:. . : .. ..: .. : ..... *:: . .:. . :.: .: ... : ........ . . .: “1 : ....... : ........ . . ::. . :.. ... . . : .......
................................................................
... : .... : : .. : ... : :: :.::: ... : ... : .... : : .. : ... : :: : ::: ... : ... :-.:. : : .. : ... : :: : ::: ... : .
......................................................................................... : .....
............. . ........................... ..~................ .....
... : .... : ... :‘.:. : ... : .... . : .. : ... : .... : ... : .:. : ... : ::.: ... : ... :.::: ... : .:. : ... : .... . ... : .
..... ..: .. .:. . :.: ..... : .: ..... . . ::. . : ....... : .... . .. . . .: ... : ...... . : ..... .:: . .:. . : ....... : .......
.............................. ............................ : ............
.... . ... : .::: ... : .... : ::.: ... : .:. : ... : .... : .... . : .. : .:. : ... :: ... : .... . ... : .:. : ... :.::: .... . .
......... : ... .:. ... . ......... : ......... : ... .:. ... . ......... : ......... : ... .:. ... . ......... : .
.... . .. . : ... ; :. .. . .... : .... . .. . : .... . : .. :. ... : .,.,,: .:: : ... : : .. :. ... : ..: .: .. . : ... : : .. :: ... : .... . .
................................................................
............................................................. : ..............................
................................................. : .............................
... : ... : .... : .... : : .. : ... : ... : ... : :: : .:. : :.“: ... : ... : ... : ... : -....: ... : : .. : .I. : ... : ... : .
........ . . ::. . ::. .... . : ........ . : .:. ..: .. .. : .: ...... . . :: ... : .. : .... : ...... :.: . .:. . :.: ...... . .... . .
... : .... . .... . .. . : ... : ... : ... : : ...
1-i
. .... ................... .. .....
....................... :
.:. : .....
.. : ....... : ... : ::: ... : :: : ... : ... : ... : : .. : ... : .... : .
............................................. : ...................... .: .................... ..: ...
................................. : ................................. : .......
... : ... : .... : ... : ... : ... : .:. : ... : ... : ... : .... . ... : ... : ... : ... : .... : ... : ... : ... : .:. : ... : .
....... . . .:. . : ....... : ....... . . .:. . : ....... : ....... . . .:. . : ....... : ....... . . .:. . : ....... : ......
......................... : ......................... : .....................
:..: .... : ::. : ... :.:: : :.:: ... : .:. : .... :.: .. : :.,.: :: : .::: ... : .... : -....: : .. : .:. : :: :.::: .... . .
........................ . . : ....... .:. . .:. ..... : ..... . .................. : ....... : ..........
-:.: -.: : ... : :: ::: : *:.: -.: : ... : :: ::: : -:.: ... . : ... : : .. : .... : .... . .. . : ... : : .. : .... : .... . .
............... : ............... : ..... .., ........ . ..... .:. ..... : ...............
............... . ..... .:. ..... ; ............... : ............... . ..... .:. ..... : .............
.... . ... : .:. : ... : .... : .... . ... : .;. : ... : .... : . .., .: ... : .;. : ... : .... : .... . ... : .:. : ... : .... : .... . .
.........................................................
......... : ... .:. ... . ......... : ......... : ... .:. ... . ......... : ......... : ... .:. ... .
..~..~.
..........
..... : ..... : ..... : ..... : ..... : ..... : ..... : ..... : ..... : ..... : ..... : ..... : .....
... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : ... : .

Contents

Introduction
Algorithms, Outline of Topics
1. Preview
Pascal, Euclid’s Algorithm, Recursion, Analysis of Algorithms
Implementing Algorithms
MATHEMATICAL ALGORITHMS
2. Arithmetic
Polynomials, Matrices, Data Structures
3. Random Numbers
Applications, Linear Congruential Method, Additive
Congruential Method, Testing Randomness, Implementation Notes
4. Polynomials
Evaluation, Interpolation, Multiplication, Divide-and-conquer
Recurrences, Matriz Multiplication
5. Gaussian Elimination 
A Simple Example, Outline of the Method, Variations and Extensions
6. Curve Fitting
Polynomaal Interpolation, Spline Interpolation, Method of Least Squares
7. Integration
Symbolac Integration, Simple Quadrature Methods, Compound Methods,
Adaptive Quadrature
SORTING
8. Elementary Sorting Methods
Rules of the Game, Selection Sort, Insertion Sort, Shellsort,
Bubble Sort, Distribution Counting, Non-Random Files
9. Quicksort
The Baszc Algorithm, Removing Recursion, Small Subfiles,
Median-of- Three Partitioning
10. Radix Sorting
Radiz Ezchange Sort, Straight Radix Sort, A Linear Sort
11. Priority Queues
Elementary Implementations, Heap Data Structure, Algorithms
on Heaps, Heapsort, Indirect Heaps, Advanced Implementations
12. Selection and Merging
Selection, Mergang, Recursion Revisited
13. External Sorting
Sort-Merge, Balanced Multiway Merging, Replacement Selectzon,
Practical Considerations, Polyphase Merging, An Easier Way
SEARCHING
14. Elementary Searching Methods
Sequential Searching, Sequential List Searchang, Binary Search,
Binary ‘Pree Search, Indirect Binary Search Trees
15. Balanced Trees
Top-Down 2-9-4 Trees, Red-Black Trees, Other Algorithms
16. Hashing
Hash Functions, Separate Chaining, Open Addresszng, Analytic Results
17. Radix Searching
Digital Search Trees, Radix Search Wes, M&iway Radar Searching, Patricia
18. External Searching
Indexed Sequential Access, B- nees, Extendible Hashing, Virtual Memory
STRING PROCESSING
19. String Searching
A Short History, Brute-Force Algorithm, Knuth-Morris-Pratt Algorzthm,
Bayer-Moore Algorithm, Rabin-Karp Algorithm, Multiple Searches
20. Pattern Matching
Describing Patterns, Pattern Matching Machznes, Representzng
the Machine, Simulating the Machine
21. Parsing
Conteti-Free Grammars, Top-Down Parsing, Bottom-Up Parsing,
Compilers, Compiler-Compilers
22. File Compression
Run-Length Encoding, Variable-Length Encoding
23. Cryptology 
Rules of the Game, Simple Methods, Encrypt:!on/Decryption
Machines, Publzc-Key Cryptosystems
GEOMETRIC ALGORITHMS
24. Elementary Geometric Methods 
Poznts, Lines, and Polygons, Line Intersection, Simple
Closed Path, Inclusaon in 4 Polygon, Perspective
25. Finding the Convex Hull
Rules of the Game, Package Wrapping, The Graham Scan,
Hull Selection, Performance Issues
26. Range Searching
Elementary Methods, Grad Method, 2D Trees,
Multidimensaonal Range Searching
27. Geometric Intersection
Horizontal and Vertical Lines, General Line Intersection
28. Closest Point Problems 
Closest Paar, Voronoi Diagrams
GRAPH ALGORITHMS
29. Elementary Graph Algorithms
Glossary, Representation, Depth-First Search, Mazes, Perspectzve
30. Connectivity
Biconnectivity, Graph Traversal Algorzthms, Union-Find Algorithms
31. Weighted Graphs
Mmimum Spanning Tree, Shortest Path, Dense Graphs, Geometrzc Problems
32. Directed Graphs
Depth-Farst Search, Transitwe Closure, Topological Sorting,
Strongly Connected Components
33. Network Flow
The Network Flow Problem, Ford-Adkerson Method, Network Searching
34. Matching
Bapartite Graphs, Stable Marriage Problem, Advanced Algorathms
ADVANCED TOPICS
35. Algorithm Machines
General Approaches> Perfect ShujIes, Systolic Arrays
36. The Fast Fourier Transform
Evaluate, Multiply, Interpolate, Complez Roots of Unity, Evaluation
at the Roots of Unity, Interpolatzon at the Roots of Unity, Implementation
37. Dynamic Programming
Knapsack Problem, Matriz Chain Product, Optimal Binary Search Trees,
Shortest Paths, Time and Space Requirements
38. Linear Programming
Lznear Programs, Geometric Interpretation, The Simplex Method,
Implementation
39. Exhaustive Search
Exhaustive Search in Graphs, Backtrackzng, Permutation Generation,
Approximation Algorithms
40. NP-complete Problems
Deterministic and Nondeterministic Polynomial- Time Algorzthms,
NP-Completeness, Cook’s Theorem, Some NP-Complete Problems


 Screenshot 

Algorithms in Pascal, Addison-Wesley

Purchase Now !
Just with Paypal



Product details
 Price
 File Size
 4,693 KB
 Pages
 560 p
 File Type
 PDF format
 ISBN
 o-201-06672-6
 Copyright
1983 by Addison-Wesley 
 Publishing Company, Inc 
●▬▬▬▬▬❂❂❂▬▬▬▬▬●
●▬▬❂❂▬▬●
●▬❂▬●


═════ ═════

Previous Post Next Post