## 4 Proposed Solution
Then, the collision condition can be expressed as  
\[\varphi_{k}=(\omega_{m}\times\mathbf{m}_{0}-\omega_{k}\times\mathbf{\hat{r}} _{0})\times t_{slot}^{\{f_{m},f_{k}\}} \tag{6}\]  
Based on Bezout Theorem, _if a and b are integers, and \(gcd(a,b)=d\), then \(ax+by\) must be a multiple of d for any integer \(x,y\). In particular, there must exist integers \(x,y\) such that \(ax+by=d\)._ An important corollary is that a sufficient condition for the mutuality of \(a\) and \(b\) is that there exist integers \(x\) and \(y\) such that \(ax+by=1\). Here, \(t_{slot}^{\{f_{m},f_{k}\}}\) is the greatest common divisor of \(f_{m}.prd\) and \(f_{k}.prd\), additionally, \(\mathbf{m}_{0}\) and \(\mathbf{\hat{r}}_{0}\) are two mutually prime numbers, i.e., \(gcd(\mathbf{m}_{0},\mathbf{\hat{r}}_{0})=1\). There exist integers \(\hat{m}\) and \(\tilde{k}\) such that \(\tilde{m}\times\mathbf{m}_{0}+\tilde{k}\times\mathbf{\hat{r}}_{0}=1\). Since the time slot location of the offset must be integer multiples of the time slot, \(\forall\chi\in\mathbb{N},(\omega_{m}\times\mathbf{m}_{0}-\omega_{k}\times \mathbf{\hat{r}}_{0})\times t_{slot}^{\{f_{m},f_{k}\}}=\chi\times(\hat{m}\times \mathbf{m}_{0}+\tilde{k}\times\mathbf{\hat{r}}_{0})\times t_{slot}^{\{f_{m},f_ {k}\}}\) is satisfied when and only when \(\varphi_{m}=\chi\tilde{m}\) and \(\varphi_{k}=\chi\tilde{k}\). The offset of flow \(f_{k}\) in the first cycle cannot be chosen from \(\{0,t_{slot}^{\{f_{m},f_{k}\}},2t_{slot}^{\{f_{m},f_{k}\}}\ldots,\)\(f_{k}.prd-t_{slot}^{\{f_{m},f_{k}\}}\}\). Therefore, the number of available time slot combinations is \(num(f_{m}.f_{k})=\lfloor\frac{f_{k}.prd}{f_{k}.id}\rfloor\lfloor\frac{f_{k}.prd}{ f_{k}.id}\rfloor\). The definition is proved. The traditional routing algorithms (e.g., shortest path algorithm, equal-cost multipath algorithm) are focused on finding the shortest route for each flow, which may result in too many flows traversing the same path simultaneously. Here, we fully consider flow characteristics and explore the valid routes that meet the timing constraint \(f.ddl\). To describe how to optimize the routing and scheduling solution, we give an instance of a scenario with four time-triggered flows traversing through switch \(sw_{0}\) as depicted in Figure 2. The partition of the time slot represents the time resource reserved on the switch's output port, since the flow correlation of flow set \(\{f_{1},f_{2},f_{4}\}\) is larger than \(subset\{f_{1},f_{2},f_{4}\}\cup f_{3}\). From the results of flow correlation, we can find that it is mainly related to the greatest common divisor of flow sets. We can see that \(f_{3}\) and \(f_{2}\) congest at time slot 112 in Figure 3b. Additionally, another option for the transmission starting time slot which is sufficient for the transmission of one frame is 26-30 in one cycle, and it will conflict in the following cycle since \(GCD(f1,f2,f3,f4)=1\). There is poor flow correlation between them and it is not suitable to pass through the same route. If the flow is scheduled according to the flow sequence, flow \(f_{3}\) and other flows cannot be scheduled on the same path without conflict, since they did not have a common divisor and the first frame must be sent within their periods. We consider using the flow classification step to classify the flow first and use a separate path scheduling for flows with periods such as \(f_{3}\) that seriously affect the scheduling cycle. Without loss of generality, flows with a period that is a multiple of 7 are also added to the same route to schedule. There is no need to recall the routing and scheduling algorithm for global planning. The FC step to group the flows by \(t_{slot}\) can be considered independent of the network topology to increase the correlation of flows passing through the same link. The whole procedure of FC is presented in Algorithm 1. We introduce three categories to group flows with different periods (lines 5-14). The first group has common divisors other than 1.