TITLE: Can one compute the fundamental group of a complex variety? Other topological invariants?
QUESTION [19 upvotes]: Given a system of polynomial equations with rational coefficients, is there an algorithm to compute the geometric fundamental group of the variety defined by these equations? I'm interested in both the affine case and the projective case. By "compute" I mean "express in terms of generators and relations."
Can one at least compute the unipotent or profinite completion in some manner?
Some possible approaches:
If the equations define a smooth, projective variety, then one can compute the Hodge cohomology, which tells you the rational de Rham cohomology. By formality, one can use the rational de Rham cohomology to compute the unipotent completion of the fundamental group.
Another approach to computing the cohomology is by looking at numbers of points over various finite fields and using the Weil conjectures.
Is there, for example, a way to get a CW complex homotopy equivalent to the complex points of the variety?

REPLY [11 votes]: There are algorithms to compute triangulations of real algebraic varieties, and thus of complex algebraic varieties. Sadly, the algorithms tend to be doubly exponential in the size of the input data. For more, see:
Basu, Saugata, Algorithms in real algebraic geometry: a survey,  ZBL06843372.
In fact, I don't think this is particularly new, so you can also look at the very nice book:
Basu, Saugata; Pollack, Richard; Roy, Marie-Françoise, Algorithms in real algebraic geometry, Algorithms and Computation in Mathematics 10. Berlin: Springer (ISBN 3-540-33098-4/hbk). x, 662 p. (2006). ZBL1102.14041.