My logic is probably flawed along with my little knowledge of nuclear weapons and there general effects but from what I understand, if you used a modern day nucclear warhead, everything from detonation point outward is vaporized at the molecular level, out to quite a distance I would imagine. So, why divert the asteroid at all? A precise strike when it came into near Earth orbit would do the job quite nicely. If you send one missile at a time, you could calculate the time needed to assess the potential damage to the asteroid, then send another up and another and so on until there is nothing left of it that wouldn't be burned up in the atmosphere.
Then again, I'm probably wrong my studies were mostly of the effects of Hiroshima and that was more then a decade ago, plus it's 8 am and I haven't slept yet. So.
Still, I always chuckled at that line in Deep Impact where Morgan Freeman is saying something like "Our nuclear strike has failed. Our 152 Titan missiles failed to change the course of the rogue asteroid." Phew. Yeah, and Elvis really isn't dead either. Stupid movie. I don't care what the hell a rock is made of or how fast it's going, it's gonna be space dust if I send 150 nukes at it.
Oh, well. Interesting topic nonetheless. I'd be more inclined to keep nukes around for plantary defense myself. Sooner or later, someone will take notice of us. Somehow, I don't think they'll want to be friends. Then we can world peace, and stop killing each other because we'll have a whole new bunch of people to kill! Woo hoo!