# An Improved Prim Algorithm for Connection Scheme of Last Train in Urban Mass Transit Network

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

#### 1.1. Related Works on Last Train Connection Scheme

#### 1.2. Novelties and Contributions

- (1)
- This paper transforms the last train connection scheme problem into a graph theory problem and constructs a scheme model aimed at maximizing the last train transfer volume, thus the practical scheme requirements can be solved mathematically.
- (2)
- This paper proposes to use a Prim algorithm to solve the maximum spanning tree and proposes a table operation method in the process of solving.
- (3)
- This paper applies big data. The big historical data of transfer volume in the last train time domain are used as the basis of solving the maximum spanning tree.
- (4)
- From the aspects of model building, algorithm selection, and application of basic data, we believe that we propose a new method about last train connection scheme.

## 2. Characteristics of Last Train Transfer Connection

#### 2.1. Connection Structure of Urban Mass Transit Network

#### 2.1.1. Transfer at Single Station

#### 2.1.2. Transfer at Multiple Stations

#### 2.2. Accessibility Form of Last Train Transfer

#### 2.2.1. Double Connection

#### 2.2.2. Single Connection

#### 2.2.3. No Connection

#### 2.3. Major Considerations in Connection Scheme of Last Train

#### 2.3.1. Scheme Objective of Last Train Connection

#### 2.3.2. Constraints on the Connection Scheme of Last Train

#### 2.3.3. Data Source for Transfer Passenger Flow of Last Train

## 3. Graph Theory Representation and Algorithm for Connection Scheme of Last Train

#### 3.1. Minimum Spanning Tree Problem

#### 3.2. Graph Theory Representation for Connection Scheme of Last Train

#### 3.2.1. Representation of Vertices and Edges

#### 3.2.2. Representation of Weights

#### 3.2.3. Representation of Scheme Objective

#### 3.3. Algorithms for Solving Minimum Spanning Tree Problem

#### 3.3.1. Prim Algorithm

**Step 1.**Initialize $V=\left\{{v}_{0}\right\}$ and take the edges from ${\mathrm{v}}_{0}$ to all other vertices as candidate edges.

**Step 2.**Repeat Step (3) and execute $N$ − 1 times until other $N$ − 1 vertices join $U$.

**Step 3.**Select the edge with the minimum weight from the candidate edges, and ensure that it does not constitute a loop. Define the other vertex of the minimum edge as ${v}_{i}$, and add it to $V$. $V=\left\{{v}_{0},{v}_{i}\right\}$. The edges from each vertex in $V$ to each vertex in $V-U$ are modified as candidate edges.

#### 3.3.2. Kruskal Algorithm

**Step 1.**The set of all vertices in the connected graph is defined as the initial value of V, and the initial value of E is defined as empty.

**Step 2.**All edges in the connected graph are selected in order of weight from small to large. If the selected edge does not make $T$ form a loop, then the edge is added to $T$. Otherwise, it is discarded until the number of edges in $T$ reaches $N-1$.

#### 3.3.3. Comparisons of the Applicability of Algorithms

## 4. Model Construction and Solution

#### 4.1. Conversion of Network into Connected Graph

#### 4.1.1. Cross Transfer at Single Station

#### 4.1.2. Terminal Transfer at Single Station

#### 4.1.3. Transfer at Multiple Stations

#### 4.1.4. Combination into Connected Graphs of Wire Network

#### 4.2. Matrix Representation of Connected Graphs

#### 4.3. Solving Method

#### 4.3.1. Weight Selection of Two-Way Edges

#### 4.3.2. Maximum Spanning Tree Construction Method

**Step 1**

**.**Initialize $U=\left\{{\mathrm{v}}_{11}\right\}$, $T=\{\varnothing \}$.

**Step 2**

**.**Select the maximum weight in Zone II and Zone III, put the corresponding vertex in $U$, the corresponding edge in $T$, and move the rows and the columns corresponding to the weight to Zone I, thus updating the four zones.

**Step 3**

**.**Determine whether $U$ equals $V$; if so, the maximum spanning tree construction is completed, and if not, continue Step 2 until $U=V$.

## 5. Calculation Example

#### 5.1. Statistics of Last Train Transfer Passenger Volume

