1: \begin{abstract}
2: We describe a novel algorithm for random sampling of freely reduced words equal
3: to the identity in a finitely presented group. The algorithm is
4: based on Metropolis Monte Carlo sampling. The algorithm samples from a
5: stretched Boltzmann distribution
6: \begin{align*}
7: \pi(w) &= (|w|+1)^{\alpha} \beta^{|w|} \cdot Z^{-1}
8: \end{align*}
9: where $|w|$ is the length of a word $w$, $\alpha$ and $\beta$ are parameters
10: of the algorithm, and $Z$ is a normalising constant. It follows that words of
11: the same length are sampled with the same probability.
12: The distribution can be expressed in terms of the cogrowth series of the
13: group, which then allows us to relate statistical properties of words sampled by
14: the algorithm to the cogrowth of the group, and hence its amenability.
15:
16: We have implemented the algorithm and applied it to several group
17: presentations including the Baumslag-Solitar groups, some free
18: products studied by Kouksov, a finitely presented amenable
19: group that is not subexponentially amenable (based on the
20: {\em basilica group}), and Richard Thompson's group~$F$.
21: \end{abstract}
22: