In general
For purposes of this subtitle, an individual shall be considered a head of a household if, and only if, such individual is not married at the close of his taxable year, is not a surviving spouse (as defined in subsection (a)), and either—
(A) maintains as his home a household which constitutes for more than one-half of such taxable year the principal place of abode, as a member of such household, of— (i) a qualifying child of the individual (as defined in section 152(c), determined without regard to section 152(e)), but not if such child— (I) is married at the close of the taxpayer’s taxable year, and (II) is not a dependent of such individual by reason of section 152(b)(2) or 152(b)(3), or both, or (ii) any other person who is a dependent of the taxpayer, if the taxpayer is entitled to a deduction for the taxable year for such person under section 151, or
(B) maintains a household which constitutes for such taxable year the principal place of abode of the father or mother of the taxpayer, if the taxpayer is entitled to a deduction for the taxable year for such father or mother under section 151.
For purposes of this paragraph, an individual shall be considered as maintaining a household only if over half of the cost of maintaining the household during the taxable year is furnished by such individual.