# Does the cohomology after Dehn surgery depend only on the original 3-manifold or also how the knot is situated?

For $f:S^1\to M$ a knot in a 3-manifold, we can construct a 3-manifold $N$ by a $0/1$-type Dehn surgery along $f$:

1. First remove from $M$ a solid torus which is a tubular neighbourhood of the knot $f$;
2. Thereafter $N$ is the result of sewing this solid torus back in $M$ such that the meridian disc goes 1 time along the longitude and 0 times along the meridian.

Does the integral cohomology groups $H^1(N;{\mathbb{Z}})$ and $H^2(N;{\mathbb{Z}})$ depend only on the integral cohomology of $M$ or do they also depend on how the knot $f$ sits in $M$?

I asked this on Math Stack Exchange but did not receive response.

-
Honestly, this is indeed more appropriate for MSE. Of course, this depends on the knot, which you can easily see by writing down Poincar\'e duality and appropriate exact sequences. E.g., if you start with $S^2\times S^1$, you can get back $S^3$ or, by choosing a trivial knot, you can further increase the Betti numbers. – Alex Degtyarev Apr 26 '14 at 17:20
I agree that this would be better for MSE, but since the OP didn't get a response there, I wrote an answer which is posted below. – Danny Ruberman Apr 26 '14 at 17:44

It depends on the homology class of the knot, and also on the framing, which in your terminology is the choice of longitude. For knots in the 3-sphere (or more generally in a homology 3-sphere), there is a well-defined 0-framing, and that gives the longitude. So in general, you should ask about surgery on a knot with a given framing. A correct statement might be that if you have two homologous knots, $K_0$ and $K_1$, then there is a correspondence between their framings; moreover surgery on $K_0$ and $K_1$ with corresponding framings gives manifolds with the same homology.
If you want to figure out how the homology changes, then you'll find that the dependence on the homology class is maybe a little subtle, although it is an excellent exercise to figure out what is going on. For instance, surgery on a null-homologous knot with an appropriate framing will increase the first Betti number, but surgery on a knot carrying a homology class of infinite order will decrease $b_1$. For knots whose homology class is torsion in $H_1(M)$, the rational-valued self-linking plays a crucial role.