math0411028/3D.tex
1: \documentclass[12pt]{amsart}
2: \usepackage{epsf}
3: \usepackage{amsmath}
4: \usepackage{amssymb}
5: \usepackage{epic}
6: \usepackage{graphics}
7: \newtheorem{theo}{\bf Theorem}%[section]
8: \newtheorem{propo}[theo]{\bf Proposition}
9: \newtheorem{lemma}[theo]{\bf Lemma}
10: \newtheorem{conj}[theo]{\bf Conjecture}
11: \newtheorem{defi}[theo]{\bf Definition}
12: \newtheorem{coro}[theo]{\bf Corollary}
13: \newtheorem{problem}[theo]{\bf Problem}
14: \newcommand{\DEF}{\buildrel {\rm def} \over =}
15: \newcommand{\twelvedots}{
16:   \put(0,0){\circle*{4}}
17:   \put(0,20){\circle*{4}}
18:   \put(0,40){\circle*{4}}
19: 
20:   \put(40,0){\circle*{4}}
21:   \put(40,20){\circle*{4}}
22:   \put(40,40){\circle*{4}}
23: 
24:   \put(80,0){\circle*{4}}
25:   \put(80,20){\circle*{4}}
26:   \put(80,40){\circle*{4}}
27: 
28:   \put(120,0){\circle*{4}}
29:   \put(120,20){\circle*{4}}
30:   \put(120,40){\circle*{4}}
31: }
32: \newcommand{\sixteendots}{
33:   \put(0,0){\circle*{4}}
34:   \put(0,20){\circle*{4}}
35:   \put(0,40){\circle*{4}}
36:   \put(0,60){\circle*{4}}
37: 
38:   \put(40,0){\circle*{4}}
39:   \put(40,20){\circle*{4}}
40:   \put(40,40){\circle*{4}}
41:   \put(40,60){\circle*{4}}
42: 
43:   \put(80,0){\circle*{4}}
44:   \put(80,20){\circle*{4}}
45:   \put(80,40){\circle*{4}}
46:   \put(80,60){\circle*{4}}
47: 
48:   \put(120,0){\circle*{4}}
49:   \put(120,20){\circle*{4}}
50:   \put(120,40){\circle*{4}}
51:   \put(120,60){\circle*{4}}
52: }
53: 
54: \begin{document}
55: 
56: \title{Conjectures on three-dimensional stable matching}
57: \author{Kimmo Eriksson}
58: \address{IMA, M{\"a}lardalens h{\"o}gskola \\
59:    Box 883 \\
60:    SE-721 23 V{\"a}ster{\aa}s, Sweden}
61: \email{kimmo.eriksson@mdh.se}
62: \author{Jonas Sj{\"o}strand}
63: \address{Dept.~of Mathematics \\
64:    KTH \\
65:    SE-100 44 Stockholm, Sweden}
66: \email{jonass@kth.se}
67: \author{Pontus Strimling}
68: \address{IMA, M{\"a}lardalens h{\"o}gskola \\
69:    Box 883 \\
70:    SE-721 23 V{\"a}ster{\aa}s, Sweden}
71: \email{pontus.strimling@mdh.se} \keywords{stable matching, 3GSM} \subjclass{Primary: 91A06; Secondary: 91B68}
72: \date{October 31, 2004}
73: 
74: \begin{abstract}
75: We consider stable three-dimensional matchings of three categories of agents, such as women, men and dogs.
76: This was suggested long ago by Knuth (1976), but very little seems to have been published on this problem.
77: Based on computer experiments, we present a couple of conjectures as well as a few counter-examples to other
78: natural but discarded conjectures. In particular, a \emph{circular} 3D matching is one where women only care
79: about the man, men only care about the dog, and dogs only care about the woman they are matched with. We
80: conjecture that a stable outcome always exists for any circular 3D matching market, and we prove it for
81: markets with at most four agents of each category.
82: \end{abstract}
83: \maketitle
84: 
85: \section{Introduction}\noindent
86: The \emph{stable marriage problem} is a well-known problem in matching theory: Given a set of men and a set of women,
87: find a matching that is stable. A matching is stable if there is no blocking pair, that is, a man and a woman who
88: would prefer each other to their current partners in the matching. Gale and Shapley (1962) introduced this problem
89: and proved that a stable matching must exist by describing an algorithm that produces such a matching.
90: 
91: The theory of stable matchings has become an important subfield within game theory, as documented by the
92: book of Roth and Sotomayor (1990). Game theorists are interested in the applications of matching theory in real
93: markets. However, the theory of stable matchings also appeal to combinatorialists and computer scientists. Indeed,
94: the first book on the subject was written by combinatorial computer scientist \emph{extraordinaire} Donald E.~Knuth
95: (Knuth, 1976). These books discuss not only the two-sided matching problem, but also the one-sided so called
96: \emph{roommate problem} where any two agents can form a pair. For the roommate problem, it is easy to find
97: counter-examples to stability.
98: 
99: Knuth (1976) lists a dozen suggested further directions for
100: research on stable matchings, one of which is to investigate
101: three-dimensional stable matching, say of women, men and dogs. A
102: 3D matching is a partition of the agents into triples consisting
103: of one agent of each type. A 3D matching is stable if no blocking
104: triple exists, that is, a triple $(a,b,c)$ which each of its
105: members would prefer to their current triples in the matching. Of
106: course, this calls for a definition of how agents rank triples
107: based on their preferences on other individuals. Many
108: possibilities exist.
109: 
110: The only paper we have found on three-dimensional stable matching
111: problems is a complexity investigation by Ng and Hirschberg
112: (1991). They showed that some instances of what they dub the
113: \emph{three-gender stable marriage problem} (3GSM) do not have any
114: strongly stable outcomes, and proved that the decision problem is
115: NP-complete. (Strong stability is defined in the next section.) As
116: an open problem, Ng and Hirschberg mention the \emph{circular}
117: 3GSM where, say, women rank triples based only on the man in the
118: triple, and similarly men care only about dogs, and dogs care only
119: about women. The origin of this problem is attributed to Knuth.
120: 
121: In this paper, we will report the results of our investigation of the existence of stable outcomes of 3GSM in the
122: circular version as well as in a few other versions. Our main conjecture is that circular 3GSM always allows a
123: stable outcome. We prove this for all instances with at most four agents of each gender, and we describe the
124: evidence from computer experimentation that led us to this conjecture.
125: 
126: \section{Problem definition}\noindent
127: Let $N$ be the maximal number of agents of each of the three genders. Thus, $N=3$ means that we have at most
128: nine agents (three women, three men, three dogs). Without loss of generality we can assume that we have
129: the maximal number of agents of each gender, for otherwise we can just fill the ranks with dummy agents who
130: everybody likes less than any real agent.
131: 
132: We will assume that every agent ranks all possible triples based
133: on her ranking of the individuals of the other genders. For
134: example, every woman will have a preference list of length $2N$ on
135: the set of all men and dogs. If $a$ prefers $b_1$ to $c_1$ to
136: $b_2$, we write this as $b_1 >_a c_1 >_a b_2$. Agents together
137: with their preferences constitute a \emph{3G matching market}.
138: 
139: We will see several different rules for generating preferences on
140: triples from preferences on individuals. If $a$ prefers triple
141: $T_1$ to $T_2$ we write $T_1 >_a T_2$. If preferences are not
142: strict, we use $\ge_a$ instead (\emph{weak} preference).
143: 
144: A \emph{3G matching} is a partition of the agents into $N$ triples consisting of a woman, a man and a dog.
145: Given agents' preferences on triples, a 3G matching has a \emph{blocking triple} $T$ if all members of $T$
146: strictly prefer $T$ to their current triples in the matching. A 3G matching is \emph{stable} if it has no
147: blocking triples. A triple $T$ is \emph{weakly blocking} if some member strictly prefers $T$ to her current
148: matching and the other members weakly prefer $T$. A 3G matching is \emph{strongly stable} if it has no weakly
149: blocking pair.
150: 
151: The problem is: Given a triple preference rule, does a stable 3G
152: matching exist for every matching market of size $N$? We have been
153: interested in the following rules for preferences on triples. Let
154: $T=(a,b,c)$ and $T'=(a,b',c')$.
155: \begin{itemize}
156: \item \emph{Circular}: $T >_a T'$ if and only if $b >_a b'$. Similarly, men care only about dogs, and dogs care
157: only about women.
158: \item \emph{Weakest link}: $T >_a T'$ if $\min_a(b,c) >_a \min_a(b',c')$. In general, agents rank triples according
159: to the weakest link of the triple, that is, according to their
160: least preferred partner.
161: \item \emph{Strongest link}: $T >_a T'$ if $\max_a(b,c) >_a \max_a(b',c')$. In general, agents rank triples according
162: according to their most preferred partner.
163: \end{itemize}
164: Note that the circular rule is a special case both of the weakest link rule and the strongest link rule, depending
165: on whether we let the gender cared about in the circular rule be consistently low-ranked or high-ranked
166: in relation to the other gender.
167: 
168: 
169: \section{Investigating stability by computer}\noindent
170: For size $N$, the number of different matching markets is $(2N)!^{3N}$, since each agent ranks
171: all $2N$ agents of other genders. Even if isomorphic copies were deleted, the number of markets is
172: large already for $N=3$ and daunting for $N > 3$.
173: 
174: In order to investigate stability, we wrote a program (in Python) which starts by generating a random
175: market of a given size $N\le 5$. For this market each of the $N!^2$ possible matchings are checked for
176: stability (according to a given triple preference rule).
177: The number of stable matchings is recorded. Then a local search for markets with fewer stable
178: matchings is carried out as follows: Each of the $3N$ agents, in turn, changes its preference list to
179: every possible alternative permutation. For each of these markets the number of stable matchings is computed,
180: and whenever a new minimum is found, search proceeds from this market.
181: 
182: If a market with zero stable matchings is found, we have a counter-example to the existence of stable matchings
183: for the given preferences rule.
184: 
185: If no market with zero stable matchings is found, we have an indication that there is none. More
186: specifically we obtain an indication of the minimum number of stable matchings.
187: 
188: We started searching with $N=3$, in which case we never found any markets without stable matchings for any
189: of the three preference rules. This came as a surprise to us, and so we continued with $N=4$.
190: 
191: \section{Counter-examples to stability}\noindent
192: With $N=4$, our computer search found a \emph{counter-example to
193: stability under the weakest link rule}. In order to present the
194: preferences in a convenient way, we write lists of ranking numbers
195: from 1 to 8. Lower rank means more preferred.
196: \begin{align*}
197: a_1 &: [[2, 8, 3, 7], [5, 1, 4, 6]] \\
198: a_2 &: [[7, 4, 2, 1], [3, 8, 5, 6]] \\
199: a_3 &: [[8, 4, 6, 3], [5, 2, 1, 7]] \\
200: a_4 &: [[1, 2, 8, 6], [7, 5, 3, 4]] \\
201: &\\
202: b_1 &: [[6, 5, 7, 2], [8, 3, 1, 4]] \\
203: b_2 &: [[7, 1, 4, 6], [5, 3, 8, 2]] \\
204: b_3 &: [[4, 3, 1, 2], [7, 6, 5, 8]] \\
205: b_4 &: [[8, 7, 5, 4], [6, 2, 1, 3]] \\
206: &\\
207: c_1 &: [[8, 3, 2, 7], [5, 4, 6, 1]] \\
208: c_2 &: [[5, 1, 6, 4], [8, 7, 2, 3]] \\
209: c_3 &: [[8, 1, 3, 2], [5, 6, 4, 7]] \\
210: c_4 &: [[8, 7, 5, 3], [1, 6, 2, 4]]
211: \end{align*}
212: For women, the lists give the ranking of $[[b_1, b_2, b_3, b_4],
213: [c_1, c_2, c_3, c_4]]$. For men, the lists denote the ranking of
214: $[[a_1, a_2, a_3, a_4], [c_1, c_2, c_3, c_4]]$. For dogs, it is
215: the ranking of $[[a_1, a_2, a_3, a_4], [b_1, b_2, b_3, b_4]]$.
216: 
217: Furthermore, we found a \emph{counter-example to strong stability under the circular rule}:
218: \begin{align*}
219: a_1 &: [1, 2, 4, 3] \\
220: a_2 &: [2, 1, 3, 4] \\
221: a_3 &: [2, 4, 3, 1] \\
222: a_4 &: [1, 3, 4, 2] \\
223: &\\
224: b_1 &: [3, 1, 2, 4] \\
225: b_2 &: [4, 1, 2, 3] \\
226: b_3 &: [3, 2, 4, 1] \\
227: b_4 &: [2, 4, 3, 1] \\
228: &\\
229: c_1 &: [2, 3, 4, 1] \\
230: c_2 &: [1, 4, 2, 3] \\
231: c_3 &: [2, 3, 4, 1] \\
232: c_4 &: [3, 1, 2, 4]
233: \end{align*}
234: 
235: \section{Conjectures}\noindent
236: In the light of the counter-examples of the previous section, it is intriguing that days of computer time
237: for $N=4$ and $N=5$ have not resulted in any counter-examples to the following conjecture.
238: \begin{conj}
239: Under the strongest link rule, every 3G matching market has a stable matching.
240: \end{conj}\noindent
241: In fact, since the lowest number of stable matchings found by the computer is \emph{two} for both cases
242: $N=4$ and $N=5$ (examples of such markets available from the authors),
243: we propose the following stronger conjecture.
244: \begin{conj}
245: Under the strongest link rule, every 3G matching market has at least two stable matchings.
246: \end{conj}\noindent
247: For the circular rule, which is a special case of the strongest link rule, the computer always find many
248: stable matchings so we guess that the minimal number of stable matchings increase with $N$. We do not
249: have enough evidence to produce a firmer guess, so our main conjecture is simply:
250: \begin{conj}
251: Under the circular rule, every 3G matching market has a stable matching.
252: \end{conj}\noindent
253: The circular case conjecture would seem to be amenable to an algorithmic approach similar to the deferred
254: acceptance procedure of Gale and Shapley (1962) for two-sided marriages. In other words, it is not difficult
255: to come up with ideas of algorithms like the following:
256: 
257: ``Let all women propose to the men they prefer most. Let every man
258: tentatively accept the woman who is most preferred by the dog the man prefers most. Continue until all women
259: propose to different men.''
260: 
261: However, all such ideas seem to run into problems and we have
262: resigned ourselves to nonconstructive approaches: In the next
263: section we will describe how one might try to apply Scarf's
264: theorem (Scarf, 1971) on balanced games, and why this fails.
265: Finally we will carry out a case-by-case analysis, which is doable
266: for $N\le 4$ but then seems to get out of hand.
267: 
268: \section{Circular 3GSM is not a balanced game}\noindent
269: If you want to show that a game has a nonempty core (which in our
270: case is equivalent to the existence of a stable matching), one
271: approach is to show that it is {\em balanced} in the sense of
272: Scarf~\cite{scarf}.
273: \begin{theo}[{\bf Scarf, 1967}]
274: A balanced $n$-person game always has a nonempty core.
275: \end{theo}\noindent
276: Quinzii~\cite{quinzii} showed (in a more general setting) that the
277: usual two-dimensional matching game is balanced. However, in this
278: section we will see that our three-dimensional matching game is
279: not.
280: 
281: For the general definition of a balanced game we refer
282: to~\cite{scarf}. Here, we will merely examine what it would mean
283: for our game to be balanced.
284: \begin{defi}
285: A collection $C$ of triples is {\em balanced} if there is possible
286: to find nonnegative real weights $\delta_T$, for each triple $T$
287: in $C$, such that, for each person $x$,
288: $$\sum_{x\in T\in C}\delta_T=1.$$
289: \end{defi}
290: \noindent A {\em utility vector} is a list where every person has
291: written down her utility goal, that is, how happy she hopes to
292: become. A utility vector is {\em realizable} if there is a
293: matching such that every person reach her utility goal. A utility
294: vector is {\em realizable for a triple} if all people in the
295: triple would reach their utility goal if the triple were formed.
296: \begin{defi}
297: Our game is {\em balanced} if, for every balanced collection $C$
298: of triples, a utility vector is realizable if it is realizable for
299: every triple in $C$.
300: \end{defi}
301: \noindent Now, we present a counterexample of size $3+3+3$. Let
302: $C$ be the collection of triples corresponding to the shaded
303: triangles in figure~\ref{fig:counterexample}.
304: \begin{figure}
305: \begin{center}
306: \setlength{\unitlength}{0.5mm}
307: \begin{picture}(100,100)(0,0)
308: \put(0,0){\resizebox{50mm}{!}{\includegraphics{counterexample}}}
309: \put(46.5,4){$a_1$} \put(36,33){$b_1$} \put(58,33.3){$c_1$}
310: \put(46.5,48){$a_2$} \put(36,62){$b_2$} \put(58,62.5){$c_2$}
311: \put(46.5,92){$a_3$} \put(3,48){$c_3$} \put(91,47.5){$b_3$}
312: \end{picture}
313: \caption{An example showing that our game is not balanced.}
314: \label{fig:counterexample}
315: \end{center}
316: \end{figure}
317: This collection is balanced, since every person belongs to exactly
318: two triples (let all $\delta_T=1/2$). Choose the preferences so
319: that the edges in the figure correspond to rank 1 or 2. For
320: example, $a_1$ will rank $b_1$ and $b_3$ as number 1 and 2 (in any
321: order) and $b_2$ as number 3. Now consider the utility vector
322: where every person hopes to get at least her second-best choice.
323: This is obviously realizable for every triple in $C$, so if the
324: game were balanced, the utility vector would be realizable.
325: Since every instance
326: of ``$x$ ranks $y$ as number 1 or 2'' has a corresponding edge in
327: the figure, a realization of the utility vector is equivalent to a
328: disjoint family of triangles (not necessarily shaded) in the
329: figure which covers all people. But there is no such family: To
330: cover $a_2$, either of the triangles $a_2b_1c_1$ and $a_2b_2c_2$
331: must belong to the family. But none of the three triangles
332: containing $a_1$ is disjoint with $a_2b_1c_1$, and none of the
333: three triangles containing $a_3$ is disjoint with $a_2b_2c_2$.
334: 
335: \section{Proof of stability for circular 3GSM with $N\le 4$}
336: 
337: \subsection{Notation} \noindent Say that a person is {\em
338: i-content} if she has got the person she ranks as number $i$.
339: 
340: If $x$'s favorite $y$'s favorite $z$ ranks $x$ as number $i$, we
341: say that $xyz$ is a $11i$-triple.
342: The proposition ``there is no $11i$-triple for $i<j$'' is called
343: the {\em $11j$-condition}.
344: 
345: We will often use a dot diagram to describe partial information of
346: the preferences. Here is an example:
347: \begin{center}
348:   \begin{picture}(130,50)(-4,-7)
349:     \twelvedots
350:     \put(0,40){\line(1,0){80}}
351:     \put(80,40){\line(2,-1){40}}
352:     \dashline[-7]{3}(0,40)(40,20)
353:     \put(99,31){\tiny 3}
354: 
355:     \put(-4,-7){\tiny $a_3$}
356:     \put(-4,13){\tiny $a_2$}
357:     \put(-4,33){\tiny $a_1$}
358:     \put(36,-8){\tiny $b_3$}
359:     \put(36,12){\tiny $b_2$}
360:     \put(36,32){\tiny $b_1$}
361:     \put(76,-7){\tiny $c_3$}
362:     \put(76,13){\tiny $c_2$}
363:     \put(76,33){\tiny $c_1$}
364:     \put(116,-7){\tiny $a_3$}
365:     \put(116,13){\tiny $a_2$}
366:     \put(116,33){\tiny $a_1$}
367:   \end{picture}
368: \end{center}
369: A solid line means ``rank 1'', a dashed line means ``rank 2'' and
370: an $i$-labeled line means ``rank $i$''. So from the diagram above
371: we get the information that $a_1$'s second-best choice is $b_2$,
372: but her favorite is $b_1$ whose favorite is $c_1$ who ranks $a_2$
373: as number 3. To make the following pages more readable, we will
374: omit the dot labels, always implicitly referring to the labeling
375: above (in the 4-case, of course, there will be an additional row
376: $a_4b_4c_4a_4$ at the bottom).
377: 
378: \subsection{The 3-case}\noindent
379: \begin{theo}\label{thm:3}
380: In the 3-case there is always a stable matching. Furthermore, for
381: any person $x$, there is a stable matching such that either $x$ is
382: 1-content, or $x$'s favorite is 1-content and $x$ is 2-content.
383: \end{theo}
384: \begin{proof}
385: We can assume that $x=a_1$ whose favorite is $b_1$ whose favorite
386: is $c_1$.
387: 
388: Suppose there is a 111-triple $abc$. Then pick that triple to the
389: matching. Since $a$, $b$ and $c$ all are 1-content we can choose
390: the other two triples however we like --- the resulting matching
391: will be stable anyway. If $b_1=b$ he is 1-content and we choose
392: the remaining two triples so that $a_1$ gets her first or second
393: choice. If $b_1\neq b$ then $a_1\neq a$ and we let the first
394: triple be $a_1b_1C$ where $C$ is $b_1$'s first or second choice,
395: and the second triple be the three remaining people.
396: 
397: In the following we assume there is no 111-triple, that is,
398: we assume the 112-condition. Say, without loss of generality, that
399: $c_1$'s favorite is $a_2$.
400: \begin{center}
401:   \begin{picture}(130,50)(-4,-4)
402:     \twelvedots
403:     \put(0,40){\line(1,0){80}}
404:     \put(80,40){\line(2,-1){40}}
405:   \end{picture}
406: \end{center}
407: By the 112-condition, $a_2$'s favorite is not $b_1$, so we can
408: assume that it is $b_2$. Now, $b_2$'s favorite is not $c_1$, so we
409: can assume that it is $c_2$.
410: \begin{center}
411:   \begin{picture}(130,50)(-4,-4)
412:     \twelvedots
413:     \put(0,40){\line(1,0){80}}
414:     \put(80,40){\line(2,-1){40}}
415:     \put(0,20){\line(1,0){80}}
416:   \end{picture}
417: \end{center}
418: Now the matching $a_1b_1c_1,a_2b_2c_2,a_3b_3c_3$ is stable: $a_1$,
419: $a_2$, $b_1$ and $b_2$ are 1-content, so a blocking triple must
420: contain both $a_3$ and $b_3$ which already are together.
421: \end{proof}
422: 
423: \subsection{The 4-case}\noindent
424: \begin{theo}
425: In the 4-case there is always a stable matching.
426: \end{theo}
427: \noindent The proof is a technical case study who will last for
428: the rest of this section.
429: 
430: We have the following cases:
431: \begin{description}
432: \item[The 111-case] There is a 111-triple.
433: \item[The 112-case] There is no 111-triple, but there is a 112-triple.
434: \item[The 113-case] There is no 111- or 112-triple, but there is
435:   a 113-triple.
436: \item[The 114-case] There is no 111-, 112- or 113-triple.
437: \end{description}
438: \noindent The 111-case is trivial: remove the 111-triple and find
439: a stable 3-matching of the remainder; then the 111-triple together
440: with the 3-matching is a stable 4-matching since the people in the
441: 111-triple are 1-content.
442: 
443: The 114-case is also simple: If there is a person $x$ who is the
444: favorite of at least two people, then $x$'s favorite must rank
445: some of these people as number 1, 2 or 3, and we get a 111-, 112-,
446: or 113-triple. Thus, in the 114-case we know that no two people
447: have the same favorite. We just let all $a_i$ be 1-content and we
448: get a stable matching.
449: 
450: \subsubsection{The 112-case} We have the following situation.
451: \begin{center}
452:   \begin{picture}(130,70)(-4,-4)
453:     \sixteendots
454:     \put(0,60){\line(1,0){80}}
455:     \put(80,60){\line(2,-1){40}}
456:     \dashline[-7]{3}(80,60)(120,60)
457:   \end{picture}
458: \end{center}
459: By the 112-condition, $a_2$'s favorite is not $b_1$, so we can
460: assume it is $b_2$. Now $b_2$'s favorite is not $c_1$, so we can
461: assume it is $c_2$.
462: \begin{center}
463:   \begin{picture}(130,70)(-4,-4)
464:     \sixteendots
465:     \put(0,60){\line(1,0){80}}
466:     \put(80,60){\line(2,-1){40}}
467:     \dashline[-7]{3}(80,60)(120,60)
468:     \put(0,40){\line(1,0){80}}
469:   \end{picture}
470: \end{center}
471: We remove the triple $a_1b_1c_1$ for a while. By
472: theorem~\ref{thm:3} there is a stable 3-matching of the remaining
473: people such that either $a_2$ is 1-content, or $b_2$ is 1-content
474: and $a_2$ is 2-content. This 3-matching forms a 4-matching
475: together with the triple $a_1b_1c_1$. We will show that this
476: 4-matching is stable.
477: 
478: Suppose there is a blocking triple. It has to contain someone
479: among $a_1$, $b_1$ and $c_1$. Since $a_1$ and $b_1$ are 1-content
480: they do not belong to the blocking triple, so $c_1$ does. The only
481: person $c_1$ wants to switch to is $a_2$, so $a_2$ belongs to the
482: blocking triple. Then $a_2$ cannot have her favorite $b_2$, so, by
483: construction of the 3-matching, $a_2$ has her favorite among $b_3$
484: and $b_4$, and $b_2$ has $c_2$. So $a_2$ wants to switch only to
485: $b_2$ or possibly $b_1$, both of which are 1-content.
486: 
487: \subsubsection{The 113-case} If some person $x$ is the favorite of
488: at least three people, then $x$'s favorite must rank some of these
489: people as number 1 or 2, and we get a 111- or a 112-triple.
490: Therefore, we can split the 113-case into two subcases:
491: \begin{description}
492: \item[Subcase 1] Every person is the favorite of either
493:   zero or two people.
494: \item[Subcase 2] There is a person who is the favorite of exactly
495:   one person, but every person is the favorite of at most two people.
496: \end{description}
497: 
498: \paragraph{\bf Subcase 1} Here we suppose that every person is
499: the favorite of either zero or two people. Then we have the
500: following situation.
501: \begin{center}
502:   \begin{picture}(130,70)(-4,-4)
503:     \sixteendots
504:     \put(0,0){\line(1,0){40}}
505:     \put(0,20){\line(2,-1){40}}
506:     \put(0,40){\line(2,1){40}}
507:     \put(0,60){\line(1,0){80}}
508:   \end{picture}
509: \end{center}
510: By the 113-condition we know that $c_1$ ranks $a_1$ and $a_2$ as
511: number 3 and 4, so $a_3$ and $a_4$ must be number 1 and 2.
512: \begin{center}
513:   \begin{picture}(130,70)(-4,-4)
514:     \sixteendots
515:     \put(0,0){\line(1,0){40}}
516:     \put(0,20){\line(2,-1){40}}
517:     \put(0,40){\line(2,1){40}}
518:     \put(0,60){\line(1,0){80}}
519:     \put(80,60){\line(1,-1){40}}
520:     \dashline[-7]{3}(80,60)(120,0)
521:   \end{picture}
522: \end{center}
523: We see that $b_4$'s favorite is not $c_1$, so we can assume it is
524: $c_4$. Using the 113-condition again, we obtain the following.
525: \begin{center}
526:   \begin{picture}(130,70)(-4,-4)
527:     \sixteendots
528:     \put(0,0){\line(1,0){80}}
529:     \put(0,20){\line(2,-1){40}}
530:     \put(0,40){\line(2,1){40}}
531:     \put(0,60){\line(1,0){80}}
532:     \put(80,60){\line(1,-1){40}}
533:     \put(80,0){\line(1,1){40}}
534:     \dashline[-7]{3}(80,60)(120,0)
535:     \dashline[-7]{3}(80,0)(120,60)
536:   \end{picture}
537: \end{center}
538: Now we use that every favorite person is the favorite of exactly
539: two people.
540: \begin{center}
541:   \begin{picture}(130,70)(-4,-4)
542:     \sixteendots
543:     \put(0,0){\line(1,0){80}}
544:     \put(0,20){\line(2,-1){40}}
545:     \put(0,40){\line(2,1){40}}
546:     \put(0,60){\line(1,0){80}}
547:     \put(80,60){\line(1,-1){40}}
548:     \put(80,0){\line(1,1){40}}
549:     \put(40,40){\line(2,1){40}}
550:     \put(40,20){\line(2,-1){40}}
551:     \put(80,20){\line(1,0){40}}
552:     \put(80,40){\line(1,0){40}}
553:     \dashline[-7]{3}(80,60)(120,0)
554:     \dashline[-7]{3}(80,0)(120,60)
555:   \end{picture}
556: \end{center}
557: $a_2$'s second-best choice cannot be $b_2$ or $b_3$ since that
558: would violate the 113-condition, so it must be $b_2$. By applying
559: the same reasoning to $a_3$, $b_1$ and $b_4$, we obtain the following
560: diagram.
561: \begin{center}
562:   \begin{picture}(130,70)(-4,-4)
563:     \sixteendots
564:     \put(0,0){\line(1,0){80}}
565:     \put(0,20){\line(2,-1){40}}
566:     \put(0,40){\line(2,1){40}}
567:     \put(0,60){\line(1,0){80}}
568:     \put(80,60){\line(1,-1){40}}
569:     \put(80,0){\line(1,1){40}}
570:     \put(40,40){\line(2,1){40}}
571:     \put(40,20){\line(2,-1){40}}
572:     \put(80,20){\line(1,0){40}}
573:     \put(80,40){\line(1,0){40}}
574:     \dashline[-7]{3}(80,60)(120,0)
575:     \dashline[-7]{3}(80,0)(120,60)
576:     \dashline[-7]{3}(0,20)(40,20)
577:     \dashline[-7]{3}(0,40)(40,40)
578:     \dashline[-7]{3}(40,0)(80,40)
579:     \dashline[-7]{3}(40,60)(80,20)
580:   \end{picture}
581: \end{center}
582: Now the matching $a_1b_1c_3,a_2b_2c_1,a_3b_3c_4,a_4b_4c_2$
583: is stable: $a_1$ and $a_4$ are
584: 1-content, so a blocking triple must contain $a_2$ or $a_3$, say
585: $a_2$. But $a_2$ wants to switch only to $b_1$ who wants to switch
586: only to $c_1$ who already has got $a_2$. The same reasoning works
587: for $a_3$.
588: 
589: \vspace{3mm}
590: \paragraph{\bf Subcase 2} Here we suppose that
591: there is a person, say $b_3$, who is the favorite of exactly one
592: person, but every person is the favorite of at most two people.
593: 
594: If every $b_i$ is the favorite of exactly one person, then it is
595: trivial to find a stable matching: Just let all $a_i$ be
596: 1-content. So we assume there is a $b_i$, say $b_1$, who is the
597: favorite of exactly two people. Then we have the following
598: situation:
599: \begin{center}
600:   \begin{picture}(130,70)(-4,-4)
601:     \sixteendots
602:     \put(0,0){\line(1,0){40}}
603:     \put(0,20){\line(1,0){40}}
604:     \put(0,40){\line(2,1){40}}
605:     \put(0,60){\line(1,0){40}}
606:   \end{picture}
607: \end{center}
608: By the 113-condition, $b_1$'s favorite must rank $a_1$ and $a_2$
609: as 3 and 4.
610: \begin{center}
611:   \begin{picture}(130,80)(-4,-4)
612:     \sixteendots
613:     \put(0,0){\line(1,0){40}}
614:     \put(0,20){\line(1,0){40}}
615:     \put(0,40){\line(2,1){40}}
616:     \put(0,60){\line(1,0){120}}
617:     \put(80,60){\line(2,-1){40}}
618:     \put(99,61){\tiny 3}
619:     \put(99,51){\tiny 4}
620:   \end{picture}
621: \end{center}
622: Now, $b_3$ or $b_4$ cannot have $c_1$ as a favorite, since $c_1$
623: ranks $a_3$ and $a_4$ as 1 and 2, and that would violate the
624: 113-condition. Thus we can assume that $b_3$'s favorite is, say,
625: $c_3$.
626: \begin{center}
627:   \begin{picture}(130,80)(-4,-4)
628:     \sixteendots
629:     \put(0,0){\line(1,0){40}}
630:     \put(0,20){\line(1,0){80}}
631:     \put(0,40){\line(2,1){40}}
632:     \put(0,60){\line(1,0){120}}
633:     \put(80,60){\line(2,-1){40}}
634:     \put(99,61){\tiny 3}
635:     \put(99,51){\tiny 4}
636:   \end{picture}
637: \end{center}
638: Suppose $b_4$ does not have $c_3$ as a favorite. Then we can
639: assume that $b_4$'s favorite is $c_4$ (remember that we know it is
640: not $c_1$). But then $a_1b_1c_1,a_2b_2c_2,a_3b_3c_3,a_4b_4c_4$ is
641: a stable matching since all $a_i$ and $b_i$ are 1-content, except
642: $a_2$ and $b_2$ which are already together. Thus we can assume
643: that $b_4$'s favorite is $c_3$.
644: \begin{center}
645:   \begin{picture}(130,80)(-4,-4)
646:     \sixteendots
647:     \put(0,0){\line(1,0){40}}
648:     \put(0,20){\line(1,0){80}}
649:     \put(0,40){\line(2,1){40}}
650:     \put(0,60){\line(1,0){120}}
651:     \put(80,60){\line(2,-1){40}}
652:     \put(40,0){\line(2,1){40}}
653:     \put(99,61){\tiny 3}
654:     \put(99,51){\tiny 4}
655:   \end{picture}
656: \end{center}
657: Again, form the matching
658: $a_1b_1c_1,a_2b_2c_2,a_3b_3c_3,a_4b_4c_4$. What are the possible
659: blocking triples? We observe that $a_2$ is the only $a_i$ which is
660: not 1-content, so a blocking triple must contain $a_2$.
661: Since $b_1$ and $b_3$ are 1-content and $a_2$ already has got $b_2$,
662: it follows that $b_4$ belongs to the blocking triple.
663: We also see that $c_1$ cannot belong to the blocking triple,
664: since $c_1$ already has $a_2$ which it prefers to $a_1$.
665: Thus, the only possible blocking triple
666: is $a_2b_4c_3$. In that case, $a_2$ must prefer $b_4$ to
667: $b_2$. In the same manner (using the matching
668: $a_1b_1c_1,a_2b_2c_2,a_3b_3c_4,a_4b_4c_3$ instead) we deduce that
669: $a_2$ prefers $b_3$ to $b_2$. This means that $a_2$'s second-best
670: choice is either $b_3$ or $b_4$. For symmetry reasons we can
671: assume it is $b_3$.
672: \begin{center}
673:   \begin{picture}(130,80)(-4,-4)
674:     \sixteendots
675:     \put(0,0){\line(1,0){40}}
676:     \put(0,20){\line(1,0){80}}
677:     \put(0,40){\line(2,1){40}}
678:     \put(0,60){\line(1,0){120}}
679:     \put(80,60){\line(2,-1){40}}
680:     \put(40,0){\line(2,1){40}}
681:     \dashline[-7]{3}(0,40)(40,20)
682:     \put(99,61){\tiny 3}
683:     \put(99,51){\tiny 4}
684:   \end{picture}
685: \end{center}
686: By the 113-condition we know that $c_3$'s favorite cannot be
687: $a_2$, $a_3$ or $a_4$, so it must be $a_1$.
688: \begin{center}
689:   \begin{picture}(130,80)(-4,-4)
690:     \sixteendots
691:     \put(0,0){\line(1,0){40}}
692:     \put(0,20){\line(1,0){80}}
693:     \put(0,40){\line(2,1){40}}
694:     \put(0,60){\line(1,0){120}}
695:     \put(80,60){\line(2,-1){40}}
696:     \put(40,0){\line(2,1){40}}
697:     \dashline[-7]{3}(0,40)(40,20)
698:     \put(80,20){\line(1,1){40}}
699:     \put(99,61){\tiny 3}
700:     \put(99,51){\tiny 4}
701:   \end{picture}
702: \end{center}
703: Using the 113-condition again, we see that $a_1$'s second-best
704: choice cannot be $b_3$ or $b_4$, so it must be $b_2$.
705: \begin{center}
706:   \begin{picture}(130,80)(-4,-4)
707:     \sixteendots
708:     \put(0,0){\line(1,0){40}}
709:     \put(0,20){\line(1,0){80}}
710:     \put(0,40){\line(2,1){40}}
711:     \put(0,60){\line(1,0){120}}
712:     \put(80,60){\line(2,-1){40}}
713:     \put(40,0){\line(2,1){40}}
714:     \dashline[-7]{3}(0,40)(40,20)
715:     \dashline[-7]{3}(0,60)(40,40)
716:     \put(99,61){\tiny 3}
717:     \put(99,51){\tiny 4}
718:   \end{picture}
719: \end{center}
720: Now, the matching $a_1b_2c_2,a_2b_1c_1,a_3b_3c_3,a_4b_4c_4$
721: is stable: The only $a_i$ who is
722: not 1-content is $a_1$. She wants to switch only to $b_1$ who is
723: 1-content.
724: 
725: 
726: 
727: \section{Acknowledgment}\noindent
728: Research partially supported by the European Commission's IHRP
729: Programme, grant HPRN-CT-2001-00272, ``Algebraic Combinatorics in
730: Europe.''
731: 
732: \begin{thebibliography}{ABC}
733: 
734: \bibitem{Ga} D.~Gale and L.~Shapley (1962), College admissions and
735: the stability of marriage, \emph{Amer.~Math.~Monthly} {\bf 69},
736: 9--15.
737: 
738: \bibitem{Kn} D.~E.~Knuth (1976), {\em Mariages stables 
739: et leurs relations avec d'autres probl\`emes combinatoires},
740: Les Presses de l'Universit\'e de Montr\'eal;\\English translation:
741: Stable marriage and its relation to other combinatorial problems,
742: {\em CRM Proceedings and Lecture Notes} {\bf 10}, AMS, 1997.
743: 
744: \bibitem{Ng} C.~Ng and D. S. Hirschberg (1991), Three-dimensional stable matching problems,
745: \emph{SIAM J. Discrete Math.} {\bf 4(2)}, 245--252.
746: 
747: \bibitem{quinzii} M.~Quinzii (1984),  Core and competitive equilibria
748: with indivisibilities, {\em Int.~J.~Game Theory} {\bf 13}: 41--60.
749: 
750: \bibitem{Ro} A.~E.~Roth and M.~A.~O.~Sotomayor (1990), \emph{Two-sided
751: matching}, Cambridge University Press.
752: 
753: \bibitem{scarf} H.~Scarf (1967), The core of an $N$ person game,
754: {\em Econometrica} {\bf 35}: 50--69.
755: 
756: \end{thebibliography}
757: 
758: \end{document}
759: 
760: Här betyder större tal högre preferens.
761: 
762: ulist = [[[0, 2, 1, 7], [4, 3, 5, 6]], [[4, 5, 6, 3], [0, 7, 2, 1]],
763:          [[3, 5, 6, 4], [2, 7, 1, 0]], [[6, 5, 4, 7], [0, 1, 2, 3]],
764:          [[4, 2, 1, 5], [6, 0, 3, 7]], [[4, 7, 6, 1], [0, 3, 5, 2]],
765:          [[5, 7, 4, 3], [2, 6, 1, 0]], [[4, 1, 2, 7], [0, 5, 3, 6]],
766:          [[3, 0, 1, 7], [2, 5, 6, 4]], [[7, 5, 4, 1], [0, 3, 6, 2]],
767:          [[3, 0, 2, 4], [1, 5, 6, 7]], [[7, 1, 0, 6], [2, 5, 3, 4]]]
768: # TVÅ stabila matchningar under max(x,y)!
769: 
770: ulist = [[[8, 4, 2, 0, 7], [9, 6, 1, 5, 3]], [[4, 0, 2, 7, 3], [8, 6, 5, 9, 1]], [[6, 0, 7, 4, 1], [9, 2, 5, 8, 3]], [[6, 3, 1, 0, 8], [2, 7, 4, 5, 9]], [[5, 2, 3, 9, 8], [0, 1, 6, 4, 7]], [[9, 5, 0, 1, 6], [8, 3, 4, 2, 7]], [[7, 5, 6, 8, 2], [0, 3, 4, 9, 1]], [[5, 3, 1, 8, 2], [6, 7, 4, 9, 0]], [[5, 8, 6, 0, 4], [2, 9, 3, 7, 1]], [[9, 0, 1, 4, 2], [5, 8, 7, 6, 3]], [[8, 7, 0, 3, 4], [9, 1, 5, 2, 6]], [[1, 7, 8, 0, 4], [9, 3, 2, 6, 5]], [[0, 9, 5, 4, 1], [7, 2, 6, 3, 8]], [[0, 1, 8, 9, 7], [3, 4, 2, 5, 6]], [[4, 5, 2, 9, 8], [1, 6, 0, 3, 7]]]
771: #Enbart TVÅ stabila matchningar under max...
772: