## 4 Methodology
### Distance Metric Implementation  
Our broader objective through this cluster-based approach is to assess the dissimilarity in the trends vis-a-vis the category assigned to objects over a period of time. For this, we are using regular Hamming distance and modified Hamming distance using differences in cluster values since the clusters have an idiosyncratic meaning. The modified Hamming is computed by taking the absolute value of the difference in the cluster positions and adding them. The standard Hamming distance treats all categorical differences as equal (binary: different = 1, same = 0). Our modification incorporates ordinal structure by weighting differences based on categorical proximity:  
Standard Hamming Distance:  
\[d_{h}(x,y)=\sum_{i=1}^{n}\delta(x_{i},y_{i})\quad\text{where}\quad\delta(x_{i},y_{i})= \begin{cases}1&\text{if }x_{i}\
eq y_{i}\\ 0&\text{if }x_{i}=y_{i}\end{cases} \]  
Modified (Weighted) Hamming Distance:  
\[d_{mh}(x,y)=\sum_{i=1}^{n}|x_{i}-y_{i}|\]  
The modification replaces binary difference indicators with absolute categorical distances, recognizing that moving from category \(1\to 2\) represents a smaller change than \(1\to 5\). This provides a more nuanced similarity assessment for ordinal categorical trajectories. If all weights \(w_{i}=1\), then the weighted Hamming distance coincides with the Manhattan distance (\(L_{1}\)-norm). The weights allow us the flexibility to assign different importance to different features. We will use the notation \(H(X,Y)\) to denote the regular Hamming distance and \(H_{W}(X,Y)\) to denote the weighted Hamming distance. The Table 4 compares regular and modified Hamming distance measures across feature pairs for all entity combinations. Regular Hamming distance captures binary differences in categorical positions, while modified Hamming distance incorporates ordinal proximity through weighted differences. The results reveal systematic patterns: Entity \(X\) demonstrates maximum dissimilarity from others, reflecting its unique evolutionary trajectory. The \(Y\) vs./\(Z\) comparison shows notable divergence between metrics (0.75 vs. 0.67 for \(f_{1}\)), indicating that while these entities occupy different categorical states, their ordinal proximity reduces weighted distance measures. These findings validate the utility of modified Hamming distance for categorical trajectory analysis. Country \(X\) exhibits a unique developmental pathway, with transition patterns markedly distinct from established norms. This suggests an alternative adaptation mechanism possibly driven by different internal constraints or external pressures than those affecting countries \(Y\) and \(Z\). The pronounced discrepancy between regular and modified metrics for the \(Y-Z\) relationship reveals a deceptive similarity: while these systems occupy comparable states across the observation period, their transition timing differs substantially. This asynchronicity in state transitions represents a crucial consideration for policy intervention design, as it indicates differing response latencies to external stimuli. The global average global Hamming distance is calculated by taking the cumulative average of the Hamming distances calculated for all the objects. This aggregate Hamming distance measure  
* Provides a global assessment of dissimilarity across the entire system;
* Enables comparison between different systems or time periods;
* Can serve as a summary statistic for complex multi-entity evolutionary dynamics. The Table 5 summarizes aggregate distance measures across the entire system. Regular Hamming distances (0.83 for \(f_{1}\), 0.81 for \(f_{2}\)) indicate substantial overall heterogeneity in categorical trajectories, while modified Hamming distances (0.75 for \(f_{1}\), 0.67 for \(f_{2}\)) reflect the ordinal structure's moderating effect on perceived dissimilarity.