## 4 Problem Formulation  
### Mathematical Model of the Proposed Algorithm  
In this section, we will abstract the problem presented in the previous section and construct a mathematical model in order to describe and analyze the process of topological reconfiguration more precisely. The mathematical notations used in the mathematical models are shown in Table 1 below. By transforming the actual problem into a mathematical expression, we are able to clearly define the scope of the problem, identify the key variables, and establish the relationship between them. This mathematical model not only helps us deeply understand the nature of the problem but also provides a solid theoretical foundation for the design and optimization of subsequent algorithms. The steps of the mathematical model are shown below:  
The optimization process begins with a physical matrix \(\mathbf{H}\in\mathbf{R}^{m\times n}\) that contains defects \(\mathbf{D}\). A sliding window \(\mathbf{F}\in R^{p\times q}\) is used to focus on specific regions of the matrix. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Category** & **Notations** & **Description** \\ \hline \multirow{3}{*}{Input Parameters} & \(H\in R^{m\times n}\) & The original physical array \\  & \(F\in R^{p\times q}\) & The sliding window used for searching and optimizing \\  & \(D\) & Set of defect locations in H \\  & \(n,k,t\) & Dimensions and number of faulty elements \\ Output Parameters & \(T_{\text{best}}\in R^{p\times q}\) & Final target array that is optimized \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The mathematical notations. The process involves four main steps: Firstly, fault detection and replacement are performed to identify and mitigate defective processing elements within the matrix. Secondly, dynamic thresholds and a Quality Metric \(\mathbf{Q}\) are used to select the appropriate optimization path. The third step involves iterative optimization, where forward and reverse searches, combined with sliding window techniques, are employed to converge towards an optimal solution. Finally, a utility function is used to compare different configurations, and a rotational search is conducted to find the most optimal target array. The output of this process is the optimized target array \(\mathbf{T_{best}}\in\mathbf{R^{p\times q}}\). The formulas of the mathematical model are shown as follows:  
1. The normalized Euclidean distance: \[\mathbf{D}_{ij}=\sqrt{\left(\frac{\mathbf{x}_{i}-\mathbf{x}_{j}}{\mathbf{D}_{max}}\right)^{2}+ \left(\frac{\mathbf{y}_{i}-\mathbf{y}_{j}}{\mathbf{D}_{max}}\right)^{2}},\forall i,\mathbf{j} \in\mathbf{F}\] (5)  
In this formula, \(\mathbf{D}_{ij}\) represents the normalized Euclidean distance between points \(\mathbf{i}\) and \(\mathbf{j}\), which mitigates significance loss by scaling the distance relative to the maximum distance within the array. \(\mathbf{x}_{i},\mathbf{x}_{j},\mathbf{y}_{i},\mathbf{y}_{j}\) represent the coordinates of point \(\mathbf{i}\) and point \(\mathbf{j}\) in the physical array \(\mathbf{H}\). \(\mathbf{D}_{max}\) represents the maximum possible distance between any two points in the physical array, which serves as a normalization factor to ensure that all calculated distances are within a comparable range. \(\mathbf{F}\) represents the set of pairs of faulty processing elements (PEs) within the sliding window, where \(\mathbf{i}\) and \(\mathbf{j}\) denote specific faulty PEs. The coordinates are typically expressed in a two-dimensional rectangular coordinate system, where \(\mathbf{x}_{i}\) and \(\mathbf{x}_{j}\) refer to the horizontal positions (or widths) of points \(\mathbf{i}\) and \(\mathbf{j}\) respectively. \(\mathbf{y}_{i}\) and \(\mathbf{y}_{j}\) refer to the vertical positions (or heights) of points \(\mathbf{i}\) and \(\mathbf{j}\) respectively. The coordinates \(\mathbf{x}_{i}\), \(\mathbf{y}_{i}\), \(\mathbf{x}_{j}\), \(\mathbf{y}_{j}\) are measured in nanometers (nm), reflecting the precise topological positioning of the faulty processing elements (PEs) within the integrated circuit.