Data Structures and Algorithms

By Alison Cawsey
This course will have two main sections. The first, shorter section will introduce inheritance and polymorphism in object oriented programming. This is material makes the implementation of some datastructures more elegant and more re-useable. However this section of the course is fairly independent of the next. The second, longer section will look at different sorts of algorithms, and in particular string processing algorithms and graph algorithms.
There are various concepts from Data Structure & Algorithms which will be assumed. The basic idea of an abstract datatype is important. You also need to be familiar with pointers for some of the first section. You should also be able to implement and use a stack and a queue (with or without the help of a textbook).
Why should you want to know about algorithms? There are a number of possible reasons:
  • To avoid re-inventing the wheel. As you might expect, for many programming problems, someone has already developed a good algorithm to solve that problem. For many of these algorithms, people have formally analysed their properties, so you can be confident in their correctness and efficiency. For example, we know that merge sort and quick sort both work correctly, and have average case complexity O(n log n), so we can straightforwardly use either algorithm in our programs. We might be able to further choose between these two algorithms, depending on properties of our data (is it already almost sorted?).
  • To help when developing your own algorithms. Many of the principles of data-abstraction and algorithm design, illustrated by some of the algorithms discussed here, are important in all programming problem. Not all tasks have ``off-the-shelf'' algorithms available, so you will sometimes have to develop your own. Merge sort illustrates a widely applicable technique: split the problem in two, solve each separately, then combine the results. A knowledge of well known algorithms will provide a source of ideas that may be applied to new tasks.
  • To help understand tools that use particular algorithms, so you can select the appropriate tool to use. For example, documentation of various compression programs will tell you that pack uses Huffman coding, compress uses LZW, and Gzip uses the Lempel-Ziv algorithm. If you have at least some understanding of these algorithms you will know which is likely to be better and how much reduction in file size you might expect for a given type of file (e.g., does the file involve a lot of repetition of common sequences of characters).
  • Because they're neat. Many surprisingly simple and elegant algorithms have been invented. If you have even a slightly Mathematical disposition you should find them interesting in their own right.

For all these reasons it is useful to have a broad familiarity with a range of algorithms, and to know what they may be used for.

Click to Read More

Algorithms for programmers

By Jorg Arndt

This is a draft of a book about selected algorithms. The audience in mind are programmers who are interested in the treated algorithms and actually want to create and understand working and reasonably optimized code.
The style varies somewhat which I do not consider bad per se: While some topics (as fast Fourier transforms) need a clear and explicit introduction others (like the bit wizardry chapter) seem to be best presented by basically showing the code with just a few comments.
The pseudo language Sprache is used when I see a clear advantage to do so, mainly when the corresponding C++ does not appear to be self explanatory. Larger pieces of code are presented in C++. C programmers do not need to be shocked by the ‘++’ as only a rather minimal set of the C++ features is used. Some of the code, especially in part 3 (Arithmetical algorithms), is given in the pari/gp language as the use of other languages would likely bury the idea in technicalities.

Algorithms for Modular Elliptic Curves

By J. E. Cremona
This book is in three sections. First, we describe in detail an algorithm based on modular symbols for computing modular elliptic curves: that is, one-dimensional factors of the Jacobian of the modular curve $X_0(N)$, which are attached to certain cusp forms for the congruence subgroup $\Gamma_0(N)$. In the second section, various algorithms for studying the arithmetic of elliptic curves (defined over the rationals) are described. These are for the most part not new, but they have not all appeared in book form, and it seemed appropriate to include them here. Lastly, we report on the results obtained when the modular symbols algorithm was carried out for all $N\le1000$. In a comprehensive set of tables we give details of the curves found, together with all isogenous curves (5113 curves in all, in 2463 isogeny classes. [In the first edition, these numbers were given as 5089 and 2447 respectively, as the curves of conductor 702 were inadvertently omitted.] Specifically, we give for each curve the rank and generators for the points of infinite order, the number of torsion points, the regulator, the traces of Frobenius for primes less than 100, and the leading coefficient of the $L$-series at $s=1$; we also give the reduction data (Kodaira symbols, and local constants) for all primes of bad reduction, and information about isogenies..........
Contents of Second Edition
  • Introduction
  • Modular symbol algorithms
  • Modular Symbols and Homology
  • The upper half-plane, the modular group and cusp forms
  • The duality between cusp forms and homology
  • Real structure
  • Modular symbol formalism
  • Rational structure and the Manin-Drinfeld Theorem
  • Triangulations and homology
  • M-symbols and $\Gamma_0(N)$
  • Conversion between modular symbols and M-symbols
  • Action of Hecke and other operators
  • Working in $H^+(N)$
  • Modular forms and modular elliptic curves
  • Splitting off one-dimensional eigenspaces
  • $L(f,s)$ and the evaluation of $L(f,1)/\period(f)$
  • Computing Fourier coefficients
  • Computing periods I
  • Computing periods II: Indirect method
  • Computing periods III: Evaluation of the sums
  • Computing $L^{(r)}(f,1)$
  • Obtaining equations for the curves
  • Computing the degree of a modular parametrization
  • Modular Parametrizations
  • Coset representatives and Fundamental Domains
  • Implementation for $\Gamma_0(N)$ Appendix to Chapter II. Examples
  • Example 1. N=11
  • Example 2. N=33
  • Example 3. N=37
  • Example 4. N=49
  • Elliptic curve algorithms
  • Terminology and notation
  • The Kraus--Laska--Connell algorithm and Tate's algorithm
  • The Mordell--Weil group I: finding torsion points
  • Heights and the height pairing
  • The Mordell--Weil group II: generators
  • The Mordell--Weil group III: the rank
  • The period lattice
  • Finding isogenous curves
  • Twists and complex multiplication
  • The tables
  • Elliptic curves
  • Mordell--Weil generators
  • Hecke eigenvalues
  • Birch--Swinnerton-Dyer data
  • Parametrization degrees
  • Bibliography

Followers