See nonDelphi Algorithms Reference Library page
( Bookmark)
general resources  Algorithmes (French)  Introduction to algorithms  Manipulation of dates  Math algorithms (e.g., calculating pi)  Number bases (especially 2, 10 and 16)  Interpolation using Newton's method  Soundex Algorithm  Inversion of matrices http://www.chez.com/algor 

A* Search  A* is a search algorithm that searches from some initial state to a goal state. It returns the optimum path (list of intermediate states) from the initial state to the goal state. www.riversoftavg.com/tastarpathplanner.htm  
Arithmetic  See Mathematics  
Artificial Intelligence (AI) 
NeuroVCL V1.0. Components for Delphi for building programs with
backpropagation neural networks Program OCR is used for recognition of Cyrillic letters using
backpropagation neural networks. The Inference Engine Component Suite is a Delphi component suite
for adding rulebased intelligence to your programs. This suite
provides expert system (rulebased) programming from within the Delphi
environment. 

AVL Trees  see Trees, AVL  
Backgammon  In Delphi by Michael J. Mefford in PC Magazine www.zdnet.com/pcmag/pctech/content/15/20/ut1520.001.html 

Backtracking  www.ibrtses.com/delphi/backtracking.html  
Bits  Ray Lischner's UseNet Post with example
of using Pascal sets to define bits. Reverse bits in an integer Freeware ESBMaths with Source. www.esbconsult.com When Every Bit Counts: Compact Storage Using Integer Bitfields, Delphi Informant, July 1999. Delphi Import/Export: Part II: Streams and Bit Fiddling, in Delphi Informant, July 1998. Bit Counting (optimized code) 

Books 


BoyerMoore  Julian Bucknall discusses text searching using the BoyerMoore algorithm, showing how it is so much faster than Delphi's builtin Pos function. Delphi Magazine, Issue 36, August 1998.  
BoyerMooreHorspool Pattern Match  BoyerMooreHorspool text searching www.dcc.uchile.cl/~rbaeza/handbook/algs/7/713b.srch.p.html Optimized code example 

Cards  Use Windows CARDS.DLL to build games www.programmersheaven.com/zone2/cat71/14624.htm Black Jack Simulator TCardDeck, including Shuffle method and BlackJack game, in Delphi 5 Developer's Guide by Teixeira and Pacheco NonDelphi: Cards.DLL 

Color 


Combinations  TCombination class www.streamsec.com/combutil.htm 

Compression  Chapter 10, ShannonFano,
Huffman, LZ77 and LZ78 Introduction to Algorithms in Pascal Julian Bucknall describes some data compression algorithms, including
Huffman encoding. Julian Bucknall takes the lid off Lempel and Ziv’s LZ77 compression
algorithm LZW and dynamic Huffman ChiefLZ package uses LZSS and "SixPack" Huffman algorithms.
The LZSS low level stuff is in assembler, 

Computational Geometry  Tangram 2 puzzle by Gary Darby www.delphiforfun.com/Programs/tangram2.htm 

Containers 
New List Objects: Delphi 5's New Classes Increase TList
Class Abilities 

Convex Hull  http://www.delphiforfun.org/Programs/Fences_and_Traveling_Salesmen.htm  
Cryptogrpahy  efg's Cryptography page  
Cyclic Redundancy Code (CRC)  efg's CRC Lab Report: Includes code and numerous links to other sites with CRC information, as well as literature sources.  
Data Structures & Algorithms  EZDSL is a freeware collection of data structures classes for
Delphi programmers. The EZDSL units provide an OOP interface for classical data
structures for Delphi: stacks, queues (including deques and priority queues), lists
(single, double and skip), hash tables, binary trees (including search and redblack) and
so forth. ftp://ftp.turbopower.com/pub/misc/funcs/ezdsl302.exe www.cs.ncl.ac.uk/people/chris.holt/home.formal/surveying.9495 Data Structures and Algorithms 

Dates  efg's Dates and Times page  
Dice  
Discrete Math 
Numerical Methods in Pascal page: Discrete Math http://wwwrab.larc.nasa.gov/nmp/nmpIndex.htm#DiscreteMath 

Discrete Optimization Methods  Discrete
Optimization Algorithms with Pascal Programs by Maciej M. Syslo, et al. Set Cover, Set Packing, Shortest Path, Traveling Salesman Problem, Knapsack Problem, Network Flow, Job Scheduling, Vertex Coloring, Linear Programming, Matching, Minimum Spanning Tree www.cs.sunysb.edu/~algorith/implement/syslo/implement.shtml "Determining the Shortest Path through a Network" by Rod Stephens in December 1998, Delphi Informant, pp. 3440, di199812rs_f.zip 