#### 5.2. Maximum Spanning Tree Solution

#### 5.3. Connection Order of Last Train in the Network

#### 5.4. Calculating the Timetable of the Last Train

#### 5.5. Initial Scheme Optimization and Adjustment

#### 5.5.1. Constraint Test of Last Train Time Domain

#### 5.5.2. Adjustment of Transfer Time Margin for Secondary Connection Relations

## 6. Results and Discussion

#### 6.1. Results

#### 6.2. Discussion

## 7. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Salicrú, M.; Fleurent, C.; Armengol, J.M. Timetable-based operation in urban transport: Run-time optimization and improvements in the operating process. Transp. Res. Part A
**2011**, 8, 721–740. [Google Scholar] [CrossRef] - Belenky, A.S. Operations Research in Transportation Systems; Springer: Berlin, Germany, 1998. [Google Scholar]
- Janani, M.; Muthu, C.; Arun, A.; Gururaj, P.; Thiyagaraj, S. Optimization of transportation system using OR (Operational Research) approaches. Int. J. Sci. Eng. Technol.
**2014**, 3, 651–654. [Google Scholar] - Wirasinghe, S.C. Modeling and optimization of transportation systems. J. Adv. Transp.
**2011**, 45, 231–232. [Google Scholar] [CrossRef] - Wong, R.C.W.; Yuen, T.W.Y.; Fung, K.W.; Leung, J.M.Y. Optimizing timetable synchronization for rail mass transit. Transp. Sci.
**2008**, 42, 57–69. [Google Scholar] [CrossRef] - Yousef, S.; Alireza, K. A practical model for transfer optimization in a transit network: Model equationtions and solutions. Transp. Res. Part A
**2010**, 6, 377–389. [Google Scholar] - Kang, L.J.; Meng, Q. Two-phase decomposition method for the last train departure time choice in subway networks. Transp. Res. Part B Methodol.
**2017**, 104, 568–582. [Google Scholar] [CrossRef] - Ning, L.Q.; Zhao, P.; Xu, W.K.; Qiao, K.; Yao, X.M. Timetable synchronization optimization for urban rail transit in the last trains’ hour. J. Transp. Syst. Eng. Inf. Technol.
**2016**, 16, 108–114. [Google Scholar] - Chen, Y.; Bai, Y.; Feng, X.J.; Li, Z.J. Last train timetable synchronization optimization on urban rail networks with dwell time extension. J. Transp. Syst. Eng.
**2017**, 17, 228–234. [Google Scholar] - Alireza, K.; Yousef, S. Transfer optimization in transit networks: Headway and departure time coordination. In Proceedings of the 14th International IEEE Conference on Intelligent Transportation Systems (ITSC), Washington, DC, USA, 5–7 October 2011; pp. 1531–1536. [Google Scholar]
- Bai, G.Z.; Guo, J.; Shi, H.G.; Yang, Y.; Zhang, T.H. Optimization of convergence based on the coordination of train departure time in the subway transfer station. J. Transp. Syst. Eng. Inf. Technol.
**2013**, 13, 134–139. [Google Scholar] - Kang, L.J.; Wu, J.J.; Sun, H.J.; Zhu, X.N.; Gao, Z.Y. A case study on the coordination of last trains for the Beijing subway network. Transp. Res. Part B
**2014**, 72, 112–127. [Google Scholar] [CrossRef] - Kang, L.J.; Zhu, X.N.; Wu, J.J.; Sun, H.J.; Siriya, S.; Kanokvate, T. Departure time optimization of last trains in subway networks: Mean-Variance model and GSA algorithm. J. Comput. Civ. Eng.
**2015**, 29, 1–12. [Google Scholar] [CrossRef] - Xu, W.K.; Zhao, P.; Ning, L.Q. Last train delay management in urban rail transit network: Bi-objective MIP model and genetic algorithm. KSCE J. Civ. Eng.
**2018**, 22, 1436–1445. [Google Scholar] [CrossRef] - Chen, X.F.; Wang, B.X. Coordination and optimization of connecting trains in a transfer station of urban mass transit. In Proceedings of the 16th COTA International Conference of Transportation Professionals, Shanghai, China, 6–9 July 2016; pp. 901–912. [Google Scholar]
- Zhou, Y.F.; Zhou, L.S.; Yue, Y.X. Synchronized and coordinated train connecting optimization for transfer stations of urban rail networks. J. China Railw. Soc.
**2011**, 3, 9–16. [Google Scholar] - Zhou, W.L.; Deng, L.B.; Xie, M.Q.; Yang, X.; Wang, W.H. Coordination optimization of the first and last trains’ departure time on urban rail transit network. Adv. Mech. Eng.
**2013**, 5, 1–12. [Google Scholar] [CrossRef] - Kou, C.G.; He, S.W.; He, B.S. Study on connection optimization of last train departure time on urban mass transit network. Adv. Mater. Res.
**2014**, 1030, 2211–2214. [Google Scholar] [CrossRef] - Xiang, W.X.; Wang, Y.H. A multi-objective programming model for subway last train timetabling. In Proceedings of the 3rd International Conference on Electrical and Information Technologies for Rail Transportation (EITRT), Changsha, China, 20–22 October 2017; pp. 791–800. [Google Scholar]
- Chung, E.H. Transfer Coordination Model and Real-Time Strategy for Inter-Modal Transit Services; University of Toronto: Toronto, ON, Canada, 2009. [Google Scholar]
- Shang, Y.F.; Zhou, L.S.; Tong, L.; Cai, C.J. The research of first and last trip optimization under the network of urban mass transit. Appl. Mech. Mater.
**2013**, 409–410, 1311–1314. [Google Scholar] [CrossRef] - Bassel, J.Y. Improving Transit Service Connectivity: The Application of Operations Planning and Operations Control Strategies; MIT: Cambridge, MA, USA, 2004. [Google Scholar]
- Liang, Q.S.; Li, X.; Xu, R.H. Optimization of train connection time at urban mass transit transfer station. Urban Mass Transit.
**2015**, 4, 9–13. [Google Scholar] - Cai, C.J.; Zhou, L.S.; Shang, Y.F. Research on the last train connection in the urban mass transit system. Adv. Mater. Res.
**2015**, 1065–1069, 3334–3338. [Google Scholar] [CrossRef] - Kang, L.J.; Zhu, X.N. Strategic timetable scheduling for last trains in urban railway transit networks. Appl. Math. Model.
**2017**, 45, 209–225. [Google Scholar] [CrossRef] - Zhang, M.; Du, S.M. Transfer coordination optimization for network operation of urban rail transit based on hierarchical preference. J. China Railw. Soc.
**2009**, 31, 9–14. [Google Scholar] - Kang, L.J.; Wu, J.J.; Sun, H.J.; Zhu, X.N.; Wang, B. A practical model for last train rescheduling with train delay in urban railway transit networks. Omega
**2015**, 50, 29–42. [Google Scholar] [CrossRef] - Jiang, Z.B.; Li, F.; Xu, R.H. A simulation model for estimating train and passenger delays in large-scale rail transit networks. J. Cent. South Univ.
**2012**, 12, 3603–3613. [Google Scholar] [CrossRef] - Li, Y.P. Study on stability of last train connection under delays on urban rail transit. Appl. Mech. Mater.
**2014**, 641–642, 757–762. [Google Scholar] [CrossRef] - Xu, J.; Zhang, X.; Guo, J.Y.; Du, T.T. Research on passenger guidance system of urban rail transit network based on timetable of last train. China Railw. Sci.
**2014**, 2, 111–119. [Google Scholar] - Guo, J.Y.; Jia, L.M.; Qin, Y.; Wang, B. Trip planning considering last trains running. In Proceedings of the 16th International IEEE Conference on Intelligent Transportation Systems—(ITSC 2013), The Hague, The Netherlands, 6–9 October 2013; pp. 2132–2137. [Google Scholar]
- Guo, J.Y.; Jia, L.M.; Xu, J.; Qin, Y. An algorithm for trip planning with constraint of transfer connection in urban mass transit network. In Proceedings of the 11th International Symposium on Distributed Computing and Applications to Business, Engineering & Science, Guilin, China, 19–22 October 2012; pp. 341–344. [Google Scholar]
- Jaroslav, N. A few remarks on the history of MST-problem. Arch. Math.
**1997**, 33, 15–22. [Google Scholar] - Prim, R.C. Shortest connection networks and some generalizations. Bell Syst. Tech. J.
**1957**, 36, 1389–1401. [Google Scholar] [CrossRef] - Pettie, S.; Ramachandran, V. An optimal minimum spanning tree algorithm. J. ACM ICALP
**2000**, 1853, 49–60. [Google Scholar] - Xu, R.H.; Li, X. Comprehensive optimization for connection scheme of last trains in urban mass transit network. J. Tongji Univ. (Nat. Sci.)
**2012**, 10, 1510–1516. [Google Scholar] - Chung, M.K.; Chang, C.S. Timetable synchronization of mass rapid transit system using multiobjective evolutionary approach. IEEE Trans. Syst. Man Cybern. Part C
**2008**, 5, 636–648. [Google Scholar] [CrossRef]

