Marriage Matching-based Instant Parking Spot Sharing in Internet of Vehicles
Abstract
The rapid development and integration of automotive manufacturing, sensor, and communication technologies have facilitated the emergence of the Internet of Vehicles (IoV). However, the explosive growing demand for parking spots has become a challenging issue to be addressed in IoV. In this paper, we propose a novel Smart Parking System (SPS) for IoV by applying the matching game approach. Specifically, the proposed SPS consists of three types of entities: drivers, parking spot owners (PSOs), and a certificate authority (CA). Drivers and PSOs send parking requests and parking spot information to the CA, respectively. The CA is responsible for identifying legitimate system users, matching drivers with PSOs, and recording their transaction information. We first design rational utility functions for drivers and PSOs, and then establish preference lists for them based on real-time conditions. With these information, we further develop an improved marriage matching (MM) algorithm to achieve stable matching results for drivers’ requests and parking spot allocation. Simulation results demonstrate that the proposed MM-based SPS not only ensures stable matching results with the objective of distance minimization but also achieves an overall utility close to that of the optimal algorithm.
Index Terms:
Parking spot sharing, Internet of vehicles, marriage matching, matching game, stability.I Introduction
The rapid development and integration of automotive manufacturing, sensor, and communication technologies have empowered the intelligence and interconnection of vehicles, leading to the emergence of Internet of Vehicles (IoV) as a new paradigm for intelligent transportation systems. However, in the context of urban development, the escalating disparity between the growing number of vehicles and the limited expansion of parking infrastructure has become a significant contributor to urban traffic congestion. Therefore, how to effectively manage urban resources to alleviate the scarcity of parking spots has become an imperative challenge that must to be addressed in IoV [1].
The parking space-sharing methodology holds great potential in improving the utilization of urban parking spots and alleviating traffic congestion in IoV. The fundamental idea is that parking spot owners (PSOs) have the opportunity to share their parking spots during idle periods to earn some profits, while drivers can achieve quick parking based on the instructions provided by the available leased parking space information [2]. The establishment of a parking information platform and the design of parking spot allocation and transaction mechanisms are crucial for implementing rational and efficient parking spot sharing. Consequently, they have received growing attention from both industry and academic communities.
By now, there have been some preliminary research works in the design of parking spot sharing systems [3, 4, 5, 6, 7]. Specifically, Griggs et al.[3] designed a time allocation system for parking spots, taking into account customers’ personal preferences during the matching process. Kim et al.[4] proposed a distributed algorithm to minimize parking costs and balance multiple parking demands. Huang et al.[5] applied federated learning and reinforcement learning to parking spot selection, allowing for rapid sharing and prediction of parking spot information. Wu et al.[6] presented an efficient parking spot search system based on mobile crowdsensing, enabling fast and efficient intelligent parking. More recently, Karaliopoulos et al.[7] developed a temporary parking spot leasing transaction scheme on an online parking reservation platform.
Although the aforementioned studies represent significant advancements in the design of shared parking systems, they either fail to consider the stability of the matching outcomes or overlook the heterogeneity of user preferences. However, in practical applications, stability is an important characteristic for evaluating the matching results, as it ensures the absence of cases where both parties have mutual preferences but are not matched. Moreover, addressing the heterogeneous requirements of different users (e.g., time conflict) is crucial for achieving the subdivision of parking resources and facilitating reasonable allocation, so as to improve social welfare.
Inspired by the above observations, in this paper, we aim to develop a novel smart parking system comprised of drivers, parking spot owners (PSOs), and a certificate authority (CA), leveraging matching game theory to facilitate the efficient sharing of available parking spots. We first design personalized utility functions for drivers and PSOs, and then construct preference lists taking into account the heterogeneity of both the customers’ time requirements and the expected prices. Furthermore, we improve upon the traditional marriage matching algorithm to accommodate scenarios with incomplete preference lists, enabling stable matches between drivers and PSOs. The main contributions of this paper are summarized as follows:
-
•
We develop a smart parking system utilizing the principles of matching game theory. This system empowers drivers to accurately and reliably match with parking spots that best suit their specific needs and preferences, while enabling PSOs to profitably rent out their available parking spots through this system.
-
•
We design personalized utility functions for drivers and PSOs, which can accurately characterize their interactions. Based on this, we create tailored preference lists for drivers and PSOs, allowing customers to dynamically adjust their preference vectors to achieve optimal parking spot matches based on their real-time conditions.
-
•
We improve the traditional marriage matching (MM) algorithm and apply it to the driver-parking spot matching scenario. Simulation results show that the proposed MM-based smart parking system not only guarantees the stability of matching results but also achieves overall utility close to the optimal algorithm.
The remainder of this paper is organized as follows. Section II introduces the system overview and problem formulation. We elaborate on the marriage matching-based parking spot sharing algorithm design in Section III. Section IV presents the simulation results, followed by the conclusion in Section V.
II System Overview and Problem Formulation
We consider a smart parking system (SPS) in a vast urban area with multiple drivers and PSOs who can provide available parking spots. PSOs aim to earn profits during their free time by renting out their parking spots, while drivers seek to find available spots for parking their vehicles. In addition, we deploy a CA in the cloud to provide identity authentication and recognition services, as shown in Fig. 1.
II-A System Overview

1) System Initialization: The drivers and PSOs become legitimate entities after registering with CA in the SPS, and the CA initializes the basic information of drivers and PSOs. Let represent the -th driver and is the set of drivers. Let represent the -th parking spot and is the set of parking spots. The locations of driver and parking spot are denoted as and , respectively. The expected parking time vector for driver is denoted as , where each element represents a time interval of hours. For example, when , corresponds to the time interval 00:00-00:30, corresponds to the time interval 00:3001:00, and so on. Each element of takes value or , i.e., when , driver needs parking, and when , there is no parking demand. Similarly, the sharable time of parking spot is denoted as a vector . If , it indicates that the parking spot will not be rented out at this interval, and if , it indicates that the parking spot is available at this interval.
2) Send Parking Request Message: Once accomplishing the system initialization, a driver will send the following message to CA:
(1) |
where represents the maximum price per unit of time that driver is willing to pay for a parking spot in , and represents the minimum reputation requirement that driver has for a parking spot in .
3) Send parking spot sharing message: Each PSO submits the following message to CA:
(2) |
where is the rental fee for a unit time specified by the PSO, and refers to the minimum reputation requirement that parking spot imposes on a driver in .
4) Generate Preference Lists: After both parties submit their information, the CA will generate corresponding preference lists for them according to their heterogeneous preferences.
5) Matching Result Output and Data Update: The SPS applies a matching game approach (shown in the next section) to match the set of drivers with the set of parking spots, generating a matching result. Both parties conduct transactions according to the agreed-upon result. After the transaction is completed, they score each other, and the system updates their reputation values and based on the scores for the next round of matching reference. Specifically, the reputation value is updated by
(3) |
where is a constant that satisfies , is the evaluation score assigned by to in the current transaction, and is the last reputation value of . Similarly, the reputation value for a parking spot is updated by
(4) |
where is a constant parameter, is the evaluation score assigned by to in the current transaction, and is the last reputation value of .
II-B Problem Formulation
We consider that in IoV, drivers are more inclined to look for parking spots that are closer. Likewise, PSOs are also more inclined to rent out vacant parking spots to drivers who are closer in proximity (this helps to reduce the idle time of parking spots). We use to denote the path length between the coordinate points of and , i.e., , where the function calculates the distance between two coordinates. Therefore, the matching problem between drivers and PSOs in our smart parking system can be formulated as the following optimization problem:
(5) |
III Marriage Matching-based Algorithm Design
In this section, we first introduce the main concept of matching game theory. Then, we define the preference functions for drivers and PSOs and explain the details of creating preference lists for both entities in practice. Furthermore, we propose a stable driver-PSO matching scheme based on the improved marriage matching approach.
III-A Matching Game Concept
Definition 1: The outcome of the driver-PSO scheduling is a matching relation , which is a function such that satisfies the following conditions:
-
•
such that , , and for and .
-
•
such that and for and .
-
•
for and .
Definition 2: Let denote a matching result in SPS, which is a subset of . We say that is assigned to or is assigned to if the pair . Let , a pair blocks , or is a blocking pair for , if the following conditions are satisfied:
-
•
is unassigned or prefers to .
-
•
is unassigned or prefers to .
Definition 3: The matching relation is considered stable if (1) there are no blocking pairs, and (2) except for a few unmatched drivers, the majority of drivers in set are assigned to parking spaces in set .
III-B Preference Functions of Drivers and PSOs
In the smart parking system, we consider that drivers in need of parking have a preference for the nearest available parking spot, which allows them to minimize both the time and fuel costs associated with finding a suitable parking spot. Therefore, for each driver , there is a strict transitive preference relation on the set of regarding parking spots. The preference relation means that driver prefers parking spot over parking spot . Based on the above definition, we can define the driver’s preference function as follows:
(6) |
where
(7) |
The preference list for each parking spots is also based on distance because the shorter the distance, the faster the parking spot can execute transactions, reducing idle time and increasing profits. Similarly, the preference function for parking spots can be expressed as follows:
(8) |
where
(9) |
III-C Preference List Generation
We summarized in Algorithm 1 how to create a preference list for each driver based on the real-time system conditions. The algorithm takes all registered parking spots in the city as input and outputs a preference list for each driver . Algorithm 1 first iterates through each parking spot (line 1) and then checks whether the parking spot and driver satisfy the constraints in the optimization problem (5) (line 3). Parking spaces that meet the constraints are added to the list . Finally, the list is sorted in ascending order according to expression (7) (line 8).
Similarly, we can generate a preference list for each PSO, as summarized in Algorithm 2.
III-D Improved Marriage Matching Algorithm
Note that from the process of constructing the preference list, it can be observed that the generated preference list is incomplete. In other words, for different drivers, the set of parking spots that can be matched may vary, and vice versa. To address this issue, we will design a solution based on the Gale-Shapley stable marriage matching algorithm [8], which can accommodate incomplete preference lists.
We consider the driver as the party initiating the request and prioritize the driver’s interest. Therefore, we iterate through the set of drivers and send matching requests to parking spots in order of decreasing preference within each driver’s preference list.
In Fig 2, we observe that without loss of generality, is chosen as the first driver. According to ’s preference list, a request is made for the second parking spot . Since has not been matched yet, a temporary pairing is made between and . Next, when driver is selected, he sends a request to the parking lot set based on his preference list. Similar to the request made by , is temporarily paired with the first parking spot . When is selected, it is found that the first parking spot in ’s preference list has already been assigned to . However, in ’s preference list, has a higher priority than . According to Definition 2, forms a blocking pair. Therefore, to eliminate the blocking pair, is unpaired from (and will continue requesting the next parking spot in the next round), while is temporarily paired with . Similarly, in ’s turn, it is found that and have already been paired. Upon checking ’s preference list, it is discovered that has a higher priority than , and thus ’s request fails, and he continues to request a parking spot in the next round. If a driver’s preference list has been fully traversed and no parking spot has been found for a pairing, it is considered a failure. Algorithm 3 provides specific implementation details. The variables and represent the number of drivers and the number of parking spots in the same area, respectively.
After several rounds of matching, we will get the final matching result for the specific example above , and fails to match.
Proposition 1
For algorithm 3, the proposed method based on a stable marriage matching algorithm can converge and obtain stable matching results. Besides, as for the performance, the running time of the implementation can achieve , where denotes all the possible matching pairs.
IV Simulation Results
In this section, we evaluated the efficiency of our proposed matching algorithm. We compared its performance with that of greedy matching and random matching and also compared our proposed matching method with the theoretically optimal algorithm.
Random matching means that for a selected driver, a parking spot is randomly selected from his preference list for matching. If the parking spot is unmatched, the driver is matched with it; if the parking spot is matched and is greater than the maximum random count then the driver fails the match and continues to select the next driver, otherwise, the parking spot is re-randomized and matched again. Since preference lists vary in length and the matching result depends on the order of the selected drivers, to have as many pairs of matches as possible, we first sort the list of drivers in ascending order of preference lists and allow the maximum number of randoms for the same driver to equal its list length.
Greedy matching algorithm is based on the random matching algorithm sorting, front to back to select the driver, for this driver and then priority from the preference list of the first to take out the parking lot, if the parking lot has not yet matched, the driver and parking spot to match, if the parking spot has been matched, the driver give up this parking spot, continue to query the second parking spot in the preference list, cycle and repeat, if the final still can not find a parking spot, then the driver match failed.
To achieve the theoretical maximum utility, we use the Hungarian algorithm[11], which aims to find the sum of the weights on the edges that maximize while making as many points match as possible in a bipartite graph with weighted edges. In this article, we need to process distances. We subtract the actual distance from the distance upper bound and then perform the optimal bipartite matching on the result, and the resulting matching is the one that minimizes the total distance.
We randomly generate the distance between parking spots and drivers between km, and the edges between drivers and parking spots are randomly generated based on the percentage of their relationship , where is the number of actual relationships in a match and the maximum theoretical number of relationships is equal to . The edge weight is the distance between the driver and the parking spot. Based on this, we generate preference lists for both drivers and parking spots.

First, we discuss the impact of increasing the data scale on the total distance under the condition of an equal number of drivers and parking spots. Here we set the , and the results are shown in Fig. 3. We enumerate cases where the number of drivers or parking spots increased from 50 to 500. As the data size increased, the random algorithm’s total distance grew much faster than that of the greedy algorithm, MM algorithm, and KM algorithm. The next fastest growth rate was the greedy algorithm. Our algorithm’s final total distance was second only to the optimal algorithm.

In Fig. 4, we set the number of drivers and parking spots to be 250 each and obtained trend lines for the number of blocking pairs as the increases from 5% to 100% using four different algorithms.
In MM algorithm, it can be seen that the number of blocking pairs is always zero, while in the KM algorithm, there are blocking pairs between 100 and 150. It can be seen that the optimal matching algorithm for bipartite graphs is not stable. However, satisfying the matching between drivers and parking spots is an important means to improve social well-being. Therefore, the MM algorithm makes certain sacrifices in achieving matching stability to minimize distance.

During the simulation process, we found that the matching algorithm in this paper is less sensitive to the . Therefore, by designing experiment Figure 5, we discuss the trend of the total distance of four matching algorithms as the increases from 5% to 100% when the number of drivers is 250, the ratio of drivers to parking spots remains at , and the distance between drivers and parking spots is initialized between [0,100] km.
From the Fig. 5, it can be seen that the algorithm in this paper and the greedy algorithm are both very close to the optimal algorithm in terms of matching results. The random matching algorithm performs the worst, with a total distance much larger than the other algorithms. By observing the distance curve of the algorithm in this paper, it can be found that when the is higher than 20%, the total distance of the matching result tends to be horizontal but decreases slowly. This is because when there are more contacts, there are more matching objects for both drivers and parking spots with shorter distances. However, for the part below 20%, the total distance will increase but still be smaller than that of the random algorithm. Therefore, even when there are relatively few available parking spots (low relationship percentage), this algorithm can still achieve a relatively low overall total distance.
Algorithm | Data Scale | ||||
100 | 200 | 300 | 400 | 500 | |
random | 0.0012 | 0.0026 | 0.0037 | 0.0053 | 0.0070 |
greedy | 0.0016 | 0.0040 | 0.0050 | 0.0072 | 0.0094 |
MM | 0.0061 | 0.0209 | 0.0460 | 0.0908 | 0.1643 |
KM | 1.0984 | 1.6678 | 11.2773 | 16.5195 | 44.1794 |
The unit of time is second. |
In TABLE I, we simulated the running time of four algorithms. We set the number of drivers from 100 to 500, with the same number of parking spots as drivers and set to 20%. The data in Table 1 was obtained accordingly. It is worth noting that when the number of drivers reaches 500 (the total number of parking spots and drivers is 1000), the MM algorithm matching time reaches about 0.2s. However, the KM algorithm, which can achieve the shortest distance, requires approximately 44.2s to complete the matching. In a system that requires real-time matching, the system’s response time directly affects user experience. Although the KM algorithm can obtain the optimal matching result, it spends a lot of time, which is not worthwhile.
V Conclusion
In this paper, we design SPS to provide an idea for the rational allocation of shared parking spot resources. First, we analyzed the urgent demand for resource sharing in the current social environment and proposed a smart parking system model, then designed the utility functions of drivers and parking spots according to the actual situation. And then optimized our driver parking spot matching algorithm based on the original marriage matching algorithm. Finally, the performance of the modified algorithm is verified by experimental simulation.
References
- [1] M. Zhu, X.-Y. Liu, F. Tang, M. Qiu, R. Shen, W. Shu, and M.-Y. Wu, “Public vehicles for future urban transportation,” IEEE Trans. Intell. Transp. Syst., vol. 17, no. 12, pp. 3344–3353, 2016.
- [2] L. Sun, S. Sun, and X. Yu, “Paa: A blockchain-based parking assistance alliance with user preference,” IEEE Trans. Intell. Transp. Syst., 2022.
- [3] W. Griggs, J. Y. Yu, F. Wirth, F. Häusler, and R. Shorten, “On the design of campus parking systems with qos guarantees,” IEEE Trans. Intell. Transp. Syst., vol. 17, no. 5, pp. 1428–1437, 2015.
- [4] O. T. T. Kim, N. H. Tran, C. Pham, T. LeAnh, M. T. Thai, and C. S. Hong, “Parking assignment: Minimizing parking expenses and balancing parking demand among multiple parking lots,” IEEE Trans. Autom. Sci. Eng., vol. 17, no. 3, pp. 1320–1331, 2019.
- [5] X. Huang, P. Li, R. Yu, Y. Wu, K. Xie, and S. Xie, “Fedparking: A federated learning based parking space estimation with parked vehicle assisted edge computing,” IEEE Trans. Veh. Technol., vol. 70, no. 9, pp. 9355–9368, 2021.
- [6] D. Wu, Z. Zeng, F. Shi, W. Yu, T. Wu, and Q. Liu, “Human as a service: Towards resilient parking search system with sensorless sensing,” IEEE Trans. Intell. Transp. Syst., vol. 23, no. 8, pp. 13 863–13 877, 2022.
- [7] M. Karaliopoulos, O. Mastakas, and W. K. Chai, “Matching supply and demand in online parking reservation platforms,” IEEE Trans. Intell. Transp. Syst., vol. 24, no. 3, pp. 3182–3193, 2023.
- [8] D. Gale and L. S. Shapley, “College admissions and the stability of marriage,” Amer. Math. Monthly, vol. 120, no. 5, pp. 386–391, 2013.
- [9] I. P. Gent and P. Prosser, “An empirical study of the stable marriage problem with ties and incomplete lists,” in Proc. 15th Eur. Conf. Artif. Intell., 2002, pp. 141–145.
- [10] K. Iwama and S. Miyazaki, “A survey of the stable marriage problem and its variants,” in Proc. Int. Conf. Informat. Educ. Res. Knowl. Circulating Soc. (ICKS), 2008, pp. 131–136.
- [11] H. W. Kuhn, “The hungarian method for the assignment problem,” Nav. Res. Logistics Quart., vol. 2, no. 1-2, pp. 83–97, 1955.