Next: Iteration 5: Count Word
Up: Finding Common Key Words
Previous: Iteration 3: Count Word
We use the procedure described in the previous iteration to generate a
new
from
, to get
, i.e., we consider all pairs
from
, and generate a set of length 4 by taking their
union if they share a common prefix. For example, if the pairs are 123
and 124, then the common prefix is 12, and the result is 1234.
If the pairs are 123 and 234, then
there is no result since they don't share a common prefix.
Next we prune a candidate if any of its length 3 subsets is not in
. For example 123, 125, 135, and 235 are the four length 3
subsets of 1235. We see that 135 doesn't appear in
. Thus
we discard the candidate 1235. We also discard 1245 for the same
reason. The final candidate set is
.
Now we count the candidates:
Candidates: 1234
--------------------
Count : 3
Since this is frequent, we get
.
Mohammed Zaki
10/30/1998