Introduction

Understanding the pattern of human activities has been received growing attention due to it's important practical applications from traffic management to epidemic control1,2,3,4. Several mechanisms with individual activities have been discovered based on statistics of huge amounts of data on human behaviors, such as queueing theory and adaptive interest5,6,7. However, mechanisms behind human activities with interacting individuals are far from well understood because of complex population structures which can be described by complex networks8,9,10. Apart from the statistic characteristics of human dynamics in space and time interval, abundant researches have focused on comprehending human activities in social networks such as making friends where people in the same class with similar feature are more likely to be friends. There are also common phenomena of seeking social partners belonging two classes in bipartite populations11,12, such as mate choosing between men and women, commercial trading between buyers and sellers.

The seeking processes which may be the base of building many social relationships can be described by matching model13. Individuals are generally divided into two classes according to their natural status. Then they observe features of others belonging to the other class and finally decide whether select the individual as a social partner. Although characters of individuals are too complex to be quantitatively described in bidirectional selection systems, personal quality and economic status can be viewed as the main characters of individuals14,15. Zhang and his collaborators solve the bipartite matching problem in the framework of economic markets, finding that partial information and bounded ratio-nality contribute to satisfied and stable matches16,17. Besides characters of individuals, the matching processes is also affected by structure of social networks18,19,20. Since social networks have emerged some common characteristics, such as small-world phenomena, scale-free properties with power-law degree distributions21,22. Questions naturally arise how properties of social networks affect matching processes and what kind of the property improves the matching performance of networks. To answer these questions, a bipartite network is reconstructed from the original networks23,24,25, where only connected nodes satisfying successfully matching conditions and their links are reserved. This allows us to investigate the bidirectional matching processes with mathematical analysis and computer simulation.

In this paper, we researched the matching problem of two classes in the framework of complex networks. The analytical solution for the rate of successfully matching rate is presented, which is consistent with our simulation results of matching processes on social networks. It is observed that properties of networks greatly impact matching performance of networks and the small-world effect improve rate of successfully matching more than scale-free properties. In addition, the small-world effect on matching performance of networks was quantitatively investigated with different rewiring rate in the small world network.

Results

For the given network, M nodes belong to the class A and N nodes belong to the class B (see Methods). After the characteristic state of each node is determined, for a node in the given network, only the neighbor nodes which can successfully match with the node are valuable to the node. Thus the original network is reconstructed as a bipartite network where only connected nodes satisfying successfully matching conditions and their links are reserved, as shown in top panels of Fig. 1 (a). In this way, we get a new bipartite network with m (mM) nodes belonging to the class A and n (nN) nodes belonging to class B, where any two connected nodes satisfy conditions of successfully matching. In the new bipartite network, ki is the degree of the ith node in class A and kh denotes the degree of the hth node in class B connected to the ith node of class A. In order to get the probability on successfully matching of the ith node, we can firstly calculate the probability on unsuccessfully matching of the ith node. Because the degree of the hth node in class B is kh, the probability that the hth node can successfully match with the ith node is 1/kh. Therefore, the probability that the hth node can unsuccessfully match with the ith node is 1 − 1/kh. So the probability that the ith node in class A can not successfully match with all neighbor nodes is

The probability that the ith node in class A can be successfully matched is

If ki denotes the degree of node i in class B, kh presents the degree of hth node in class A connected to the i node of class B and above equations also describe nodes in class B. As shown in Fig. 1 (b), the the probability that node i can not match with its neighbors is 0.0 for node A1 of class A, 0.5 for node B1 of class B and 0.5 for node B2 of class B (The three nodes are shown in the bipartite network of top panels in Fig. 1). If there are m nodes belonging to the class A, the expectation E of the total number of nodes in domain A matched successfully is

where the μ denotes the number of types for nodes' characters. Similarly, the expectation E of the total number of nodes in class B matched successfully is

Because the matching between the two classes is one-to-one, E(m, n, μ)A = E(m, n, μ)B. Therefore, for a given network with M, N and μ, the expectation E about the total number of successfully matching pairs in the model is

According to (5), we can get

Further, we define the average successful matching rate of networks from the equation (6):

where M + N represents the total population of two classes in the network and the range of Λ is from 0 to 1. Therefore, Λ can quantify the matching performance of a network and the large value of Λ reflects high matching performance of the network.

Figure 1
figure 1

Illustration of the matching process.

