Content deleted Content added
Cuchullain (talk | contribs) m moved SEQUITUR algorithm to Sequiter algorithm: no caps in article title |
IznoRepeat (talk | contribs) m →External links: add WP:TEMPLATECAT to remove from template; genfixes |
||
(37 intermediate revisions by 31 users not shown) | |||
Line 1:
'''Sequitur''' (or '''Nevill-
| author = Nevill-Manning, C.G.
| author-link = Craig Nevill-Manning
▲'''Sequitur''' (or ''Nevill-Manning algorithm'') is a recursive algorithm developed by [[Craig Nevill-Manning]] and [[Ian H. Witten]] in 1997<ref name=Nevill-manning1997>{{cite journal
| year = 1997▼
| title = Identifying Hierarchical Structure in Sequences: A linear-time algorithm▼
| bibcode= 1997cs........9102N
}}</ref> that infers a hierarchical structure ([[
| doi = 10.1109/DCC.1997.581951
| author = Nevill-Manning, C.G.
| author-link = Craig Nevill-Manning
▲ | coauthors = Witten, I.H.
| title = Proceedings DCC '97. Data Compression Conference
▲ | year = 1997
| pages = 3–11
▲ | title = Identifying Hierarchical Structure in Sequences: A linear-time algorithm
| author2=Witten, I.H.
▲ | journal = Arxiv preprint cs.AI/9709102
| year = 1997
| chapter = Linear-Time, Incremental Hierarchy Inference for Compression
| isbn = 978-0-8186-7761-8
▲}}</ref> that infers a hierarchical structure ([[Context-free_grammar|context-free grammar]]) from a sequence of discrete symbols. The algorithm operates in linear space and time. It can be used in [[data compression]] software applications.
| citeseerx = 10.1.1.30.2305
| s2cid = 14324301
}}</ref>
== Constraints ==
The sequitur algorithm constructs a grammar by substituting repeating phrases in the given sequence with new rules and therefore produces a concise representation of the sequence. For example, if the sequence is
: S→abcab,
the algorithm will produce
: S→AcA, A→ab.
While scanning the input sequence, the algorithm follows two constraints for generating its grammar efficiently: '''digram uniqueness''' and '''rule utility'''.
=== 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.
=== Rule utility ===
This constraint ensures that all the rules are used more than once in the right sides of all the productions of the grammar, i.e., if a rule occurs just once, it should be removed from the grammar and its occurrence should be substituted with the symbols from which it is created. For example, in the above example, if one scans the last symbol and applies digram uniqueness for 'Aa', then the grammar will produce: '''S→BB, A→ab, B→Aa'''. Now, rule 'A' occurs only once in the grammar in '''B→Aa'''. Therefore, A is deleted and finally the grammar becomes
: '''S→BB, B→aba'''.
This constraint helps reduce the number of rules in the grammar.
== Method summary ==
The algorithm works by scanning a sequence of [[terminal symbol]]s
==See also==
* [[Context
* [[Data compression]]
* [[
* [[
* [[Byte pair encoding]]
==References==
{{
==External links==
* [http://www.sequitur.info/ sequitur.info – the reference Sequitur algorithm implementation in C++, Java, and other languages]
{{Compression methods}}
[[Category:Lossless compression algorithms]]▼
▲[[Category:Lossless compression algorithms]]
[[Category:Data compression]]
|