This page is dedicated to the paper Critical exponent of ternary words with few distinct palindromes by Lubomira Dvorakova, Lucas Mol, and Pascal Ochem.

tryt.c is the backtracking program for the negative results in Theorem 1.

To compile:
gcc -O3 -o tryt tryt.c

Usage:
./tryt c n d p
c is the maximum number of allowed palindromes.
(n/d)-free if p=0, (n/d^+)-free if p=1.

To obtain the negative results in Theorem 1, we check that the following runs finish.
./tryt 5 10 3 0
./tryt 15 2 1 0
./tryt 17 41 22 0

try6.c shows that there are only finitely many 9/4-free ternary words containing at most 6 palindromes and avoiding both 11 and 22 (Theorem 5).
try17.c shows that there are only finitely many 25/13-free ternary words containing at most 17 palindromes and avoiding 010 (Theorem 8.3).
try16.c shows that there are only finitely many square-free ternary words containing at most 16 palindromes and avoiding 010 (Lemma 15).

To compile:
gcc -O3 -o try6 try6.c
gcc -O3 -o try17 try17.c
gcc -O3 -o try16 try16.c

Usage:
./try6
./try17
./try16

dn.cpp is Matthieu Rosenfeld's implementation of Julien Cassaigne's algorithm to decide whether a morphic word avoids a pattern.

To compile:
g++ -O3 -o dn dn.cpp

Usage:
echo pattern alphabet_of_fixed_point in_morphism out_morphism | ./dn

In Theorem 5:
echo ABABA 3 01120 12001 2 0 1 2 | ./dn
In Lemma 6:
echo AA 4 010203 2013 0132 0102013203 0 1 2 3 | ./dn
In Lemma 7:
echo AA 4 010203 2013 0132 0102013203 012021201210120102 012101202120102 012021201020121 012021201210120212010201210120102 | ./dn

strongly3.c constructs the Rauzy graph whose arcs are ternary words in the input file and checks that it is strongly connected.

To compile:
gcc -O3 -o strongly3 strongly3.c

Usage:
./strongly3 input_file

sync.c checks that the morphism in the input file is synchronizing.

To compile:
gcc -O3 -o sync sync.c

Usage:
./sync morphism_file