Applied to a source text, the markov chain algorithm randomly sythesizes a new text in which the frequency distribution of "what immediately follows what" parallels that of the original. The "what follows what" part can be defined as what word follows what word, what word follows n number of words, or what letter follows what letter or n number of letters. The degree of randomness in the synthesized text varies in inverse proportion to n.
The results, especially when n=1, are often humorous and startling. The synthesized text retains not only the vocabularly of the original text, but also some aspect of its style. At first glance, it may even appear to conform to grammatical convetions but a closer look reveals that the synthesized text is actually pure nonsense.
Below are some projects incorporating markov-generated text.
In each case, the algorithm was implemented in perl and was an adapted from
an astonishingly effecient perl implementation published in 'The Practice of Programming' by Brian W. Kernighan and Rob Pike.