Origin | Transfer Destination | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

${\mathit{v}}_{11}$ | ${\mathit{v}}_{12}$ | ${\mathit{v}}_{21}$ | ${\mathit{v}}_{22}$ | ${\mathit{v}}_{31}$ | ${\mathit{v}}_{32}$ | ${\mathit{v}}_{51}$ | ${\mathit{v}}_{52}$ | ${\mathit{v}}_{61}$ | ${\mathit{v}}_{62}$ | ${\mathit{v}}_{91}$ | ${\mathit{v}}_{92}$ | |

${\mathit{v}}_{\mathbf{11}}$ | 0 | 0 | ${w}_{11,21}$ | ${w}_{11,22}$ | ${w}_{11,31}$ | ${w}_{11,32}$ | ${w}_{11,51}$ | ${w}_{11,52}$ | ${w}_{11,61}$ | ${w}_{11,62}$ | 0 | 0 |

${\mathit{v}}_{\mathbf{12}}$ | 0 | 0 | ${w}_{12,21}$ | ${w}_{12,22}$ | ${w}_{12,31}$ | ${w}_{12,32}$ | ${w}_{12,51}$ | ${w}_{12,52}$ | ${w}_{12,61}$ | ${w}_{12,62}$ | 0 | 0 |

${\mathit{v}}_{\mathbf{21}}$ | ${w}_{21,11}$ | ${w}_{21,12}$ | 0 | 0 | ${w}_{21,31}$ | ${w}_{21,32}$ | ${w}_{21,51}$ | ${w}_{21,52}$ | ${w}_{21,61}$ | ${w}_{21,62}$ | 0 | ${w}_{21,92}$ |

