The applet below provides an implementation of our algorithm in Java. This page may not function correctly if you do not have Java Runtime Environment v6u26 and the latest Java Plugin.

Our program computes various recurrence-related statistics for an infinite partial word over a binary alphabet.

There are two ways to specify the infinite word.
The first is as the fixed point of a specified morphism.
Choose the fixed point *f* ^{ω}(*a*) or *f* ^{ω}(*b*).
Also ensure that the morphism is

**uniform:***f*(*a*),*f*(*b*),*f*(^) each have the same length**primitive:***f*^{n}(*a*) contains both*a*and*b*for some*n*, and likewise for*f*^{n}(*b*)**valid:***f*(^) must be compatible with both*f*(*a*) and*f*(*b*)

The second way is to specify a factor which is repeated, creating an infinite periodic word.

Next, choose the desired statistics to compute.
Our program computes the recurrence function *R*(*n*), complexity function *p*(*n*), and the subwords Sub(*n*).
Choose whether to compute the statistic for a given *n*, or for every subword length up to the specified *n*.