Kalai, Rubinstein, and Spiegler (2002) propose the rationalization of choice functions that violate the “independence of irrelevant alternatives” axiom through a collection (book) of linear orders (rationales). In this paper we present an algorithm which, for any choice function, gives (i) the minimal number of rationales that rationalizes the choice function, (ii) the composition of such ratio...