${\mathit{v}}_{\mathbf{22}}$ | ${w}_{22,11}$ | ${w}_{22,12}$ | 0 | 0 | ${w}_{22,31}$ | ${w}_{22,32}$ | ${w}_{22,51}$ | ${w}_{22,52}$ | ${w}_{22,61}$ | ${w}_{22,62}$ | 0 | ${w}_{22,92}$ |

${\mathit{v}}_{\mathbf{31}}$ | ${w}_{31,11}$ | ${w}_{31,12}$ | ${w}_{31,21}$ | ${w}_{31,22}$ | 0 | 0 | ${w}_{31,51}$ | ${w}_{31,52}$ | ${w}_{31,61}$ | ${w}_{31,62}$ | 0 | ${w}_{31,92}$ |

${\mathit{v}}_{\mathbf{32}}$ | ${w}_{32,11}$ | ${w}_{32,12}$ | ${w}_{32,21}$ | ${w}_{32,22}$ | 0 | 0 | ${w}_{32,51}$ | ${w}_{32,52}$ | ${w}_{32,61}$ | ${w}_{32,62}$ | 0 | ${w}_{32,92}$ |

${\mathit{v}}_{\mathbf{51}}$ | ${w}_{51,11}$ | ${w}_{51,12}$ | ${w}_{51,21}$ | ${w}_{51,22}$ | ${w}_{51,31}$ | ${w}_{51,32}$ | 0 | 0 | ${w}_{51,61}$ | ${w}_{51,62}$ | ${w}_{51,91}$ | ${w}_{51,92}$ |

