This paper is concerned with persistency properties which allow the evaluation of some variables at all maximizing points of a quadratic pseudo-Boolean function. Hammer, Hansen and Simeone (1984) have proposed to determine these variables using a procedure described by Balinski for computing a strongly complementary pair of optimal primal and dual solutions for arbitrary linear programs. We propose a linear time algorithm for determining these variables from a "best roof" of f, i.e. from a lowest upper linear bound of f.