with the meaning that singlemm implies that xm is undefinedand singleww implies that yw is undefined an inspection of the proposed algorithmhoweverquickly reveals that the marital status of man is determined by the value through the relation ~singlem[kk this suggests that the array singlem be omittedaccordinglywe will simplify the name singlew to single these conventions lead to the refinement shown by the following procedure try the predicate acceptable can be refined into the conjunction of single and stablewhere stable is function to be still further elaborated procedure try (mman)var rrankwwomanbegin if then for : to - do :wmr[ , ]if single[wstable then [ :wy[ :msingle[ :falsetry( + )single[ :true end end else record the solution end end try at this pointthe strong similarity of this solution with procedure allqueens is still noticeable the crucial task is now the refinement of the algorithm to determine stability unfortunatelyit is not possible to represent stability by such simple expression as the safety of queen' position the first detail that should be kept in mind is that stability follows by definition from comparisons of ranks the ranks of men or womenhoweverare nowhere explicitly available in our collection of data established so far surelythe rank of woman in the mind of man can be computedbut only by costly search of in wmrm since the computation of stability is very frequent operationit is advisable to make this information more directly accessible to this endwe introduce the two matrices rmwarray manwoman of rankrwmarray womanman of rank such that rmwm, denotes woman ' rank in the preference list of man mand rwmw, denotes the rank of man in the list of it is plain that the values of these auxiliary arrays are constant and can initially be determined from the values of wmr and mwr the process of determining the predicate stable now proceeds strictly according to its original definition recall that we are trying the feasibility of marrying and wwhere wmrm, is man ' -th choice being optimisticwe first presume that stability still prevailsand then we set out to find possible sources of trouble where could they be hiddenthere are two symmetrical possibilities there might be women pwpreferred to by mwho herself prefers over her husband there might be man pmpreferred to by wwho himself prefers over his wife pursuing trouble source we compare ranks rwmpw, and rwmpw, [pwfor all women preferred to by wi for all pw wmrm, such that we happen to know that all these candidate women are