  Two paths are equivalent modulo a given string $\tau$, whenever they have the
same length and the positions of the occurrences of $\tau$ are the same in both
paths. This equivalence relation was introduced for Dyck paths in \cite{BP},
where the number of equivalence classes was evaluated for any string of length
2.
  In this paper, we evaluate the number of equivalence classes in the set of
ballot paths for any string of length 2 and 3, as well as in the set of Dyck
paths for any string of length 3.
