Peter asks whether a recount in South Dakota is mandatory. From my quick review of the South Dakota law, a recount is only undertaken if, in elections closer than 1/4 of 1 percent, a petition is filed by the candidate or the requisite number of voters.
S.D. St. 12-21-08 through 12-21-14. An automatic recount is required only in the event of a tie. S.D. St. 12-21-16.