The surviving spouse must not remarry during this two year time frame.
MAINTAINS AS A HOME A HOUSEHOLD
The survivor must maintain as a home a household that for the entire year is the principal place of abode of a son, daughter, adopted child, foster child or stepchild whom the taxpayer is entitled to the dependency exemption.
The taxpayer maintains a household only if the individual furnishes more than one-half the cost of maintaining the home during the tax year and if at least one of the persons described in the previous paragraph above (except for institutionalization or hospitalization) lives there for more than one-half the year (except for temporary abscenses, such as time spent at school.) Birth or death of such person during the year will not disqualify the taxpayer for head of household status if the person lived in the household for the part of year which he or she was alive.