Mark Wildon's Website: Introduction to combinatorics

A long-term project is to turn my Combinatorics course, lectured since 2010 at Royal Holloway, into a textbook. Here is an early draft. Comments are very welcome.


There will be a few computational exercises. As my attempt at one of them, here is a Javascript implementation of the Berlekamp–Massey algorithm. Enter a sequence defined by a linear recurrence below and the algorithm will output its generating function. For example, run on 0, 1, 1, 1, 2, 4, 7, 12, 21, the output is

(x - x2) / (1 - 2x + x2 - x3)

where the denominator encodes the recurrence a[n] = 2a[n-1] - a[n-2] + a[n-3].

Last modified: 3/8/21. Email: mark.wildon@rhul.ac.uk