• No results found

Research on Stable Marriage Pairing Based on Graph Theory

N/A
N/A
Protected

Academic year: 2020

Share "Research on Stable Marriage Pairing Based on Graph Theory"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

2019 International Conference on Computation and Information Sciences (ICCIS 2019) ISBN: 978-1-60595-644-2

Research on Stable Marriage Pairing

Based on Graph Theory

Zefen Sun, Yajun Du, Chunjia Wang and Cheng Gong

ABSTRACT

This paper uses the bipartite graph correlation theory in graph to study the algorithm of stable marriage matching problem, and systematically analyzes the application scenario of stable marriage matching problem and the algorithm's advantages and disadvantages. Based on the implementation of the Gale Shapley algorithm, this paper designs a deep traversal-first algorithm based on the backtracking method to find all stable pairing solutions. The backtracking method can find all the solutions of the matching problem, but the time

complexity is O (nn); the Gale Shapley algorithm can find a stable solution to the

matching problem, and the time complexity is O (n2). In this paper, two

algorithms for solving this problem are systematically analyzed and the effectiveness of the algorithm is verified by experiments. The experimental analysis of the Gale Shapley algorithm is a better solution to this problem. Experiments show that the active party can get the most satisfactory object that can be obtained by itself. We find that the stable marriage matching algorithm can also be used to solve the matching problems in the fields of personnel management and educational management.

1. INTRODUCTION

When studying large-scale complex network systems, there will be a

Zefen Sun, School of computer and software engineering, Xihua University, Chengdu 610039, Sichuan, China

Yajun Du*, School of computer and software engineering, Xihua University, Chengdu 610039, Sichuan, China, E-mail: dyjdoc2003@aliyun.com

Chunjia Wang, School of computer and software engineering, Xihua University, Chengdu 610039, Sichuan, China

(2)

network system in which information networks and logistics networks are interwoven. The emergence of such network systems not only improves the efficiency of the system, but also improves the way of production, operation, and consumption, but also brings operational complexity. Usually dealing with such problems is solved by the bipartite graph.

The problem of stable marriage matching is a classic problem of the bipartite graph, first proposed by mathematical economists David Gale and Lloyd Shapley in 1962[11]. The stable marriage problem is [1]: Set B and Set G are a collection of n unmarried men and a collection of n unmarried women, respectively. Each man scores according to his or her preference for the woman, and each of the same women scores the degree of love of the man. They are composed of n couples. If there are two people who are not couples, but they love each other more than their spouses, then such n couples are called unstable marriages. On the contrary, it is called a stable marriage. The study of stable pairing has a significant contribution to solving the matching problem of this type of bipartite graph [2, 8]. In fact, the issue of stable marriage is an NP problem. At present, the solution to this problem is delayed recognition algorithm [4], backtracking method [5] and callback method [6, 7]. Based on the implementation of the Gale-Shapley algorithm, this paper designs a deep traversal-first algorithm based on the backtracking method to find all stable pairing solutions, and provides a solution for some application fields as much as possible.

The remainder of this paper is organized as follows: Section 2 introduces the Gale-Shapley algorithm for stable pairing problems; Section 3 introduces the backtracking method for all stable solutions; In Section 4, experiments are performed on the algorithm, and the experimental results are analyzed to give conclusions; Section 5 summarizes and looks into the future research directions.

2. GALE-SHAPLEY ALGORITHM

(3)
[image:3.596.171.407.94.282.2]

Figure 1. Gale Shapley algorithm.

The Gale-Shapley algorithms have many advantages, and anti-fraud is also strong, but it cannot be avoided. When the matching result is not unique, the woman may adjust her wish list to make herself better pairing than the current one, but this is another type of pairing, that is to say, under this algorithm, your optimal strategy is to submit users according to your own true level of preference. If you submit a false preference order, it may also make you lose the chance to pair with someone you prefer.

The algorithm always obtains a stable pairing that is optimal for the

unilateral. However, the time complexity of the algorithm is O (n2) if it is only

necessary to determine if a system pair has a unique solution. The algorithm is used to find the optimal solution of the A side and the B side. If the two solutions are the same, then the system pairing has a unique solution. Otherwise, there are multiple solutions.

3. BACKTRACKING METHOD FOR SOLVING STABLE MARRIAGE PROBLEM

The process of backtracking [3] to solve the problem of stable marriage matching is as follows: the first man and his first choice form an ordered pair (i.e., paired into a couple) as part of the problem, and then let A man and his first choice form an ordered pair. If the choice is unmarried and the orderly pair does not cause instability in the partial solution, then the ordered pair is added to the partial solution to calculate the next man; otherwise let the man and his follow-up choices form an orderly pair and perform the same test. If his follow-follow-up selection is exhausted, go back to the previous man and let the previous man choose his follow-up choice and recalculate.

(4)
[image:4.596.142.435.139.250.2]

solution to the problem is obtained. The algorithm process can be represented by a stable match search forest in graph theory, as shown in Figure 2.

Figure 2. Stable matching search forest.

Each layer of the tree represents a male number, and the number in the number is a lady's number. Each path from the root of the tree to the leaf node represents a stable matching solution.

For a stable marriage problem of size n, use the backtracking method to solve all possible stable pairs, and you need to try the second pairing. Because there are n choices for every man, and every choice of men does not reduce the choice of their subsequent men (because the lady selected for the last man may

be more suitable for themselves, need to try), there are n Men, that is nn, so the

time complexity is O (nn).

4. EXPERIMENT

The data in this paper is simulated according to the actual situation in real life. Detailed information is provided in TABLE I and TABLE II.

TABLE I. MAN’S PREFERENCE FOR WOMEN (THE SMALLER THE NUMBER, THE MORE LOVE).

--- W1 W2 W3 W4 W5 W6 W7 W8 W9

M1 3 2 1 5 4 6 7 9 8

M2 3 1 2 6 9 7 4 5 8

M3 2 3 1 9 7 8 5 6 4

M4 7 5 4 3 1 2 6 8 9

M5 8 7 9 2 1 3 6 4 5

M6 8 7 4 5 6 3 2 9 1

M7 6 5 4 3 7 1 9 2 8

M8 9 7 6 8 3 4 5 1 2

[image:4.596.99.479.569.682.2]
(5)

A <s1,sA> 1

B 2

C 3

D 4

E 5

F 6

G 7

H 8

I

[image:5.596.102.477.113.228.2]

<s9,sI> 9

TABLE II. WOMEN'S PREFERENCE FOR MEN (THE SMALLER THE NUMBER, THE MORE LOVE).

--- M1 M2 M3 M4 M5 M6 M7 M8 M9

W1 1 2 3 4 5 6 7 8 9

W2 1 3 2 9 8 7 6 5 4

W3 2 1 3 8 4 5 6 7 9

W4 9 7 1 2 3 4 6 5 8

W5 9 8 1 3 4 2 5 7 6

W6 6 5 7 1 2 8 9 3 4

W7 8 7 9 6 1 5 2 4 3

W8 6 4 5 7 8 1 9 2 3

W9 5 4 3 2 6 7 9 8 1

[image:5.596.142.451.366.581.2]

TABLE I represents the degree of the man likes every woman. Each row represents the rank of women that the man’s favorite degree. The smaller the value, the more favorite. TABLE II represents the degree of love of each woman for each man. Every row represents the rank of the woman's favorite degree for each man. The smaller the value, the more favorite. The two tables can construct a bipartite graph, as shown in Figure 3.

Figure 3. Preference bipartite graph.

TABLE III. EXPERIMENTAL RESULTS OF GALE SHAPLEY ALGORITHM AND BACKTRACKING ALGORITHM.

Man

Stable Map Solution

Man

Stable Map Solution

Woman Woman

Solution Solution1 Solution2 Solution3 Solution4

1 3 1 3 3 2 2

2 2 2 2 2 3 3

3 1 3 1 1 1 1

(6)

5 4 5 4 4 4 4

6 9 6 9 5 9 5

7 7 7 7 7 7 7

8 8 8 8 8 8 8

9 6 9 6 9 6 9

