# Stable Matching of Users in a Ridesharing Model
## 4 Experimental Simulations
### Case Study
To weigh the importance between the cost and time savings in Equation (5), a value \(\alpha=1/2\) is considered. Conversely, drivers generally do not save time traveling through a joint route, so cost savings is the main factor in their matching decisions. Table 3 shows the travel savings estimated for all driver-passenger interactions via the joint route \(R_{pd}\). It is important to note that values of travel savings represent a combination of cost and time, no longer separately considering terms of money or minutes used in this example. \begin{table}
\begin{tabular}{c c c c c} \hline
**Routes** & **Origin** & **Destination** & \(t_{p\to R_{p}}\) & \(c(R_{p})\) \\ \hline \(R_{p_{1}}\) & 20.4767, \(-103.4484\) & 20.7439, \(-103.4285\) & 146 & \(\$28.50\) \\ \(R_{p_{2}}\) & 20.5883, \(-103.4428\) & 20.7439, \(-103.4285\) & 90 & \(\$19.00\) \\ \(R_{p_{3}}\) & 20.6122, \(-103.4283\) & 20.7516, \(-103.5131\) & 62 + 58 = 120 & \(\$28.50\) \\ \hline \end{tabular}
\end{table} 
Table 1: Commuting data for the passenger \(p\in\{p_{1},p_{2},p_{3}\}\) traveling via public transportation. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline
**Routes** & \(\hat{\psi}(R_{pd})\) & \(c(R_{pd})\) & \(z_{p\to R_{pd}}\) & \(z_{d\to R_{pd}}\) & \(t_{d\to R_{pd}}^{0}\) & \(t_{p\to R_{pd}}\) & \(t_{p}(R_{pd})\) & \(t_{d}(R_{pd})\) \\ \hline \(R_{p_{1}d}\) & 22.3 & 568.80 & \(-\$59.00\) & \(\$34.40\) & 9:02 & 57 & 97 & 8 \\ \(R_{p_{2}d}\) & 11.5 & \(\$35.50\) & \(\$1.25\) & \(\$17.75\) & 9:24 & 40 & 36 & \(-14\) \\ \(R_{p_{2}d}\) & 7.2 & \(\$22.50\) & \(\$17.25\) & \(\$11.25\) & \(\$9.27\) & 17 & 28 & \(-17\) \\ \hline \end{tabular}
\end{table} 
Table 2: The total time savings and costs estimated for passengers and driver sharing a trip through the joint route \(R_{pd}\). On the other hand, assume that all users but \(p_{3}\) have a local reputation in the ridesharing system regarding the quality of their previous services (punctuality, cordiality, satisfaction, and safety), as shown in Table 4. Since \(p_{3}\) is a new user, its initial local reputation is zero (see Section 2.2). By Equation (7), a normalized matrix \(M\) is generated as follows:  
\[M=\left[ \begin{array}{cccc}0&1/2&1/2&0\\ 5/7&0&2/7&0\\ 0&1&0&0\\ 1/3&1/3&1/3&0\end{array} \right] \tag{12}\]  
Let \(u\) be any user (passenger or driver) of the ridesharing system. Suppose an initial trust vector \(\vec{m}_{u}=[1/4,1/4,1/4,1/4]^{T}\), representing a uniform probability distribution over all users. A transitive reputation schema is used to estimate the global opinions about each user in the system, which correspond to the left principal eigenvector of \(M\). After a large number \(\beta\) of iterations (where \(\beta\) is the rank of the matrix), the global reputations for all users are the following:  
\[(M^{T})^{\beta}\vec{m}_{u}=\left[ \begin{array}{cccc}0&5/7&0&1/3\\ 1/2&0&1&1/3\\ 1/2&2/7&0&1/3\\ 0&0&0&0\end{array} \right]^{\beta}\times\left[ \begin{array}{c}1/4\\ 1/4\\ 1/4\\ 1/4\\ 1/4\end{array} \right]=\left[ \begin{array}{c}0.3030\\ 0.4242\\ 0.2727\\ 0\end{array} \right] \tag{13}\]  
When \(\beta_{0}=1/2\) and \(\beta_{1}=50\), the utilities for the users sharing a trip via \(R_{pd}\) are shown in Table 5. As observed, driver \(d\) obtains a higher utility when he/she provides a ridesharing service to \(p_{1}\) and \(p_{2}\), rejecting the service to \(p_{3}\).