1: \begin{abstract}
2: We examine from an invariant theory viewpoint the monoid algebras for two monoids having large symmetry groups. The first monoid is the
3: {\it free left-regular band} on $n$ letters,
4: defined on the set of all {\it injective} words, that is, the words with at
5: most one occurrence of each letter. This monoid carries the action of the symmetric group.
6: The second monoid is one of its $q$-analogues, considered by K. Brown, carrying an action of the finite general linear group.
7: %\begin{itemize}
8: % \item the {\it free left-regular band} on $n$ letters (e.g. a monoid defined on the set of injective words), acted on by the symmetric group, and
9: %\item one of its $q$-analogues, %considered by K. Brown, acted on by the finite general linear group.
10: %\end{itemize}
11: In both cases, we show that the invariant subalgebras are
12: semisimple commutative algebras, and characterize them using \emph{Stirling} and \emph{q-Stirling numbers}.
13:
14: We then use results from the theory of random walks and random-to-top shuffling to decompose the entire monoid algebra into irreducibles, simultaneously as a module over the invariant ring and as a group representation.
15: Our irreducible decompositions are described in terms of \emph{derangement symmetric functions} introduced by D\'esarm\'enien and Wachs.
16: \end{abstract}
17: