Abstract:
We present two algorithms that construct a context-free grammar for a given text. The first one is an improvement of Rytter's algorithm that constructs grammar using AVL-trees. The second one is a new approach that constructs grammar using cartesian trees. Also we compare both algorithms and Rytter's algorithm on various data sets and provide a comparative analysis of compression ratio achieved by these algorithms, by LZ77 and by LZW.
Key words and phrases:straight-line program, LZ-compression, AVL-tree, Cartesian tree.