מצגת של PowerPoint - אוניברסיטת בן

‫הפקולטה למדעי ההנדסה‬
‫גוריון בנגב‬-‫אוניברסיטת בן‬
Faculty of Engineering Sciences
Ben-Gurion University of the Negev
Lower bound for the Stable
Marriage Problem
Nir Amira
Dr. Zvi Lotker
The Stable Marriage problem
Stable
Marriage
Introduction
Introduction
Gale
Shapley
Algorithm
Distributed
Approach
Switch
Model
Our
Algorithm
Future
work
2
◘ A Matching criteria
◘ N Man, N women, each with their own
preference list.
◘ A Matching is called Stable if no unstable pairs
exist in it
blocking pair is a pair not matched together, that
ranked each other higher then their current mate
◘ Basic Model: Complete bipartite directed
graph, each edge hold preference.
Lets see an example…
Ben-Gurion University - Department of communication systems engineering - Nir Amira
The Stable Marriage problem
Stable
Marriage
‫אני מעדיפה את גדי‬
‫פני בעלי אבי‬-‫על‬
Introduction
Introduction
:‫העדפות‬
Gale
Shapley
Algorithm
Distributed
Approach
Switch
Model
Our
Algorithm
Future
work
3
:‫העדפות‬
Second
try:
First try:
‫ ת‬,‫ ש‬,‫ר‬
‫אבי‬
‫רותי‬
‫ א‬,‫ ג‬,‫ב‬
‫ ר‬,‫ ת‬,‫ש‬
‫בני‬
‫שרה‬
‫ ג‬,‫ ב‬,‫א‬
‫ ש‬,‫ ת‬,‫ר‬
‫גדי‬
‫תמר‬
‫ ב‬,‫ ג‬,‫א‬
Stable Matching
Matching
Unstable
‫אני מעדיף את‬
‫פני אשתי‬-‫רותי על‬
‫תמר‬
‫אני מעדיפה את‬
‫אבי כבעלי אבל‬
‫הוא לא רוצה‬
‫אותי‬
Ben-Gurion University - Department of communication systems engineering - Nir Amira
The Gale-Shapley Algorithm
Stable
Marriage
Introduction
Gale
Gale
Shapley
Shapley
Algorithm
Algorithm
Distributed
Approach
3.
Rejected
men
propose
their
next
choice
1.
man
propose
to tohis
favorite
woman
2.
4.
woman
chooses
now
chooses
her
favorite
her
new
tochoice
favorite
be engaged
to betoengaged
from
5.
Return
tomen
step
3 until
no
man
isnext
rejected
3. Each
Rejected
propose
to
their
4. to
Each
now chooses
her new
favorite
be
from
among
fromwoman
those
the group
who
of
have
theproposed
new
proposers+
to her,toand
herengaged
rejects
fiancé,toall
and
the
the group
of the new proposers+ her fiancé, and reject the rest
rest
reject
the rest
We gat Man optimal Stable Marriage
:‫העדפות‬
:‫העדפות‬
‫ ת‬,‫ ש‬,‫ר‬
‫אבי‬
‫רותי‬
‫ א‬,‫ ג‬,‫ב‬
‫ ר‬,‫ ת‬,‫ש‬
‫בני‬
‫שרה‬
‫ ג‬,‫ ב‬,‫א‬
‫ ש‬,‫ ת‬,‫ר‬
‫גדי‬
‫תמר‬
‫ ב‬,‫ ג‬,‫א‬
Switch
Model
Our
Algorithm
Future
work
4
Ben-Gurion University - Department of communication systems engineering - Nir Amira
Distributed Approach
Stable
Marriage
Introduction
Gale
Shapley
Algorithm
◘ Each man or woman is an independent unit
◘ Parallelism is the word !
◘ The Gale-Shapley Algorithm is distributed
compatible
Distributed
Distributed
Approach
Approach
Switch
Model
Our
Algorithm
Worst case time complexity of:
O(n)
Future
work
5
Ben-Gurion University - Department of communication systems engineering - Nir Amira
Switch motivation
Stable
Marriage
Introduction
Gale
Shapley
Algorithm
◘ OQ is an optimal Throughput model
◘ but non realistic – needs speedup N
◘ Using Stable matching it is proved that CIOQ
with speedup 2 is operating like an OQ
Distributed
Approach
Switch
Switch
Model
Model
Our
Algorithm
Future
work
6
Output
Queuing
buf
buf
buf
buf
buf
buf
Combined
Input
Output
Queuing
buf
buf
buf
100% Throughput
Ben-Gurion University - Department of communication systems engineering - Nir Amira
The switch model
Stable
Marriage
Introduction
Gale
Shapley
Algorithm
Distributed
Approach
◘ Model of VOQ switch
Each IN has buffers to each OUT port
Men = IN Ports , women = Out Ports.
One sided preferences - undirected edges
Can be easily described as a matrix
OUT
Switch
Switch
Model
Model
Our
Algorithm
Future
work
7
◘ Simple centralized algorithm:
IN
30
25
71
19
3
33
11
8
60
45
53
24
15
7
28
44
38
68
14
5
6
12
49
57
21
Match Max[Matrix]
 Delete irrelevant
Time complexity: O(n)
Ben-Gurion University - Department of communication systems engineering - Nir Amira
Our Algorithm
Stable
Marriage
Introduction
Gale
Shapley
Algorithm
◘ Works when:
Buffer
All preferences of the IN on OUT
are
means
71
71
30 monotone,
19
25
all prefer OUT-1 most and OUT-n
least
60
33
8
11
Each node can send different 53
messages
on each
24
7
15 edge
15
60
Distributed
Approach
Switch
Model
Our
Our
Algorithm
Algorithm
Future
work
8
Buffer
44
44
38
14
Let’s see it in Action: Phase II
I
Step 0 – Init:
Step√n+2:
√n+1:
Step
wegeneral:
set √n leaders
from&√n+i+1
the
OUT
In
Steps
√n+i
Step
k
(from
1
to
√n)::
Leader-1IN
calculate
√n and
Matched
tell theirfirst
match
th pref.
Time
Complexity:
Leader-i
calculate
next
√n
All
IN
send
their
k
matches
and
send
them
totoallR1,
IN
all leaders that they are matched
Step
matches
andtosend
them topref.
all IN,
√n+k1:pref.
R2, i*√n+k
to
st pref. to R1,
3√n
= O(√n)
All
IN
their
1all
and
thesend
INon.
notify
leaders and
Ri and
so
√n+1
pref. to R2 and so on.
their match
R2
R1
71
30
25
19
60
33
11
8
53
24
15
7
60
44
38
14
Ben-Gurion University - Department of communication systems engineering - Nir Amira
Future work
Stable
Marriage
Introduction
Gale
Shapley
Algorithm
◘ Find the Lower bound of the problem
◘ Incomplete preferences lists with ties
◘ Compare Stable matching with normal
switch scheduling (iSLIP)
Distributed
Approach
Switch
Model
Our
Algorithm
Future
Future
work
work
9
Ben-Gurion University - Department of communication systems engineering - Nir Amira
Questions ?