${\mathit{v}}_{\mathbf{52}}$ | ${w}_{52,11}$ | ${w}_{52,12}$ | ${w}_{52,21}$ | ${w}_{52,22}$ | ${w}_{52,31}$ | ${w}_{52,32}$ | 0 | 0 | ${w}_{52,61}$ | ${w}_{52,62}$ | ${w}_{52,91}$ | ${w}_{52,92}$ |

${\mathit{v}}_{\mathbf{61}}$ | ${w}_{61,11}$ | ${w}_{61,12}$ | ${w}_{61,21}$ | ${w}_{61,22}$ | ${w}_{61,31}$ | ${w}_{61,32}$ | ${w}_{61,51}$ | ${w}_{61,52}$ | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{62}}$ | ${w}_{62,11}$ | ${w}_{62,12}$ | ${w}_{62,21}$ | ${w}_{62,22}$ | ${w}_{62,31}$ | ${w}_{62,32}$ | ${w}_{62,51}$ | ${w}_{62,52}$ | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{91}}$ | 0 | 0 | ${w}_{91,21}$ | ${w}_{91,22}$ | ${w}_{91,31}$ | ${w}_{91,32}$ | ${w}_{91,51}$ | ${w}_{91,52}$ | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{92}}$ | 0 | 0 | 0 | 0 | 0 | 0 | ${w}_{92,51}$ | ${w}_{92,52}$ | 0 | 0 | 0 | 0 |

Set of Origin | Set of Transfer Destination | |
---|---|---|

$\mathit{U}$ | $\mathit{V}-\mathit{U}$ | |

$U$ | ${W}_{U}$(Zone I: Selected Zone) | ${W}_{U,V-U}$(Zone II: Zone to be Selected) |

$V-U$ | ${W}_{V-U,U}$(Zone III: Zone to be Selected) | ${W}_{V-U,V-U}$(Zone IV: Unselected Zone) |

Origin | Transfer Destination | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

${\mathit{v}}_{11}$ | ${\mathit{v}}_{12}$ | ${\mathit{v}}_{21}$ | ${\mathit{v}}_{22}$ | ${\mathit{v}}_{31}$ | ${\mathit{v}}_{32}$ | ${\mathit{v}}_{51}$ | ${\mathit{v}}_{52}$ | ${\mathit{v}}_{61}$ | ${\mathit{v}}_{62}$ | ${\mathit{v}}_{91}$ | ${\mathit{v}}_{92}$ | |

${\mathit{v}}_{\mathbf{11}}$ | 0 | 0 | ${w}_{11,21}$ | ${w}_{11,22}$ | ${w}_{11,31}$ | ${w}_{11,32}$ | ${w}_{11,51}$ | ${w}_{11,52}$ | ${w}_{11,61}$ | ${w}_{11,62}$ | 0 | 0 |

${\mathit{v}}_{\mathbf{12}}$ | 0 | 0 | ${w}_{12,21}$ | ${w}_{12,22}$ | ${w}_{12,31}$ | ${w}_{12,32}$ | ${w}_{12,51}$ | ${w}_{12,52}$ | ${w}_{12,61}$ | ${w}_{12,62}$ | 0 | 0 |

${\mathit{v}}_{\mathbf{21}}$ | ${w}_{21,11}$ | ${w}_{21,12}$ | 0 | 0 | ${w}_{21,31}$ | ${w}_{21,32}$ | ${w}_{21,51}$ | ${w}_{21,52}$ | ${w}_{21,61}$ | ${w}_{21,62}$ | 0 | ${w}_{21,92}$ |

${\mathit{v}}_{\mathbf{22}}$ | ${w}_{22,11}$ | ${w}_{22,12}$ | 0 | 0 | ${w}_{22,31}$ | ${w}_{22,32}$ | ${w}_{22,51}$ | ${w}_{22,52}$ | ${w}_{22,61}$ | ${w}_{22,62}$ | 0 | ${w}_{22,92}$ |

${\mathit{v}}_{\mathbf{31}}$ | ${w}_{31,11}$ | ${w}_{31,12}$ | ${w}_{31,21}$ | ${w}_{31,22}$ | 0 | 0 | ${w}_{31,51}$ | ${w}_{31,52}$ | ${w}_{31,61}$ | ${w}_{31,62}$ | 0 | ${w}_{31,92}$ |

