On testing substitutability
aa r X i v : . [ c s . D S ] M a y On testing substitutability
Cosmina Croitoru a , Kurt Mehlhorn b a Saarland University, Saarbr¨ucken b Max Planck Institut for Informatics, Saarbr¨ucken
Abstract
The papers [1] and [2] propose algorithms for testing whether the choice function in-duced by a (strict) preference list of length N over a universe U is substitutable. Therunning time of these algorithms is O ( | U | · N ) , respectively O ( | U | · N ) . In this notewe present an algorithm with running time O ( | U | · N ) . Note that N may be exponen-tial in the size | U | of the universe. Keywords:
Choice functions, Substitutability, Algorithm complexityA choice function on a finite set U of alternatives is any function f from subsets of U to subsets of U that maps any set A to a subset of itself, i.e., f ( A ) ⊆ A for all A ⊆ U .A choice function f is substitutable if A ⊆ B implies f ( B ) ∩ A ⊆ f ( A ) for all A , B ⊆ U ,i.e. the additional alternatives provided by B do not promote any x ∈ A − f ( A ) to theset of selected elements.We are interested in choice functions induced by preference lists Y on subsets of U .A preference list Y is simply an ordered list of subsets of U and the associated choicefunction f Y maps any subset A of U to the first element on the list that is contained in A . If Y is understood from the context, we write f instead of f Y . We use N to denotethe number of elements on Y , and, in order to make f defined for all A , we assume thatthe empty set is the last element of Y . For elements X and Y in Y , we write X ≻ Y if X properly precedes Y on Y and we write X (cid:23) Y for X ≻ Y or X = Y .For example, let U = { a , b , c , d } and Y = ( { a , b } , { a , c , d } , { a , c } , { a } , { c } , /0 ) . Then f Y ( { a , b , c } ) = { a , b } . The function f Y is not substitutable since d ∈ ( f Y ( { a , c , d } ) ∩{ d } ) − f Y ( { d } ) . We refer to [1] for a discussion of the role of substitutable choicefunctions in economics. Y is coherent if X ≻ Y implies X Y for any two elements on Y . Assume X ≻ Y and X ⊆ Y . Then Y does not lie in the range of f Y and removing Y from Y does notchange the function f . Thus we may assume that Y is coherent.From now on, Y denotes a coherent preference list and f stands for f Y . Y is sub-stitutable if f is a substitutable choice function. Lemma 1.
Let Y be a coherent preference list on U. Then for any A ⊆ U, f ( A ) = A ifand only if A ∈ Y . Preprint submitted to Elsevier October 18, 2018 roof.
Since f maps the powerset of U to Y , f ( A ) = A implies A ∈ Y . Conversely,assume A ∈ Y and f ( A ) ≻ A . Then f ( A ) and A are members of Y with f ( A ) ≻ A and f ( A ) ⊆ A , a contradiction to the coherence of Y . ✷ An established condition of choice functions known as Aizerman’s outcast , orChernoff’s postulate ∗ , or ˆ α (see Brandt and Harrenstein [3]) is ( outcast ) : if f ( A ) ⊆ B ⊆ A then f ( B ) = f ( A ) . Lemma 2.
If Y is a coherent preference list on U, then f satisfies outcast .Proof. B ⊆ A implies f ( A ) (cid:23) f ( B ) and f ( A ) ⊆ B implies f ( B ) (cid:23) f ( f ( A )) = f ( A ) ,where the last equality uses coherence. Thus f ( A ) = f ( B ) . ✷ Lemma 3.
Let Y be a coherent and substitutable preference list on U. If X is a memberof Y then also every subset of X is a member of Y .Proof. Assume X = f ( X ) and A ⊆ X . By substitutability, f ( X ) ∩ A ⊆ f ( A ) and hence A = X ∩ A = f ( X ) ∩ A ⊆ f ( A ) . Thus f ( A ) = A . ✷ A preference list Y is complete if it contains for each X ∈ Y also all of its subsets.Note that complete preference lists are exponentially long in the size of their largestmember.In order to demonstrate non-substitutability of a preference list, we need to exhibitsets A and B with A ⊆ B and f ( B ) ∩ ( A − f ( A )) = /0. We next show that we can restrictthe search to special subsets of U . A witness (to non-substitutability) is a pair ( X , Y ) of members of Y such that X ≻ Y , f ( X ∪ Y ) = X and there is an x ∈ X − Y such that f ( Y ∪ { x } ) = Y . Note that x is selected when the set of alternatives is X ∪ Y (this is theset B ) but is not selected when the set of alternatives is Y ∪ { x } (this is the set A ). Theorem 4. Y is not substitutable if and only if there is a witness to non-substitutability.Proof. Assume first that ( X , Y ) is a witness. Then X ≻ Y , f ( X ∪ Y ) = X and there isan x ∈ X − Y such that f ( Y ∪ x ) = Y . Let A = Y ∪ { x } and B = X ∪ Y . Then A ⊆ B and x ∈ f ( B ) ∩ ( A − f ( A )) . Thus f is not substitutable.Conversely, assume that f is not substitutable. Then there are subsets A and B of U with A ⊆ B and f ( B ) ∩ A f ( A ) . Since A ⊆ B , we have f ( B ) (cid:23) f ( A ) . In fact, f ( B ) ≻ f ( A ) since f ( B ) = f ( A ) and f ( A ) ⊆ A implies f ( B ) ∩ A = f ( A ) . Since f ( A ) ⊆ A ⊆ B ,we have f ( A ) ∪ f ( B ) ⊆ B and hence f ( B ) ⊆ f ( A ) ∪ f ( B ) ⊆ B . Thus f ( f ( A ) ∪ f ( B )) = f ( B ) by property (outcast). Let x ∈ ( f ( B ) ∩ A ) − f ( A ) . Then f ( B ) ∪{ x } ⊆ A and f ( A ) ⊆ f ( A ) ∪ { x } ⊆ A and hence f ( f ( A ) ∪ { x } ) = f ( A ) by (outcast). Thus ( f ( B ) , f ( A )) is awitness. ✷ Theorem 4 directly translates into an algorithm of running time O ( N | U | + N | U | ) .Note first that one can determine f ( A ) in time O ( N | U | ) by simply scanning the list Y and checking each set for containment. The algorithm has two phases. In the firstphase, one determines for each Y ∈ Y the set of x for which f ( Y ∪ { x } ) = Y . Thisrequires N | U | function evaluations and O ( N | U | ) time. Then one checks for every pair ( X , Y ) of elements of Y , whether it is a witness. This requires N function evaluationsand N | U | look-ups of precomputed values and hence takes time O ( N | U | ) .2 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− . Preprocessingfor all X ∈ Y do { d X : = for all x ∈ U do sens ( x , X ) : = false } for all X ∈ Y dofor all Y ∈ Y with X ≻ Y do { if X ⊆ Y then return Y is NOT COHERENT ; if Y ⊆ X then increment d X ; for all x ∈ U − Y do if X ⊆ Y ∪ { x } then sens ( x , Y ) : = true } for all X ∈ Y do if d X = | X | then return Y is NOT COMPLETE ; . Looking for the first witness to non-substitutabilityfor all X ∈ Y dofor all Y ∈ Y with X ≻ Y doif ( ∃ x ∈ X − Y s.t. sens ( x , Y ) = true ) ∧ ( ∀ y ∈ Y − X sens ( y , X ) = false ) thenreturn Y is NOT SUBSTITUTABLE: witness ( X , Y ) ; . Successreturn Y is SUBSTITUTABLE −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− Figure 1:
Testing if the list Y is substitutable We improve the running time to O ( N | U | ) . The crucial insight is as follows. Wesearch for a witness pair ( X , Y ) in increasing order of X . Of course, we stop the searchas soon as we have found a witness. So when we consider a pair ( X , Y ) we knowthat there is no witness ( Z , · ) with Z ≻ X . We then have f ( X ∪ Y ) = X if and only if f ( X ∪ { x } ) = X for all elements x ∈ Y − X . We stress that this equivalence does nothold in general, it only holds under the assumption that there is no earlier witness. Sowe can replace the function evaluation f ( X ∪ Y ) of cost O ( N | U | ) by | U | look-ups ofprecomputed values. We next give the details.We call X ∈ Y insensitive to x ∈ U if f ( X ∪ { x } ) = X and sensitive otherwise. Lemma 5.
Let X , Y ∈ Y with X ≻ Y . If f ( X ∪ Y ) = X, then X is insensitive to allx ∈ Y − X. If X is insensitive to all x ∈ Y − X and there is no witness ( Z , · ) with Z ≻ X,then f ( X ∪ Y ) = X.Proof.
Let x ∈ Y − X be arbitrary. Then X ⊆ X ∪{ x } ⊆ X ∪ Y and hence X = f ( X ∪ Y ) (cid:23) f ( X ∪ { x } ) (cid:23) f ( X ) = X . Thus f ( X ∪ { x } ) = X and X is insensitive to x .For the second part, assume f ( X ∪ Y ) = Z with Z ≻ X . Then Z ⊆ X ∪ Y and hence Z ∪ X ⊆ X ∪ Y . Thus Z (cid:23) f ( X ∪ Y ) (cid:23) f ( X ∪ Z ) (cid:23) Z , where the last inequality followsfrom Z ⊆ X ∪ Z . Thus f ( X ∪ Z ) = Z . Since ( Z , X ) is not a witness, we must have f ( X ∪{ x } ) = X for every x ∈ Z − X . On the other hand, Z − X ⊆ Y − X (since Z ⊆ X ∪ Y )and f ( X ∪ { x } ) = X since X is insensitive to all x ∈ Y − X , a contradiction. ✷ Lemma 5 suggests a way to find the non-substitutability witness ( X , · ) with minimalfirst component. 3 heorem 6. Let X , Y ∈ Y with X ≻ Y and assume that there is no witness ( Z , · ) withZ ≻ X. Then ( X , Y ) is a witness if and only if X is insensitive to all x ∈ Y − X and Y issensitive to some x ∈ X − Y .Proof.
Assume first that ( X , Y ) is a witness pair. Then Y is sensitive to some x ∈ X − Y and f ( X ∪ Y ) = X . The latter implies that X is insensitive to all elements of Y − X .Conversely, assume that X is insensitive to all x ∈ Y − X and Y is sensitive to some x ∈ X − Y . Then, f ( X ∪ Y ) = X by Lemma 5 and hence ( X , Y ) is a witness pair. ✷ We are now ready for the algorithm. The algorithm has two phases. In a prepro-cessing phase, we determine whether Y is coherent, complete, and, most importantly,compute the Boolean flags sens ( x , X ) which is true if X ∈ Y is sensitive to x .In the main computation, we search for the first witness to non-substitutability. Weiterate over the elements of X of Y in increasing order. Assume that there is no witness ( Z , · ) with Z ≻ X . We then iterate over the Y ∈ Y with X ≻ Y and use Theorem 6 todetermine whether ( X , Y ) is a witness pair.The most expensive task of the first phase is the construction of the Boolean matrix sens of size | U | × N . Since an inclusion test needs O ( | U | ) time, the overall time istherefore O ( | U | · N ) . The time complexity of the second phase is O ( | U | · N ) (the | U | factor is given by the inspection of the Boolean matrix sens in order to apply The-orem 6).By Theorems 4 and 6 and the above discussion, the following corollary holds. Corollary 1.
The algorithm in Figure 1 tests in O ( | U | · N ) time if a given preferencelist of size N over an universe U is substitutable. Remarks.