  A fast algorithm for counting intersections of two normal curves on a
triangulated surface is proposed. It yields a convenient way for treating
mapping class groups of punctured surfaces by presenting mapping classes by
matrices, and the composition by an exotic matrix multiplication. An efficient
solution of the word problem for mapping class groups of punctured surfaces is
proposed, with efficiency understood in a more restrictive way than the most
common one.