Eight Queens  www.delphiforfun.org/Programs/EightQueensPlus.htm  
Encryption  efg's Cryptography page  
Endian  Robert Lee's UseNet Post assembly code for
changing "big endian" to "little endian": Swap2, Swap4,
Swap4Signed, SwapDoubleTo8, Swap8ToDouble
Peter Below's UseNet Post with Swap32 procedure Martin Harvey's UseNet Post with WordSwap
and DWordSwap Big Endian and
Little Endian 

Error Correction Codes  ReedSolomon Error Correction Routines.
Project JEDI Converted Tool by Bruce Christensen. ftp://delphijedi.org//tools/ReedSolomon.zip 

Flocking  Components for implementing Flocking behavior www.riversoftavg.com/flocking.htm Components for implementing Formations (square, wedge, etc) using flocking behavior. www.riversoftavg.com/formation_flocking.htm 

FourColor Mapping  A Look at
Four and FiveColor Algorithms, Delphi Informant, May 1999, pp. 4047
See FourColor Theorem on Mathematics page 

Fractions  Numerical Methods in Pascal page:
Fractions http://wwwrab.larc.nasa.gov/nmp/nmpIndex.htm#Fractions 

Fuzzy Logic  These three components integrate Fuzzy Logic
concepts and could help you to understand Fuzzy Logic with a Stock Fuzzy
Management example. http://delphi.icm.edu.pl/ftp/d30free/whatsfuz.zip
NonDelphi sites: 

Genetic Algorithms  The Genetic Programming component is designed to simplify
implementation of a GP System, handling all the GPspecific tasks for the user. http://delphi.icm.edu.pl/ftp/d40free/gp.zip 

Graph Theory  ftp://ftp.ifi.unizh.ch/pub/listenbaeumegraphen/LBGTEXT
Introducing Graphs. No, not those pretty things you do on squared paper, but computer science graphs (used, for example, in calculating the smallest distance to drive between appointments in several places). Clever stuff from Julian Bucknall... Delphi Magazine, Issue 32, October 1998 To progress his discussion of graph algorithms Julian Bucknall takes a slight detour to discuss priority queues and how to work with them, handily showing how to implement the heapsort algorithm along the way too. Delphi Magazine, Issue 39, November 1998 Topological sorts, solving the travelling salesmen problem, the algorithms of Prim and Dijkstra, it’s all here so come join the party... Delphi Magazine, Issue 41, January 1999 PlanB. PlanB predstavlja interaktivnu mapu i poslovni imenik Bečeja. Omogućava lako pronalaženje ulica, trgova, firmi i drugih važnijih mesta i objekata na mapi. http://solair.eunet.yu/~ilicv/PlanB.htm Graph Theory Lesson Graph Traverse Also see Shortest Paths 

Graphics Algorithms  efg's
Delphi Graphics
Algorithms: General Graphics Color Image Processing Mathematics/Geometry (also see general Computer Graphics Reference Library page) 

Greatest Common Divisor  GCD: Euclid's algorithm in UseNet Post by Hans van Kruijssen  
Fibonacci Numbers  Numerical Methods in Pascal page: Prime
Numbers, Fibonacci Numbers, Pi http://wwwrab.larc.nasa.gov/nmp/nmpIndex.htm#PrimeNumbers 

Hashing  Colin Sarsfield's UseNet
Post with HashN function
Making a Hash Of It  Setting up an Abstract Hash Table, Delphi Informant, Sept. 1999, pp. 3137. Hash It Out: Using Hash Tables to Manipulate Keybased Data, Delphi Informant, Feb. 1999 HashAlogrithm: MD4, MD5, RipeMD160, SHA1, Haval (128256) Hashing HashTrie is an efficient data structure for fast searching. Hash function for strings "Hash It Out  Using Hash Tables to Manipulate Keybased Data" How can you find items in a list really quickly? Julian Bucknall knows how to get your data dancing to the right tune and this month begins his explanation of hash tables. Delphi Magazine, Issue 30, February 1998. Julian Bucknall concludes his 2parter exploration of hash tables and how to use them in your Delphi applications to make finding text strings in long lists really quick, plus there’s a natty hashindex record manager ready to plug right into your programs! Delphi Magazine, Issue 31, March 1998 Brad Stower's UseNet Post about using Windows Atom functions as hash functions 

