## 4 Problem Formulation
### Mathematical Model of the Proposed Algorithm
This unit of measurement is commonly used in modern semiconductor technologies, where the feature sizes of integrated circuits are often in the order of nanometers. Thus, using nanometers provides an accurate and relevant scale for evaluating distances and positions within the physical array \(\mathbf{H}\). 2. Faulty core distribution factor within the sliding window: \[\mathbf{Q}=\frac{1}{\mathbf{t}(\mathbf{t}-1)}\sum_{i=1}^{\mathbf{t}}\sum_{j=\mathbf{t}+1}^{\mathbf{t} }\mathbf{D}_{ij}\] (6)  
In this formula, \(\mathbf{Q}\) quantifies the spatial distribution of faulty processing elements (PEs) within the sliding window. It measures how closely or widely the faulty PEs are clustered within that given area, providing insight into density and spread. \(t\) represents the total number of faulty PEs located within the sliding window \(\mathbf{F}\). This variable is crucial for the normalization factor \(\mathbf{t}(\mathbf{t}-1)\), which accounts for the combinations of point pairs. 3. Dynamic threshold: \[\mathbf{DT}=\mathbf{\log}_{10}(\mathbf{n})\] (7)  
In this formula, \(\mathbf{DT}\) represents the dynamic threshold used to determine the optimization path. \(\mathbf{n}\) represents the number of rows in a 2D REmesh structure of size \(\mathbf{n}\times(\mathbf{n}+\mathbf{k})\). The base of the logarithm for the formula is \(\mathbf{10}\). 4. Number of faulty processing elements (PEs) \[\mathbf{t}=|\left\{\mathbf{p}_{i}\in\mathbf{S}|\mathbf{p}_{i}\in\mathbf{D}\right\}|\] (8)In this formula, \(\mathbf{t}\) represents the total number of faulty PEs, \(\mathbf{p}_{i}\) represents each processing element in the solution \(S\). \(\mathbf{D}\) represents the set of defective PEs. The expression inside the vertical bars \(|\{\cdots\}|\) denotes the cardinality of a set, which means we are counting the number of elements in the set defined within the braces. (5) Replacement Metric:  
\[\mathbf{R}(\mathbf{F})=|\{\mathbf{p}_{i}\in\mathbf{F}|\mathbf{p}_{i}\in\mathbf{D}\}| \tag{9}\]  
In this formula, \(\mathbf{R}(\mathbf{F})\) represents the count of defective PEs within the sliding window \(\mathbf{F}\) that have been replaced, \(\mathbf{p}_{i}\) represents the individual processing elements within the sliding window \(\mathbf{F}\). (6) Quality Metric:  
\[\mathbf{T}(\mathbf{F})=\frac{1}{\mathbf{n}_{\mathbf{r}}}\sum_{k=1}^{\mathbf{n}_{\mathbf{r}}}\mathbf{D}_{k} ^{\mathbf{F}} \tag{10}\]  
In this formula, \(\mathbf{T}(\mathbf{F})\) represents the average distance to the nearest non-defective PEs within the window \(\mathbf{F}\). \(\mathbf{n}_{\mathbf{r}}\) represents the number of non-defective PEs present within the sliding window \(\mathbf{F}\). \(\mathbf{D}_{k}^{\mathbf{F}}\) represents the distance from each non-defective PE \(k\) located in \(\mathbf{F}\) to the nearest defective PE. (7) Utility Function Calculation:  
\[\mathbf{u}(\mathbf{F})=\mathbf{w}_{1}\times\mathbf{R}(\mathbf{F})+\mathbf{w}_{2}\times\mathbf{T}(\mathbf{F}) \tag{11}\]  
In this formula, \(\mathbf{w}_{1},\mathbf{w}_{2}\) represents weights that denote the importance of each component in the utility calculation. The remaining mathematical symbols in this formula are shown above.