Unavoidable Patterns

This Java applet calculates the mean number of occurrences of a pattern in a word of a given length over a given alphabet and gives a lower bound on the pattern's Ramsey length. To get Java, go here.