## 5 Real-World Application: Government Debt Analysis
### Implementation and Results
\]  
**Modified Hamming Distance HW(X,Y):**  
\[d_{MH}(x,y)=\sum_{i=1}^{n}|x_{i}-y_{i}|\]  
The \"W\" notation indicates our ordinal-aware modification that captures the magnitude of categorical differences, not temporal weighting. All time periods receive equal consideration in both measures. The weighted notation HW(X,Y) in our tables refers specifically to the ordinal-aware distance calculation that weighs categorical differences by their numerical distance rather than treating them as binary. No temporal weighting scheme is applied--each year from 1960 to 2022 contributes equally to the trajectory comparison. The comprehensive pairwise analysis across all 28 possible country combinations yields detailed insights into trajectory similarities and divergences. Table 7 presents the complete matrix of regular and modified Hamming distances. The Table 7 presents comprehensive pairwise Hamming distance analysis across all 28 possible country combinations, revealing trajectory similarities and divergences in fiscal policy evolution. The analysis identifies distinct relationship clusters: Switzerland-Norway demonstrate highest similarity (Regular: 0.5082, Modified: 0.3197), suggesting convergent fiscal approaches despite different resource endowments. Conversely, United Kingdom-Denmark exhibit maximum divergence (Regular: 0.9365, Modified: 0.7778), reflecting fundamentally different fiscal philosophies. European economies show moderate convergence patterns, with Germany-France (0.5397) and Germany-Denmark (0.5873) indicating some policy coordination effects. Japan's unique trajectory results in high distances with most countries, particularly Norway (1.0164 modified distance), confirming its exceptional fiscal evolution following economic bubble collapse. The systematic differences between regular and modified distances highlight the importance of ordinal proximity in categorical trajectory comparison. The aggregate analysis reveals substantial heterogeneity in fiscal trajectory patterns across the selected countries. Table 8 summarizes the comprehensive distance metrics. \begin{table}
\begin{tabular}{l c c} \hline \hline
**Country Pair** & \(\mathbf{H(X,Y)}\) & \(\mathbf{H_{W}(X,Y)}\) \\ \hline USA-Germany & 0.6349 & 0.3730 \\ USA-Japan & 0.8254 & 0.5397 \\ USA-United Kingdom & 0.5079 & 0.3175 \\ USA-France & 0.6667 & 0.3333 \\ USA-Denmark & 0.8095 & 0.5238 \\ USA-Switzerland & 0.6825 & 0.5794 \\ USA-Norway & 0.7705 & 0.6393 \\ Germany-Japan & 0.7143 & 0.5000 \\ Germany-United Kingdom & 0.6032 & 0.4683 \\ Germany-France & 0.5397 & 0.3889 \\ Germany-Denmark & 0.5873 & 0.3889 \\ Germany-Switzerland & 0.5714 & 0.3968 \\ Germany-Norway & 0.8033 & 0.5656 \\ Japan-United Kingdom & 0.9048 & 0.8095 \\ Japan-France & 0.7619 & 0.5397 \\ Japan-Denmark & 0.4921 & 0.4921 \\ Japan-Switzerland & 0.7778 & 0.8492 \\ Japan-Norway & 0.8852 & 1.0164 \\ United Kingdom-France & 0.7143 & 0.4286 \\ United Kingdom-Denmark & 0.9365 & 0.7778 \\ United Kingdom-Switzerland & 0.6825 & 0.6111 \\ United Kingdom-Norway & 0.7213 & 0.5902 \\ France-Denmark & 0.8413 & 0.6984 \\ France-Switzerland & 0.8571 & 0.6746 \\ France-Norway & 0.8525 & 0.7541 \\ Denmark-Switzerland & 0.6667 & 0.4841 \\ Denmark-Norway & 0.8033 & 0.6885 \\ Switzerland-Norway & 0.5082 & 0.3197 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Pairwise comparison of Hamming and modified Hamming distances for countries. The Table 8 provides summary statistics for trajectory dissimilarity analysis across the eight-country sample. The high aggregate distances (Regular: 0.7186, Modified: 0.5624) confirm substantial heterogeneity in fiscal trajectory evolution, validating the discriminatory power of the Hamming diversification index. The wide range of distance values (Regular: 0.4921-0.9365, Modified: 0.3175-1.0164) demonstrates the framework's sensitivity to different evolutionary patterns. Standard deviations (Regular: 0.1258, Modified: 0.1720) indicate moderate dispersion around mean distances, suggesting balanced representation of both similar and divergent trajectory pairs.