Experimental results of Gale

Shapley algorithm Experimental results of backtracking algorithm

TABLE III is the running result of the algorithm in this paper. It is found through experiments that the best time complexity of the Gale-Shapley algorithm is O(n2), that is, each man can match successfully only for the first time and get his favorite lady. The time complexity of the retrospective method for solving the total solution of the marriage matching problem is that each man has n choices, and one choice of n men together constitutes a solution. The backtracking method needs to test the solutions satisfying the conditions in these pairs. The experimental results can only find a stable solution for the analysis of the Gale-Shapley algorithm, and the backtracking method can find all the stable solutions of the problem, so the Gale-Shapley algorithm is more efficient and the application of the backtracking method is more extensive.

5. CONCLUSIONS

The stable marriage matching Gale-Shapley algorithm studied in this paper always gets a result about men's optimality. This algorithm has certain limitations in the application and only obtains one solution of all possible stable pairs. For example, it can't handle the stable matching problem of 2n individuals regardless of gender. Backtracking can find all the solutions to the problem, but the time complexity is relatively higher. Of course, finding more efficient intelligent algorithms is also a new research direction to solve these problems.

ACKNOWLEDGEMENTS

This work is supported by the National Nature Science Foundation (Grant Nos 61472329 and61532009), the grants from Scientific Research Fund of Sichuan Provincial Education Department (No.17ZB0411) and the Innovation Fund of Postgraduate, Xihua University.

REFERENCES

1. Sanderson D J, Peacock D C P, Nixon C W, et al. 2018. “Graph theory and the analysis

of fracture networks,” Journal of Structural Geology.

2. Akahoshi T. 2014. “A necessary and sufficient condition for stable matching rules to be strategy- proof,” Social Choice & Welfare, 43(3):683-702.

3. 2003. “National Information Security Engineering Technology Research Center, National

Information Security Infrastructure Research Center,” Overall Design and Technology

(7)

4. Chen J, Skowron P, Sorge M. 2019. “Matchings under Preferences: Strength of Stability and Trade- offs.”

5. Ma C, Wang Y, Ao J .2019. “Difference backtracking deblurring method for underwater

images,” Multimedia Tools and Applications.

6. Schreiber, Benn L. 1995. “Remote procedure callback system and method,” Davidson Et

Al.

7. Furtado B A. 2019. “Heterogeneity and Instability in the Stable Marriage Problem”. 8. Shi G Y, Kong Y X, Chen B L, et al. 2018. “Instability in Stable Marriage Problem:

Matching Unequally Numbered Men and Women”.

9. Gelain M, Pini M S, Rossi F, et al. 2010. “Local search algorithms on the Stable Marriage

Problem: Experimental Studies,” Cardiovascular & Interventional Radiology,

Figure

Figure 1. Gale Shapley algorithm.
Figure 2. Stable matching search forest.
Figure 3. Preference bipartite graph.

References

Related documents

In this study, the in− fluence of the extract from the radix of Scutellaria baicalensis on the activity of ALT manifested itself as an increase in the activity of this enzyme in

Graphs showing the percentage change in epithelial expression of the pro-apoptotic markers Bad and Bak; the anti-apoptotic marker Bcl-2; the death receptor Fas; the caspase

Aim of the present study was to explore the influence of demographic and disease related factors on parental HRQoL, mediated by employment, income, leisure time, holiday and

Unfortunately, most online auction sites employ a very simple reputation rating scheme that utilizes user feedbacks and comments is- sued after committed auctions.. Such schemes

A number of barriers have been identified which prevent healthcare professionals from recognising or responding to DVA and these include health care professional’s knowledge

According to the results of Tomas Li-Ping Tang’s research (Tomas Li-Ping Tang, 1996, p. Similar results were obtained by Kent T. 522-528) while researching attitude to money

reconciling ancient prophecy with issues crucial to contemporary American Indian politics, Silko attempts to inspire her readers to resist injustice and secure sovereignty

A new equation has to be developed which is applicable for the course grained porous media due to the negative coefficient of the nonlinear binomial Forchheimer equation in