Huffman  See Compression  
Image Processing  efg's
Delphi Graphics
Algorithms: Image
Processing (also see general Image Processing Reference Library page) 

Interpolation  16bit Assembly Routine from UseNet Post  
Inverse  Inverse and nth roots of large numbers http://xavier.gourdon.free.fr/Constants/Algorithms/inverse.html 

Least Common Denominator  Borland's "How can I compute the lowest common
denominator?" FAQ 2895D Hans van Kruijssen UseNet Post 

Lightning  Nelson Chu Siu Hang's "Ideas
Behind My Lightning Effect" www.cs.ust.hk/~cpegnel/lightning.html 

Lists  The EZDSL units provide an OOP interface for classical data structures for Delphi: stacks, queues (including deques and priority queues), lists (single, double and skip), hash tables, binary trees (including search and redblack) and so forth. http://www.boyet.com/EZDSL/default.htm  
Lists, Linked  Linked Lists: When the Data Is Too Dynamic for Arrays, Delphi Informant, May 1998. Section 6, List Processing with Singly Linked Lists, Turbo Algorithms Double linked list, queue, stack Saving Linked Lists 

Map Coloring  A Look at Four and FiveColor Algorithms, Delphi Informant, May 1999, pp. 4047  
Map Projections  The MapProject DLL software component library
provides functions for transforming vector map data from one map
projection to another including changes of datums and spheroids of the
earth. www.graticule.com/products/mapproject.html 

Maps  See Maps on Delphi Graphics Algorithms page  
Mastermind  www.delphiforfun.org/Programs/MasterMind.htm  
Mathematics, Mathematical Algorithms 
Section 3, Mathematical Algorithms, Turbo Algorithms Arithmetic Algorithms Algorithmes mathématiques (also see general Mathematics Reference Library page) 

Mathematics, Recreational  Insert + and  signs as necessary into the
string 123456789 to form an expression that evaluates to 100 Expressions 100, www.delphiforfun.org/Programs/Expression100.htm Magic Squares, www.delphiforfun.org/Programs/magic_squares1.htm Knight's Tour, www.delphiforfun.org/Programs/knight's_tour.htm Roman Numerals, www.delphiforfun.org/Programs/roman_numerals.htm Cards1, www.delphiforfun.org/Programs/cards1.htm TCardDeck, including Shuffle method and BlackJack game, in Delphi 5 Developer's Guide by Teixeira and Pacheco 

Multiple Precision Arithmetic  efg's Cryptography page  
Nth Digit Computation  http://xavier.gourdon.free.fr/Constants/Algorithms/nthdigit.html  
Neural Networks  NeuralBase  components
library for Delphi Neural Networks Artificial Neuronal Network
(ANN), which is based on a back propagation algorithm Neural Networks An Introduction to BackPropagation Neural Networks A component with methods for building, train, run, show ,store, retreive neural nets and is quite easy to use as it has events for input and output. http://delphi.icm.edu.pl/ftp/d40share/demoneu4.zip 

Optimization  Algorithm Optimization www.optimalcode.com/algrthm.htm See other Optimization links on Miscellany page 

Pascal's Triangle  Bruce J. Clark's UseNet Post  
Permutations  TPermutation class www.streamsec.com/combutil.htm Permutes 1, www.delphiforfun.org/Programs/Permutes_1.htm 

Pi  Optimized code example for calculating pi www.optimalcode.com/expi.htm Numerical Methods in Pascal page: Prime Numbers, Fibonacci
Numbers, Pi 

Prime Numbers  Optimized code example for search for primes www.optimalcode.com/exprimes.zip Prime Factors #1, www.delphiforfun.org/Programs/PrimeFactors1.htm Numerical Methods in Pascal page: Prime Numbers, Fibonacci
Numbers, Pi 

Recursion  Julian Bucknall gives us the lowdown on recursion: what is
it, when to use it and when to avoid it, and how to avoid it when you need to! Delphi
Magazine, Issue 35, July
1998 Recursive Structures Search A beginner's guide to recursion Recursion Recursion Excursion: Building an Advanced Expression Calculator article in Delphi Informant 

Searching 
Three
Searches: Delphi Implementations of Classic Techniques Searching Algorithms KarpRabin string search Sorting and Searching: A Cookbook BoyerMooreHorspool text searching Searching Techniques, Section 2, Turbo Algorithms Steve Schafer's Usenet Post explaining Binary Tree versus Binary Search Search SWAG (Software Archive Group): 22 search/find/replace routines, Also see A* 

Selection  Selection Algorithms
www.dcc.uchile.cl/~rbaeza/handbook/selec_a.html 

