# Bilateral Matching Decision Model and Calculation of High-Speed Railway Train Crew Members
## 2 Problem Description and Modeling
### Construction of the Train Crew Matching Model
#### 2.2.2 Converting One-to-Many Matching Relationship to One-to-One Matching  
The multi-valued mapping \(\mu:A\cup B\to A\cup B\) represents a one-to-many bilateral matching between stewards and chief stewards, where \(A_{i}=\mu\left(B_{j}\right)\) and \(B_{j}=\mu(A_{i})\) both indicate that \(A_{i}\) and \(B_{j}\) are matched in \(\mu\). In this context, \(\mu(A_{i})=A_{i}\) indicates that \(A_{i}\) is unmatched in \(\mu\), and similarly, \(\mu\left(B_{j}\right)=B_{j}\) indicates that \(B_{j}\) is unmatched in \(\mu\). When \(c_{j}=1\), the one-to-many bilateral matching problem simplifies to a one-to-one bilateral matching problem, and \(\vec{\mu}\) represents a one-to-one bilateral matching.  
According to actual work conditions, the number of chief stewards matched by each steward is 1 and the number of stewards matched by each chief steward is \(c_{j}\), given \(\sum_{j=1}^{n}c_{j}=m\). to facilitate analytical modeling [8], the one-to-many bilateral matching problem is transformed into a one-to-one bilateral matching problem.  
For chief steward \(B_{j}\), since the number of matched stewards is \(c_{j}\), \(B_{j}\) can be regarded as having \(q\) virtual subjects with the same preference order \(q\in\{1,2,...c_{j}\}\). The set consisting of virtual chief stewards is denoted as \(\widetilde{B}=\left\{\widetilde{B}_{1}^{1},\cdots,\widetilde{B}_{1}^{c_{1}} \widetilde{B}_{j}^{q},\widetilde{B}_{1n}^{q},\cdots,\widetilde{B}_{n}^{c_{n}} \right\}\), where \(q\in\left\{1,2,\ldots c_{j}\right\}\). The \(\widetilde{B}_{j}^{q}\) represents the virtual chief steward at position \(q\) corresponding to chief steward \(\widetilde{B}_{j}\). The conversion process is shown in Figure 2 below. The complete preference value matrix of the set of chief stewards \(\widetilde{B}\) to the set of stewards is \(\widetilde{S}=\left(s_{ij}^{q}\right)_{m\times m}\), where \(\widetilde{s}_{ij}^{q}\) represents the complete preference vector of the virtual chief steward at position \(q\) corresponding to the chief steward \(\widetilde{B}_{j}\) for the steward \(A_{i}\). Similarly, the complete preference value matrix of the stewards to the set of chief stewards \(\widetilde{B}\) is \(\widetilde{R}^{\prime}=\left(r_{ij}^{q}\right)_{m\times m}\), where \(\widetilde{r}_{ij}^{q}\) represents the complete preference vector of steward \(A_{i}\) for the virtual chief steward at position \(q\) corresponding to the chief steward \(\widetilde{B}_{j}\). Thus, the preference matrices \(\widetilde{S}\) and \(\widetilde{R}\) are obtained.  
Figure 1: One-to-many two-sided matching between chief stewards and stewards.  
\[\widetilde{s}=\left(\vec{s}_{ij}^{t}\right)_{m\times m}=\left(\begin{array}{cccccccc} \vec{s}_{11}^{t}&\cdots&\vec{s}_{11}^{t}&\cdots&\vec{s}_{11}^{t}&\cdots&\vec{s}_ {n1}^{t}&\cdots&\vec{s}_{n1}^{t}\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ \vec{s}_{1i}^{t}&\cdots&\vec{s}_{1i}^{t}&\cdots&\vec{s}_{ii}^{t}&\cdots&\vec{s }_{ii}^{t}&\cdots&\vec{s}_{ii}^{t}\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ \vec{s}_{1m}^{t}&\cdots&\vec{s}_{1m}^{t}&\cdots&\vec{s}_{1m}^{t}&\cdots&\vec {s}_{1m}^{t}\\ \end{array}\right)\widetilde{R}=\left(\vec{r}_{ij}^{t}\right)_{m\times m}= \left(\begin{array}{cccccccc}\vec{r}_{11}^{t}&\cdots&\vec{r}_{11}^{t}&\cdots &\vec{r}_{1 ij}^{t}&\cdots&\vec{r}_{1n}^{t}&\cdots&\vec{r}_{1n}^{t}\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ \vec{r}_{n1}^{t}&\cdots&\vec{r}_{11}^{t}&\cdots&\vec{r}_{1j}^{t}&\cdots&\vec {r}_{1m}^{t}\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ \vec{r}_{m1}^{t}&\cdots&\vec{r}_{m1}^{t}&\cdots&\vec{r}_{mj}^{t}&\cdots&\vec {r}_{1m}^{t}\\ \end{array}\right)\]  
In the transformed one-to-one bilateral matching \(\widetilde{\mu}\), the preference order values of virtual subjects are equivalent to the original problem's preference order values, that is, \(\vec{r}_{ij}^{q}=r_{ij}\), where \(i\in M,j\in N,q\in\{1,2,\ldots,c_{j}\}\); \(\vec{s}_{ij}^{q}=s_{ij}\), where \(i\in M,j\in N\), \(q\in\{1,2,\ldots,c_{j}\}\). The one-to-one matching model for chief stewards and stewards is obtained as Figure 3.