Research Article
FACC: A Novel Finite Automaton Based on Cloud Computing for the Multiple Longest Common Subsequences Search
Algorithm 1
The pseudocode of the preprocessing algorithm.
| Algorithm Pre-processing (InitStringSet) | | Input: InitStringSet: a initial string set. | | Output: Σ :common alphabet over InitStringSet | | StringSet: the result of pre-processed InitStringSet | | (1) for each string in InitStringSet | | (2) tempSet = ∅ | | (3) for each character [j] in | | (4) if () | | (5) tempSet = tempSet ∪ [j]} | | (6) if ([j] ∈ map) | | (7) map ([j]) = map ([j]) + 1 | | (8) else | | (9) map ([j]) = 1 | | (10) endfor | | (11) endfor | | (12) | | (13) for each character char[i] in map | | (14) if (map(char[i]) == size (InitStringSet)) | | (15) Σ = Σ ∪ {char[i]} | | (16) endfor | | (17) StringSet = InitStringSet | | (18) for each string in StringSet | | (19) for each character [j] in | | (20) if ([j] ∉ Σ) | | (21) delete ([j]) | | (22) endfor | | (23) endfor | | (24) return Σ and StringSet |
|