The only way I know in order to show that the Euler characteristic we compute does not depend on the cell decomposition is to use homology groups: it shows that $\chi(S)$ depends only on the homotopy type of $S$. Afterwards, it is sufficient to chose a nice cell decomposition, namely a triangulation with just four vertices, and check that the associated Euler characteristic is 2.
However, if you are just interested in triangulations rather than cell decompositions, thanks to a well-chosen stereographic projection, the property you mention is equivalent to Euler's formula on planar graphs. More details may be found here for example.
If the polygonal presentation contains only one word, the following algorithm works:
- Add vertex symbols. Then, for each pair of edges with the same edge symbol, build one set containing the two initial vertices and one set containing the two terminal vertices.
- Build the union of all vertex sets that have at least one vertex in common until all resulting sets are disjoint.
- The number of vertices is the number of disjoint sets obtained in step 2. The number of edges is the number of different edge symbols and the number of faces is one.
Example:
Cube: $S = \langle a, b, c, d, e, f \mid aa^{-1}e^{-1}dd^{-1}gcc^{-1}g^{-1}e f bb^{-1}f^{-1} \rangle$ (c.f. A.P.'s answer)
Adding vertex symbols: $AaBa^{-1}Ce^{-1}DdEd^{-1}FgGcHc^{-1}Ig^{-1}KeLfM bNb^{-1}Of^{-1}A$
Building vertex sets:
Edge $a$: $\lbrace A, C \rbrace$, $\lbrace B, B \rbrace$;
Edge $b$: $\lbrace M, O \rbrace$, $\lbrace N, N \rbrace$;
Edge $c$: $\lbrace G, I \rbrace$, $\lbrace H, H \rbrace$;
Edge $d$: $\lbrace D, F \rbrace$, $\lbrace E, E \rbrace$;
Edge $e$: $\lbrace D, K \rbrace$, $\lbrace C, L \rbrace$;
Edge $f$: $\lbrace L, A \rbrace$, $\lbrace M, O \rbrace$;
Edge $g$: $\lbrace F, K \rbrace$, $\lbrace G, I \rbrace$
Building unions:
$\lbrace A, C \rbrace \cup \lbrace C, L \rbrace \cup \lbrace L, A \rbrace =
\lbrace A, C, L \rbrace$,
$\lbrace D, F \rbrace \cup \lbrace D, K \rbrace \cup \lbrace F, K \rbrace =
\lbrace D, F, K \rbrace$
Resulting disjoint vertex sets:
$\lbrace A, C, L \rbrace$, $\lbrace D, F, K \rbrace$, $\lbrace M, O \rbrace$,
$\lbrace G, I \rbrace$, $\lbrace B \rbrace$, $\lbrace E \rbrace$,
$\lbrace H \rbrace$, $\lbrace N \rbrace$
The number of disjoint vertex sets is 8. Thus, the number of vertices is 8.
Best Answer
This can be answered with some knot theory. The openings can be thought of as an unlink on three components. This just means three circles that are not "linked" together. This Y shaped pipe can be deformed to a sphere with three holes missing from it. Just think about the pipe as if it were a weird ballon. If we would fill these holes, we get a sphere, which means that it has genus zero. Then, we know that the Euler characteristic of sphere is two. (For a genus $g$ "shape," the Euler characteristic is $2-2g$. )
But we added those disks, which each count as a face. So, to get back to our Y shaped pipe, we need to subtract those disks (faces), which means we have $2-3=-1$.
Or, we could have used this: From Rolfsen's Knots and Links, we have a relation which says $$ g(M)=1-\frac{\chi(M)+b}{2} $$ where $g(M)$ is the genus of a manifold $M$ (our Y shaped pipe), $\chi(M)$ is the Euler characteristic, and $b$ is the number of boundary components, which means the holes. We know the genus, and the number of holes, all you have to do is solve for $\chi(M)$.