This paper exhibits a duality between the theory of revealed preference of Afriat and the housing allocation problem of Shapley and Scarf. In particular, it is shown that Afriat's theorem can be ...