  We prove that, like the Seiberg-Witten monopole homology, the Heegaard Floer
homology for a three-manifold determines its Thurston norm. As a consequence,
we show that knot Floer homology detects the genus of a knot. This leads to new
proofs of certain results previously obtained using Seiberg-Witten monopole
Floer homology (in collaboration with Kronheimer and Mrowka). It also leads to
a purely Morse-theoretic interpretation of the genus of a knot. The method of
proof shows that the canonical element of Heegaard Floer homology associated to
a weakly symplectically fillable contact structure is non-trivial. In
particular, for certain three-manifolds, Heegaard Floer homology gives
obstructions to the existence of taut foliations.
