A new search framework uses root-based state graph representation to solve the Variable Gapped Longest Common Subsequence problem. Researchers employ an iterative beam search to manage the combinatorial explosion of state spaces. This approach improves sequence comparison for molecular biology and time-series analysis. It offers a more flexible alternative to classical LCS constraints.