Content deleted Content added
→Rule utility: actually, the greater benefit is the number of rules... |
|||
Line 21:
=== Digram uniqueness ===
Whenever a new symbol is scanned from the sequence, it is appended with the last scanned symbol to form a new [[Bigram|digram]]. If this digram has been formed earlier then a new rule is made to replace both occurrences of the digrams.
Therefore, it ensures that no digram occurs more than once in the grammar. For example, in the sequence '''S→abaaba''', when the first four symbols are already scanned, digrams formed are '''ab, ba, aa'''. When the fifth symbol is read, a new digram 'ab' is formed which exists already. Therefore, both instances of 'ab' are replaced by a new rule (say, A) in ''S''. Now, the grammar becomes '''S→AaAa, A→ab''', and the process continues until no repeated digram exists in the grammar.
|