Upper panel (a) gives a simple example how the bipartite network is reconstructed, where node A1 in set A has two neighbors belonging to set B where B1 and B2 are matched with A1, m = 1 and n = 2. Compared to the original networks, only links of matched nodes are reserved in the reconstructed network. Here, A1 with character of (1,2), B1 with character of (2,1) and B2 with character of (2,1) are reserved. denotes the probability that node i can not match with its neighbors and the value is 0.0 for A1, 0.5 for B1 and 0.5 for B2, as shown in panel (b). Thus the expectation to match successfully for the set A is and the successfully matching expectation of the set B is calculated as .

To investigate the effects of population structures on the matching rates of networks, analytical results are performed from above equations, as shown in top panels of Fig. 2. Without loss of generality, μ is fixed as 2 in the analysis and four types of networks are applied to model different structured population (see Methods). One can find that there exists an optimal value of α (αo ≈ 0.5) to enhance matching performance of networks, revealing that balanced population between class A and B plays an important role in matching performance for the four networks. In addition, the average degree of networks K affects Λ greatly nearby the αo and a larger average degree of networks induces better matching performance of networks.

Figure 2
figure 2

Matching performance of different networks in K − α parameter phase space.

Top and bottom panels show analytical and simulation results of matching performance for different networks respectively. The total population M + N = 1000 and μ = 2. For WS small-world networks, the rewiring rate β is fixed as 0.5.

To confirm analytical results, we performed simulations of matching process on regular networks, small-world networks, random networks and scale-free networks respectively, as shown in the bottom panels of Fig. 2. In simulation, firstly of all, nodes are divided to the class A with probability α (0 ≤ α ≤ 1) and with probability 1 − α belong to class B. Then, the state of each node is randomly assigned a kind of character from Ω following the uniform distribution and μ is also fixed as 2 in the simulation. For example, the characters of node i are labeled as (, ) where is node i's own character and represents the character the node i attempts to select. It is found that our simulation results are consistent with analysis and both results show peaks of the Λ all appearing at around α = 0.5 where the peak of Λ on the scale-free network is the lowest. We therefor focus on the matching performance of different average degree K at α = 0.5. Fig. 3 indicates the rate of successfully matching increases with enhancing of average degree of networks and the Λ value of scale-free network is minimum at the same value of the average degree K compared to other networks. On the other hand, the successfully matching rate Λ of small-world networks is the maximum, reflecting that structures of small-world are more conducive to matching process than structures of scale-free networks.

Figure 3
figure 3

Matching performance of different networks as a function of average degree K.

The total population M + N = 1000 and μ = 2. For WS small-world networks, the rewiring rate β is fixed as 0.5.

Since structures of small-world networks enhance the matching performance of networks greatly, we focused on the matching process on small-world networks with different rewiring probability β, as shown in Fig. 4. It is found that Λ monotonously decreases with increasing of β in the condition of α = 0.1 where individuals in class B are much more than that of class A. When the balanced population between class A and class B is achieved, i.e. the value of α is nearby 0.5, there exists an optimal value of rewiring rate β to induce the highest rate of successfully matching for small-world networks, such as Fig. 4(b) and Fig. 4(c). It indicates that appropriate rewiring links contribute to improve matching performance of small-world networks with balanced population between class A and class B. It is worthy mentioning that intrinsic results do not change for different values of μ, such as μ = 2 and μ = 5.

Figure 4
figure 4

Matching performance as a function of the rewiring rate β for WS small-world networks.

(a) for K = 4 and α = 0.1, (b) for K = 20 and α = 0.25, (c) for K = 50 and α = 0.35. (d) for K = 100 and α = 0.5. The total population M + N = 1000 and μ = 3.

In order to study effects of population size on the rate of successfully matching, we conducted simulation of matching processes on random networks with the average degree of K = 1, K = 2, K = 3 and K = 4 respectively, as shown in Fig. 5. In the case of K = 1 with m = n = 1, the probability of successfully matching between the two connected nodes belonging two classes is about 0.125, which is consistent with the mathematical analysis result. If the two connected nodes match with each other successfully, they must simultaneously satisfy the two conditions. Firstly, the two connected nodes belong to different classes A and B. The second, and , where i and j represent the two connected nodes. The probability of satisfying the first condition is 1/2 and the probability of satisfying the second condition is 1/4, so the probability of successfully matching between the two connected nodes is 1/8. Limited by average degree of networks, the number of total populations in the four case of K = 1, K = 2, K = 3 and K = 4, starts from 2, 3, 4 and 5 respectively. One can find that successfully matching rate Λ decrease with increasing of M + N when the number of total populations is lower than 10, while the value of Λ tends to a stable value for M + N > 10.

Figure 5
figure 5

Matching performance as a function of total population for ER random networks with different average degree.

To avoid repeating links, the total population M + N for average degree K = 1, K = 2, K = 3 and K = 4, starts from 2, 3, 4 and 5 respectively. μ = 2 and α = 0.5.