${\mathit{v}}_{\mathbf{32}}$ | ${w}_{32,11}$ | ${w}_{32,12}$ | ${w}_{32,21}$ | ${w}_{32,22}$ | 0 | 0 | ${w}_{32,51}$ | ${w}_{32,52}$ | ${w}_{32,61}$ | ${w}_{32,62}$ | 0 | ${w}_{32,92}$ |

${\mathit{v}}_{\mathbf{51}}$ | ${w}_{51,11}$ | ${w}_{51,12}$ | ${w}_{51,21}$ | ${w}_{51,22}$ | ${w}_{51,31}$ | ${w}_{51,32}$ | 0 | 0 | ${w}_{51,61}$ | ${w}_{51,62}$ | ${w}_{51,91}$ | ${w}_{51,92}$ |

${\mathit{v}}_{\mathbf{52}}$ | ${w}_{52,11}$ | ${w}_{52,12}$ | ${w}_{52,21}$ | ${w}_{52,22}$ | ${w}_{52,31}$ | ${w}_{52,32}$ | 0 | 0 | ${w}_{52,61}$ | ${w}_{52,62}$ | ${w}_{52,91}$ | ${w}_{52,92}$ |

${\mathit{v}}_{\mathbf{61}}$ | ${w}_{61,11}$ | ${w}_{61,12}$ | ${w}_{61,21}$ | ${w}_{61,22}$ | ${w}_{61,31}$ | ${w}_{61,32}$ | ${w}_{61,51}$ | ${w}_{61,52}$ | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{62}}$ | ${w}_{62,11}$ | ${w}_{62,12}$ | ${w}_{62,21}$ | ${w}_{62,22}$ | ${w}_{62,31}$ | ${w}_{62,32}$ | ${w}_{62,51}$ | ${w}_{62,52}$ | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{91}}$ | 0 | 0 | ${w}_{91,21}$ | ${w}_{91,22}$ | ${w}_{91,31}$ | ${w}_{91,32}$ | ${w}_{91,51}$ | ${w}_{91,52}$ | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{92}}$ | 0 | 0 | 0 | 0 | 0 | 0 | ${w}_{92,51}$ | ${w}_{92,52}$ | 0 | 0 | 0 | 0 |

Origin | Transfer Destination | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

${\mathit{v}}_{11}$ | ${\mathit{v}}_{12}$ | ${\mathit{v}}_{21}$ | ${\mathit{v}}_{22}$ | ${\mathit{v}}_{31}$ | ${\mathit{v}}_{32}$ | ${\mathit{v}}_{51}$ | ${\mathit{v}}_{52}$ | ${\mathit{v}}_{61}$ | ${\mathit{v}}_{62}$ | ${\mathit{v}}_{91}$ | ${\mathit{v}}_{92}$ | |

${\mathit{v}}_{\mathbf{11}}$ | 0 | 0 | 198 | 195 | 386 | 341 | 191 | 167 | 131 | 84 | 0 | 0 |

${\mathit{v}}_{\mathbf{12}}$ | 0 | 0 | 115 | 142 | 434 | 364 | 194 | 145 | 82 | 67 | 0 | 0 |

${\mathit{v}}_{\mathbf{21}}$ | 264 | 276 | 0 | 0 | 142 | 119 | 54 | 79 | 134 | 41 | 0 | 174 |

${\mathit{v}}_{\mathbf{22}}$ | 151 | 297 | 0 | 0 | 349 | 179 | 146 | 88 | 53 | 74 | 0 | 193 |

${\mathit{v}}_{\mathbf{31}}$ | 274 | 219 | 214 | 149 | 0 | 0 | 33 | 12 | 117 | 69 | 0 | 137 |

${\mathit{v}}_{\mathbf{32}}$ | 271 | 246 | 298 | 254 | 0 | 0 | 47 | 29 | 111 | 87 | 0 | 77 |

${\mathit{v}}_{\mathbf{51}}$ | 107 | 120 | 56 | 84 | 44 | 20 | 0 | 0 | 65 | 32 | 45 | 96 |

${\mathit{v}}_{\mathbf{52}}$ | 121 | 75 | 61 | 91 | 50 | 24 | 0 | 0 | 82 | 67 | 64 | 102 |

