Advanced maths

Simplicial fundamental group presentation calculator

Construct a fundamental-group presentation for a connected finite triangular complex by contracting a spanning tree of its one-skeleton.

Your numbers

Use an integer within the stated bounds.
One pair of distinct zero-based vertices per row; none for no edges.
One triple of distinct vertex indices per row; every boundary edge must be listed. Use none for no faces.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Construct a fundamental-group presentation for a connected finite triangular complex by contracting a spanning tree of its one-skeleton.

THE FORMULAGenerators=edges outside a spanning tree; relators=oriented triangle boundary words after tree contraction.

A worked example

The default complex has two graph loops and one filled triangle. Its presentation has generators g1, g2 and relator g1, leaving the second loop unconstrained.

Good to know

Connected 1-skeleton with 1–20 vertices,≤40 edges and≤30 distinct triangular faces; every face edge listed. BFS tree rooted at 0, non-tree edges oriented low-to-high, free word reduction only. No general word-problem, triviality or group-isomorphism solver.

Loops contain noncommutative information

The fundamental group records based loops up to continuous deformation and their order-sensitive concatenation. First homology retains an abelianized version of that information, so knowing Betti numbers does not generally determine the fundamental group. This page constructs a presentation rather than only reporting a homology rank.

A finite triangular complex supplies vertices, edges and filled triangular faces. A triangle boundary can be traversed as a loop in its one-skeleton, but filling that face declares the boundary loop null-homotopic. The presentation makes the effect of those filled faces explicit through relator words.

One filled loop and one unfilled loopfilledunfilledPresentation: ⟨g1,g2 | g1⟩
Scroll across to see the full diagram.
The first triangle gives relator g1; the second loop remains represented by g2.

Compare this with the Relative simplicial homology calculator for a complex and subcomplex. Construct a nonabelian pi1 presentation from edges,faces and a spanning tree; homology retains only abelian information in degree one.

Entering the complete one-skeleton

List each undirected edge once with distinct zero-based endpoints. Each face needs three distinct vertices, and every one of its three edges must appear in the edge list. Geometrically drawn crossings do not create extra vertices unless the combinatorial input explicitly identifies them.

The one-skeleton must be connected. This gives one based fundamental group for the whole supplied complex under the selected root. Repeated faces and edges are rejected because a simplicial complex has unique simplices; entering duplicates should not silently change the number of cells or the presentation statistics.

Two loops with one triangle filled

The default graph contains one triangle through vertices zero, one and two, and another through two, three and four. Its graph has two independent loops. Only the first triangular face is filled, so one graph loop becomes contractible while the other remains.

The chosen tree leaves two non-tree edges and hence two displayed generators. The filled face reduces to the single-letter relator g1. Thus the presentation forces g1 to the identity while placing no relation on g2. The raw generator count remains two because the calculator reports its constructed presentation rather than performing arbitrary Tietze simplification.

Contracting a spanning tree

A breadth-first spanning tree rooted at vertex zero connects all vertices without retaining a loop. Contracting it to one point does not change the fundamental group. Every edge outside that tree then gives a loop generator after its endpoints are joined back to the root along tree paths.

The implementation chooses these non-tree edges in input-derived order and orients each from the smaller endpoint label to the larger. Traversing the edge in reverse contributes the inverse generator. Tree edges contribute no letters because they disappear under contraction, not because their original geometric lengths were zero.

Reading triangle relators

For each face, the algorithm walks its three boundary edges in the supplied vertex order. It replaces non-tree traversals by signed generator letters and omits tree traversals. Adjacent inverse pairs are freely canceled, producing a finite word that is imposed as a relator equal to the identity.

Changing face orientation inverts a relator, which imposes the same normal relation. Choosing another spanning tree changes the generator words but should give an equivalent group presentation. Literal equality of two presentation arrays is therefore not the right test of whether two valid constructions describe the same fundamental group.

Presentation versus group classification

A finite presentation describes generators and relations, but it need not make the resulting group easy to classify. General word and triviality problems are not solved by constructing the relators. The calculator explicitly stops at this presentation and the limited free reductions it performs.

A raw generator count can exceed the number of generators needed after further valid simplification, and a relator may render another relator redundant. The displayed Euler characteristic is a cell-count check, not a substitute for nonabelian classification or proof that two apparently different presentations are inequivalent.

Checks for a known complex

For a tree with no faces, no generator should remain. For an unfilled triangle, one generator and no face relator should appear. Filling that same triangle adds a relator killing its loop. These small examples verify how edges and faces enter the construction independently.

For a larger complex, compare the abelianized presentation with a separate first-homology calculation as a necessary check. Agreement does not prove equality of nonabelian groups. Preserve the edge list, chosen tree and generator orientations with exported words so a later symbolic group calculation can interpret them correctly.

A few questions, answered

Does this decide whether the group is trivial?

No. It constructs a presentation and freely reduces words; it does not solve the general triviality problem.

Why does another spanning tree change the words?

It changes the chosen loop generators while preserving an equivalent fundamental-group presentation.

Is the generator count a minimal rank?

Not generally. It is the number of non-tree edges before arbitrary presentation simplification.

Do drawn crossings create vertices?

No. Only explicitly indexed simplices define the complex topology.

Find your calculator

Start typing to explore the library.