Shortest Path  As the
Crow Files  Determining the Shortest Path through a Network, Delphi Informant,
December 1998, pp. 3440 (subscription) Traveling Salesman
Problem program by GrMikeD (updated March 2003) Delphi for
Fun: Shortest Path 

Sieve of Eratosthenes  Create list of prime numbers www.merlyn.demon.co.uk/programs/eratost1.pas www.merlyn.demon.co.uk/programs/eratost2.pas www.merlyn.demon.co.uk/programs/eratost3.pas 

Simulation and Modeling  See Links section of the Delphi Statistics and Probability
Library Reference page See nonDelphi Simulation & Modeling Library Reference page 

Sorting  Bubble, Selection, Quick Sort Example Using Threads ..\Borland\Delphi n\Demos\Threads\thrddemo.dpr project Topological Sorting: Ensuring Things Occur in an Orderly Fashion, Delphi Informant, Oct. 1998. Sorts of All Types: Implementing Classic Sort Routines in Delphi (Bubblesort, Selectionsort, Quicksort, Countingsort) Delphi Informant, Jan 1998. Sorting and Searching: A Cookbook FindSort unit and
demo project by Wellington Lima dos Santos.
(updated 14 Nov 2000)
Julian Bucknall explains sorting algorithms: the good, the bad and the ugly. Get your deck of playing cards out, it’s time for some lab work! Which is it to be, bubble, shaker, selection, insertion, Shell or quicksort? Delphi Magazine, Issue 37, September 1998 Julian Bucknall knows that it’s a big wide multilingual world out there and has come up with some clever techniques to ensure that text strings which include all those funny accented, extended and ligature characters always sort correctly. Delphi Magazine, Issue 27, November 1997 Sorting Algorithms Sorting Algorithms Fred VonBerg's UseNet Post
about Sort List (quicksort) Sorting Techniques, Section 1, Turbo Algorithms Sort Solution is a 32Bit Sort Library with highly optimized and
flexible sort algorithms for Windows 95, Windows 98, and Windows NT 4.x. Download Turbo Pascal 5.5 from the Borland Community Museum: http://community.borland.com/museum, unpack the DEMOS.ARC file, and look for QSORT.PAS Sorting SWAG (Software Archive Group): 63 examples Sources of numeric sorting algorithms: 

Soundex Algorithm (phonetic match) 
Sounds Gud
to Me  Soundex Encoding, Delphi Informant, March 1998, pp. 3438. L'algorithme du SOUNDEX (French) How to do a "sounds like" query in Interbase Soundex algorithm 

Stacks & Queues  Section 8, Stacks & Queues, Turbo Algorithms The EZDSL units provide an OOP interface for classical data structures for Delphi: stacks, queues (including deques and priority queues), lists (single, double and skip), hash tables, binary trees (including search and redblack) and so forth. http://www.boyet.com/EZDSL/default.htm 

Stony Brook Algorithm Repository  Comprehensive collection of algorithm implementations for
over seventy of the most fundamental problems in combinatorial algorithms. www.cs.sunysb.edu/~algorith Algorithm
Implementations in Pascal 

String Processing  Section 4, String Processing with Word Strings, Turbo Algorithms Section 5, String Processing with Token Strings, Turbo Algorithms efg's Strings page 

Times  efg's Dates and Times page  
Tournament  How To Create A Round Robin Tournament Schedule www.delphi3000.com/articles/article_1790.asp 

Towers of Hanoi 
www.delphiforfun.org/Programs/towers_of_hanoi.htm 

Traveling salesmen  See Graph Theory and Shortest Path  
Trees  Tree
Management  The Care, Feeding, and Implementation of Delphi Trees, Delphi
Informant, January 1999, pp. 5159 Tough Decisions: Building Delphi Decision Trees, Delphi Informant, June 1998. 

Trees, AVL  Section 10, AVLTrees, Turbo
Algorithms UseNet Post with AVL.PAS 

Trees, Binary  Section 9, Binary Trees, Turbo Algorithms Steve Schafer's Usenet Post explaining Binary Tree versus Binary Search Balanced, Binary Trees The EZDSL units provide an OOP interface for classical data structures for Delphi: stacks, queues (including deques and priority queues), lists (single, double and skip), hash tables, binary trees (including search and redblack) and so forth. http://www.boyet.com/EZDSL/default.htm 

Waves 
efg's D4 "Ripple" Project Leonel Togniolli's "Water Effects" posted to borland.public.attachments 
Updated  14 Jun 2009 
Since  13 Mar 1999 