  In this paper, we study the averaging operator by assigning a rewriting
system to it. We obtain some basic results on the kind of rewriting system we
used. In particular, we obtain a sufficient and necessary condition for the
confluence. We supply the relationship between rewriting systems and
Grobner-Shirshov bases based on bracketed polynomials. As an application, we
give a basis of the free unitary averaging algebra on a non-empty set.