Discussion

Although our results are obtained from mathematical analysis and computer simulation, there are some human subject experiments which support our conclusions. For example, in experiments on matching behavior20, human subjects are connected on virtual complex networks with the interface of computers, including preferential attachment and small-world networks. Different from our model where all individuals are divided into two classes, participants in their experiments belong to one class to march as a single pair. In particularly, subjects in the human experiments are able to propose to match with a neighbor and accept a proposal from a neighbor, which is similar to matching process of our model. The experimental results show that the matching performance of small-world networks is better than that of preferential attachment networks, which are consistent with our conclusions. In addition, the similar observation is also obtained from the experimental data of the coloring games performed by Kearns et al.18, where preferential attachment networks lead to worse performance than small-worlds networks.

It is worth mentioning that our approach is also suitable for the condition of fully connected networks where the average degree of networks depends on the size of networks. In this case, the matching performance is determined by the size of networks and the larger networks lead to the higher successfully matching rate, which is consistent with the result of real data13. Compared to the previous work13, the current model and analytical solutions can be used to solve the matching problem in complex networks, thus the illustrations of matching processes has been extended in more general situations. In particularly, the matching process on small-world networks with different rewiring probability was studied in details, because the structures of small-world networks obviously enhance the matching performance of networks.

Summarizing, we have studied the bidirectional selection system on complex networks where nodes are occupied by individuals in two classes. The average matching rate is proposed to evaluate the successfully matching performance of networks. It found that high average degree of nodes and balanced population between the two classes contributes to enhance the matching performance of networks and our analysis is consistent with the simulation results. We also observed that the small-world networks perform better than scale-free networks at a given average degree. Our approach to restructure the bipartite network may be also applied to spreading dynamics of information and diseases in bipartite populations26,27,28, where some social partners would be successful in matching but others not. There are also future application of our research in co-volution of matching dynamics and social network structures29,30.

Methods

The matching model in structured population

Our model of the bidirectional selection on complex networks is stated as follows:

  1. i

    For a given network, nodes are occupied by individuals who are divided into class A with M individuals and class B with N individuals. Therefore, the total population in the networks is M + N.

  2. ii

    The ith node in class A (or jth node in class B) has its own character denoted by (or ). Correspondingly, the character the ith node attempts to select is denoted by (or the jth node attempts to select is denoted by ). Therefore, the characteristic state of the ith node (or the jth node) is denoted by (, ) (or (, )) in the bidirectional selection.

  3. iii

    The nodes' characters are labeled as integers. Assume the characters have μ types, i.e. , , , , , . Therefore, the characteristic state of a node can be denoted by (μ, 1), (2, 1), (μ, 2), etc.

  4. iv

    In the network, the conditions of successfully matching for two connected nodes Ai and Bj are and . That is, when node Ai's character meets node Bj's requirement and vice versa, two connected nodes Ai and Bj have a successful matching.

To model the structure of population, regular networks, small-world networks, random network and scale-free networks are conducted as follows:

  1. 1

    Regular networks: Starting from a regular ring lattice with M + N vertices with K edges per vertex, each vertex connected to its K nearest neighbors by undirected links21.

  2. 2

    Small world network: Starting from regular network with degree of K, we randomly choose a vertex and its edge, then rewiring the link to an randomly selected node with probability β, until each edge in the original regular networks has been considered once21.

  3. 3

    Random network: Starting from a regular network with M + N nodes, we connect any two nodes with the probability K/(M + N − 1), where the K is the average degree of network31.

  4. 4

    Scale-free network: First of all, a globally coupled network with K + 1 nodes is built, where K is the average degree of a network22. Then, the network grows with preferential attachment process with the probability that a new node will be connected to the node i is proportional to the degree of the node. The network keep growing until the size of the network is up to M + N.

Simulations

For a given network, in the simulation trial of the model, nodes belong to the class A with probability α and belong to class B with probability 1 − α. The number of nodes in class A and class B are M and N respectively. Therefore, there are M + N nodes in the network. For the characters of each node, the , , , are randomly assigned a kind of character from set Ω with μ types of characters. A bipartite network is reconstructed from the given network, where only the matched nodes and links of matched nodes are reserved. Then a new bipartite network is generated with m (mM) nodes belonging to class A and n (nN) nodes belonging to class B. In the new bipartite network, a node and one of its neighboring nodes are randomly chosen. The two nodes are determined as a pair, meaning the two nodes are matched successfully. Every node can be only chosen one time at most. The matching process is repeated until no pair can be determined any more. In this way, we can calculate how many nodes are matched successfully and get the rate of successfully matching for the whole population.