${\mathit{v}}_{\mathbf{61}}$ | 101 | 83 | 58 | 41 | 49 | 67 | 48 | 69 | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{62}}$ | 67 | 47 | 31 | 39 | 46 | 95 | 25 | 68 | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{91}}$ | 0 | 0 | 177 | 132 | 115 | 199 | 93 | 32 | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{92}}$ | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 39 | 0 | 0 | 0 | 0 |

Origin | Transfer Destination | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

${\mathit{v}}_{11}$ | ${\mathit{v}}_{12}$ | ${\mathit{v}}_{21}$ | ${\mathit{v}}_{22}$ | ${\mathit{v}}_{31}$ | ${\mathit{v}}_{32}$ | ${\mathit{v}}_{51}$ | ${\mathit{v}}_{52}$ | ${\mathit{v}}_{61}$ | ${\mathit{v}}_{62}$ | ${\mathit{v}}_{91}$ | ${\mathit{v}}_{92}$ | |

${\mathit{v}}_{\mathbf{11}}$ | 0 | 0 | 0 | 195 | 386 | 341 | 191 | 167 | 131 | 84 | 0 | 0 |

${\mathit{v}}_{\mathbf{12}}$ | 0 | 0 | 0 | 0 | 434 | 364 | 194 | 145 | 0 | 67 | 0 | 0 |

${\mathit{v}}_{\mathbf{21}}$ | 264 | 276 | 0 | 0 | 0 | 0 | 0 | 79 | 134 | 41 | 0 | 174 |

${\mathit{v}}_{\mathbf{22}}$ | 0 | 297 | 0 | 0 | 349 | 0 | 146 | 0 | 53 | 74 | 0 | 193 |

${\mathit{v}}_{\mathbf{31}}$ | 0 | 0 | 214 | 0 | 0 | 0 | 0 | 0 | 117 | 69 | 0 | 137 |

${\mathit{v}}_{\mathbf{32}}$ | 0 | 0 | 298 | 254 | 0 | 0 | 47 | 29 | 111 | 0 | 0 | 77 |

${\mathit{v}}_{\mathbf{51}}$ | 0 | 0 | 56 | 0 | 44 | 0 | 0 | 0 | 65 | 32 | 0 | 96 |

${\mathit{v}}_{\mathbf{52}}$ | 0 | 0 | 0 | 91 | 50 | 0 | 0 | 0 | 82 | 0 | 64 | 102 |

${\mathit{v}}_{\mathbf{61}}$ | 0 | 83 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{62}}$ | 0 | 0 | 0 | 0 | 0 | 95 | 0 | 68 | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{91}}$ | 0 | 0 | 177 | 132 | 0 | 199 | 93 | 0 | 0 | 0 | 0 | 0 |

${\mathit{v}}_{\mathbf{92}}$ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

Construction Step | U: Set of Vertices | T: Set of Edges |
---|---|---|

Initialization | $\left\{{v}_{11}\right\}$ | $\varnothing $ |

Step 1 | $\left\{{v}_{11},{v}_{31}\right\}$ | $\left\{\left({v}_{11},{v}_{31}\right)\right\}$ |

Step 2 | $\left\{{v}_{11},{v}_{31},{v}_{12}\right\}$ | $\left\{\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right)\right\}$ |

Step 3 | $\left\{{v}_{11},{v}_{31},{v}_{12},{v}_{32}\right\}$ | $\left\{\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right)\right\}$ |

Step 4 | $\left\{{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22}\right\}$ | $\left\{\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right)\right\}$ |

Step 5 | $\left\{{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22},{v}_{21}\right\}$ | $\left\{\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right),\left({v}_{32},{v}_{21}\right)\right\}$ |

Step 6 | $\left\{\begin{array}{c}{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22},{v}_{21},\\ {v}_{91}\end{array}\right\}$ | $\left\{\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right),\left({v}_{32},{v}_{21}\right),\left({v}_{91},{v}_{32}\right)\right\}$ |

Step 7 | $\left\{\begin{array}{c}{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22},{v}_{21},\\ {v}_{91},{v}_{51}\end{array}\right\}$ | $\left\{\begin{array}{c}\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right),\left({v}_{32},{v}_{21}\right),\left({v}_{91},{v}_{32}\right),\\ \left({v}_{12},{v}_{51}\right)\end{array}\right\}$ |

