Computing fundamental groups and singular cohomology of projective varieties Are there any general methods for computing fundamental group or singular cohomology (including the ring structure, hopefully) of a projective variety (over C of course), if given the equations defining the variety?
I seem to recall that, if the variety is smooth, we can compute the H^{p,q}'s by computer -- and thus the H^n's by Hodge decomposition -- is this correct? However this won't work if the variety is not smooth -- are there any techniques that work even for non-smooth things?
Also I seem to recall some argument that, at least if we restrict our attention to smooth things only, all varieties defined by polynomials of the same degrees will be homotopy equivalent. The homotopy should be gotten by slowly changing the coefficients of the polynomials. Is something like this true? Does some kind of argument like this work?
 A: The trick I know (learned it from Ron Livne) is to project it to some space with known homotopy / homology, throw away the ramification and branch loci to get a covering map (and you better pray it's Galois - otherwise the mess is even bigger) , and then bring the ramification back as extra relations.
e.g. here is a computation of the homotopy group of an elliptic curve E:
You have a degree 2 projection to a P1 with four ramification points. The homotopy group of P1 minus the four branch points is freely generated by loops about 3 of these points.
Claim: the homotopy group of E minus the ramification locus the kernel of the map from the free group on three generators: F(a,b,c) to Z / 2,
given by adding the powers on all the letters and taking mod 2 (e.g. abbac-1b maps to 4 mod 2 = 0). 
Sketch of proof: think of a,b,c, as paths in E minus the ramification points which have to glue to a closed loop, and to project to the generators of the homotopy  of P1 minus the branch points (i.e. they are "half loops" / sheet interchange about the ramification points).
Finally we have "fill" the ramification points - i.e. to bring the extra relations a2, b2, c2. After adding these relations, our group is generated by ab, ba, ac, ca, bc, cb. Hence - since e.g. (bc)(cb) = 1  - it is generated by ab, ac, bc; hence - since (ab)(bc) = (ac) - it is generated by ab, ac. We now observe that the map which sends x to axa is the map sending an element to the inverse; which shows as that
(ab)(ca)(ab)-1 = (ab)(ca)(ba) = (bc)-1 ba = (cb)(ba) = ca. 
Note that this is the simplest example one can give - this is a painful trick.
A: Apparently you can compute the h^{p,q}'s of smooth things in, for example, Macaulay. Here's an example: computing the h^{p,q}'s of a quintic hypersurface in P^4.
A: Not the cleanest answer (if it's too messy to follow, I can clean it up a bit) but look at section 2.4 (starting on page 14) of these notes from a complex algebraic geometry course that I took.  Also, section/chapter 6 on page 33 picks up the thread after some diversions about curves.  But roughly, the cohomology (specifically, the Hodge decomposition) depends only on the Jacobian Ideal.
A: First we assume that your equations have rational coefficients; if this is not so then you can probably 'approximate' your variety by a variety defined over rationals without changing its topology (though you have to be careful here).
Now, multiplying the equations by the common denominator, you obtain equations with integral coefficients. Then you can consider these equations over finite fields (and you get certain 'reductions mod p' of your variety). 
I believe (and can probably prove) that for p large enough, then the etale cohomology of this reduction is isomorphic to those of the original variety; and the etale cohomology over complex numbers is isomorphic to the singular cohomology with l-adic coefficients. 
Lastly, you can compute the Betti numbers over a finite field via computing the number of points of this variety over extensions of this field. I am not sure yet that this algorithm is optimal.:) 
A: Here's an interesting special case. If X is a simple convex polytope then the Betti numbers h(X) of the associated toric variety can be computed from the face vector f(X).  In fact, h(X) = Cf(X) where C is a matrix of binomial coefficients.  This is closely related to Peter McMullen's shelling argument for proving the Dehn-Sommerville equations.
Here's another special case.  For certain general convex polytopes the Betti numbers are not a linear function of the flag vector.  This was done using explicit calculations (using Macaulay as I recall) by Mark McConnell.  However, the middle perversity intersection homology (mpih) Betti numbers of the associated toric variety are a linear function of the flag vector.
The ring structure on the homology of the toric variety associated with a simple polytope is closely associated with the volume of the polytope, as it varies when the facets are moved in and out.
Finally, if the variety is defined over say the rationals then one can reduce mod p and start counting points, and then apply the Weil conjectures to determine the Betti numbers.  In fact, this is a quick way to determine the Betti numbers of a smooth toric variety.
A: This is an interesting question. To repeat some of the earlier answers, one should be able to get one's hands on a triangulation algorithmically using real algebro-geometric methods, and thereby compute singular cohomology and (a presentation for) the fundamental group. But this should probably be a last resort in practice. For smooth projective varieties, as people have noted, one can compute the Hodge numbers by writing down a presentation for the sheaf p-forms and then apply standard Groebner basis techniques to compute sheaf cohomology. This does work pretty well on a computer. For specific classes, there are better methods. For smooth complete intersections, there is a generating function for Hodge numbers due to Hirzebruch (SGA 7, exp XI), which is extremely efficient to use.
As for the fundamental group, if I had to compute it for a general smooth projective variety, I would probably use a Lefschetz pencil to write down a presentation.
For singular varieties, one can still define Hodge numbers using the mixed Hodge structure on cohomology. The sum of these numbers are still the Betti numbers. I expect these Hodge numbers are still computable, but it would somewhat unpleasant to write down a general algorithm. The first step is to build a simplicial resolution using resolution of singularities. My colleagues who know about resolutions assure me that this can be done algorithmically now days.
(This is my first reply in this forum. Hopefully it'll go through.)
A: I just want to assure you that everything in this situation is computable. For any real semi-algebraic set, there is an algorithm called cylindrical decomposition which breaks it into contractible pieces, glued along contractible pieces. See Algorithms in Real Algebraic Geometry, by Basu, Pollack and Roy. The $\mathbb{C}$-points of a $\mathbb{C}$-variety are, in particular, a semi-algebraic set, by restriction of scalars.
So you can compute cohomology, and you can compute a presentation of $\pi_1$. Of course, as always when dealing with groups in terms of generators and relations, it will probably not be computable to determine whether that group is trivial, or is isomorphic to some other group given by generators and relations.
I am pretty sure that this is not how anyone actually computes these things though. I hope someone will give an answer that reflects the actual state of the art.
A: Regarding your third paragraph, let p : X ---> B be a smooth, proper map of varieties over C, and for the heck of it say B is smooth.  Here I'm thinking B is your space of possible coefficients in the equation, and the fibers of p are the varieties you're talking about.  Then on complex points, p is proper submersion between manifolds, and hence a fibration of topological spaces; thus the fibers of p will be homotopy equivalent provided B is connected, canonically homotopy equivalent (up to 2nd order homotopy) if B is simply-connected, and really canonically homotopy equivalent if B is contractible, e.g. an affine space.
A: I believe you can have a elliptic curve and a singular elliptic curve both described by equations of degree three. Some people who know more should be able to answer this. If you change the coefficients I guess the homotopy type can change, just imagine that some subvariety degenerates into something singular and then expands back out to something else on the other side. 
Even at the algebraic level I think you can have (a minimal set of) polynomials of different degrees defining the same ideal. 
Another thought (or variant of your question) ... if you start with some subvariety Y and take a hyperplane section X, then X is cut out by the same things that cut out Y together with another linear polynomial. All the cohomology of X is determined except in the middle dimension by the Lefschetz hyperplane theorem. How do the coefficients describing the hyperplane determine this middle cohomology, including the cup products? (I guess the answer is well known?) 
