A modification of the Rubinstein-Thompson criterion for a
3-manifold to be the 3-sphere is proposed. Special cell
decompositions, called $Q$-triangulations and irreducible
$Q$-triangulations, for closed compact orientable 3-manifolds
are introduced. It is shown that if a closed compact
orientable 3-manifold $M^3$ is given by a triangulation (or by
a $Q$-triangulation) then one can effectively decompose $M^3$
into a connected sum of finitely many 3-manifolds some of
which are given by irreducible $Q$-triangulations and others
are 2-sphere bundles over a circle. Furthermore, it is shown
that the problem whether a 3-manifold given by an irreducible
$Q$-triangulation is homeomorphic to the 3-sphere is in
$\textup{\textbf{NP}}$, and the problem whether a
$Q$-triangulation of a 3-manifold is irreducible is in
$\textup{\textbf{coNP}}$.