Step 8 | $\left\{\begin{array}{c}{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22},{v}_{21},\\ {v}_{91},{v}_{51},{v}_{92}\end{array}\right\}$ | $\left\{\begin{array}{c}\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right),\left({v}_{32},{v}_{21}\right),\left({v}_{91},{v}_{32}\right),\\ \left({v}_{12},{v}_{51}\right),\left({v}_{22},{v}_{92}\right)\end{array}\right\}$ |

Step 9 | $\left\{\begin{array}{c}{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22},{v}_{21},\\ {v}_{91},{v}_{51},{v}_{92},{v}_{52}\end{array}\right\}$ | $\left\{\begin{array}{c}\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right),\left({v}_{32},{v}_{21}\right),\left({v}_{91},{v}_{32}\right),\\ \left({v}_{12},{v}_{51}\right),\left({v}_{22},{v}_{92}\right),\left({v}_{11},{v}_{52}\right)\end{array}\right\}$ |

Step 10 | $\left\{\begin{array}{c}{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22},{v}_{21},\\ {v}_{91},{v}_{51},{v}_{92},{v}_{52},{v}_{61}\end{array}\right\}$ | $\left\{\begin{array}{c}\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right),\left({v}_{32},{v}_{21}\right),\left({v}_{91},{v}_{32}\right),\\ \left({v}_{12},{v}_{51}\right),\left({v}_{22},{v}_{92}\right),\left({v}_{11},{v}_{52}\right),\left({v}_{21},{v}_{61}\right)\end{array}\right\}$ |

Step 11 | $\left\{\begin{array}{c}{v}_{11},{v}_{31},{v}_{12},{v}_{32},{v}_{22},{v}_{21},\\ {v}_{91},{v}_{51},{v}_{92},{v}_{52},{v}_{61},{v}_{62}\end{array}\right\}$ | $\left\{\begin{array}{c}\left({v}_{11},{v}_{31}\right),\left({v}_{12},{v}_{31}\right),\left({v}_{12},{v}_{32}\right),\left({v}_{22},{v}_{31}\right),\left({v}_{32},{v}_{21}\right),\left({v}_{91},{v}_{32}\right),\\ \left({v}_{12},{v}_{51}\right),\left({v}_{22},{v}_{92}\right),\left({v}_{11},{v}_{52}\right),\left({v}_{21},{v}_{61}\right),\left({v}_{11},{v}_{62}\right)\end{array}\right\}$ |

Connection Priority | Origin | Transfer Destination | Weight |
---|---|---|---|

1 | L1 Up Direction | L3 Up Direction | 434 |

2 | L1 Down Direction | L3 Up Direction | 386 |

3 | L1 Down Direction | L3 Down Direction | 364 |

4 | L2 Down Direction | L3 Up Direction | 349 |

5 | L3 Down Direction | L2 Up Direction | 298 |

6 | L9 Up Direction | L3 Down Direction | 199 |

7 | L1 Down Direction | L5 Up Direction | 194 |

8 | L2 Down Direction | L9 Down Direction | 193 |

9 | L1 Up Direction | L5 Down Direction | 167 |

10 | L2 Up Direction | L6 Up Direction | 137 |

11 | L1 Up Direction | L6 Down Direction | 84 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Zeng, X.; Liu, Q.; Yao, S.
An Improved Prim Algorithm for Connection Scheme of Last Train in Urban Mass Transit Network. *Symmetry* **2019**, *11*, 681.
https://doi.org/10.3390/sym11050681

**AMA Style**

Zeng X, Liu Q, Yao S.
An Improved Prim Algorithm for Connection Scheme of Last Train in Urban Mass Transit Network. *Symmetry*. 2019; 11(5):681.
https://doi.org/10.3390/sym11050681

**Chicago/Turabian Style**

Zeng, Xiaoxu, Qinglei Liu, and Song Yao.
2019. "An Improved Prim Algorithm for Connection Scheme of Last Train in Urban Mass Transit Network" *Symmetry* 11, no. 5: 681.
https://doi.org/10.3390/sym11050681