## 4 Proposed Algorithm
### Completeness  
Given a graph collection (\(D\)), a support threshold (\(\alpha\)), and a dissimilarity threshold (\(\beta\)), AGCM-SLV aims to mine all frequent subgraphs within the graph collection \(D\), considering both structural and label variations, allowing a dissimilarity of at most \(\beta\) with its occurrences. We can ensure this since all frequent nodes in the graph collection are mined through an exhaustive search, and from these, expansions are made to include larger frequent subgraphs until they can no longer be expanded to form new frequent subgraphs. Thus, they are pruned by applying the anti-monotonicity property. Each frequent subgraph expansion considers that a new candidate subgraph must be created for each edge that connects a neighboring node. The frequent subgraphs may include cycles, which implies inserting an edge without inserting a node. This way, all frequent subgraphs that contain the subgraph that is being expanded are considered as candidates. For each candidate, the occurrences of the expanded subgraph are also expanded. Each occurrence expansion considers structural differences and label differences through dictionaries. The dissimilarity is verified to guarantee that every occurrence fulfills the dissimilarity threshold (\(\beta\)). Then, the frequency is verified to ensure it satisfies the support threshold (\(\alpha\)). Hence, all frequent approximate subgraphs that satisfy the dissimilarity and the frequency threshold are mined. All of the above ensures no frequent subgraph is lost; thus, the proposed algorithm mines all the frequent approximate subgraphs according to Definition 8.  
To formally prove that AGCM-SLV can mine all frequent subgraphs with structural and label variations, we will show by induction on the size of the frequent subgraph that AGCM-SLV can find all frequent subgraphs as candidate subgraphs and that, for each candidate, AGCM-SLV finds all its corresponding occurrences.  
Let \(P(k)\) be a frequent subgraph of size \(k\).  
**Base case**: When \(k=1\), since the AGCM-SLV first stage mines all frequent nodes satisfying the support threshold (\(\alpha\)) by an exhaustive search in all the graph collection \(D\), every subgraph \(P(1)\) is mined by AGCM-SLV. For every subgraph mined, all its occurrences are found.  
**Induction hypothesis**: AGCM-SLV mines the set of all frequent approximate subgraphs \(P(k)\) of size \(k\) in \(D\) (with structural and label variations) and all their occurrences.  
**Induction step**: We will prove that if \(p(k+1)\) is a frequent subgraph with structural and label variations in \(D\), AGCM-SLV mines \(P(k+1)\) and all their occurrences.  
If \(P(k+1)\) is a subgraph, then due to the anti-monotonicity property, there is a frequent subgraph \(P(k)\) such that \(P(k)\in P(k+1)\). Then, by induction, we have that \(P(k)\) is a subgraph with structural and label variations and all its occurrences in \(D\) are found by AGCM-SLV. Then, by applying the subgraph expansion of the algorithm AGCM-SLV described in Section 4.2 to \(P(k)\), we get \(P(k+1)\) as a candidate subgraph. Now, applying the expansion of the occurrences of the algorithm AGCM-SLV described in Section 4.3 to each occurrence \(O_{k}\) (the occurrences of \(P(k)\)), ACGM-SLV found all occurrences of \(P(k+1)\) because every occurrence \(O_{k}+1\) of \(P(k+1)\) comes from an occurrence \(O_{k}\) of \(P(k)\).  
\(O_{k+1}\) come from the occurrences of \(O_{k}\), then by hypothesis, they are also occurrences of \(P(k+1)\); hence, \(P(k+1)\) is a frequent subgraph and the expanded occurrences denoted as \(O_{k+1}\) their occurrences.  
Hence, \(p(k+1)\) and all its occurrence \(O_{k}+1\) are mined by ACGM-SLV.  
Therefore, it is concluded that all frequent subgraphs are mined by ACGM-SLV.