Approximation Ratios of RePair, LongestMatch and Greedy on Unary Strings

A grammar-based compressor is an algorithm that receives a word and outputs a context-free grammar that only produces this word. The approximation ratio for a single input word is the size of the grammar produced for this word divided by the size of a smallest grammar for this word. The worst-case a...

Full description

Bibliographic Details
Main Authors: Danny Hucke, Carl Philipp Reh
Format: Article
Language:English
Published: MDPI AG 2021-02-01
Series:Algorithms
Subjects:
Online Access:https://www.mdpi.com/1999-4893/14/2/65
Description
Summary:A grammar-based compressor is an algorithm that receives a word and outputs a context-free grammar that only produces this word. The approximation ratio for a single input word is the size of the grammar produced for this word divided by the size of a smallest grammar for this word. The worst-case approximation ratio of a grammar-based compressor for a given word length is the largest approximation ratio over all input words of that length. In this work, we study the worst-case approximation ratio of the algorithms error, error and error on unary strings, i.e., strings that only make use of a single symbol. Our main contribution is to show the improved upper bound of <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mo form="prefix">error</mo><mo>(</mo><msup><mrow><mo>(</mo><mo form="prefix">log</mo><mi>n</mi><mo>)</mo></mrow><mn>8</mn></msup><mo>·</mo><msup><mrow><mo>(</mo><mo form="prefix">log</mo><mo form="prefix">log</mo><mi>n</mi><mo>)</mo></mrow><mn>3</mn></msup><mo>)</mo></mrow></semantics></math></inline-formula> for the worst-case approximation ratio of error. In addition, we also show the lower bound of <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mn>1</mn><mo>.</mo><mn>34847194</mn><mo>⋯</mo><mspace width="0.166667em"></mspace><mspace width="0.166667em"></mspace></mrow></semantics></math></inline-formula> for the worst-case approximation ratio of error, and that error and error have a worst-case approximation ratio of <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><msub><mo form="prefix">log</mo><mn>2</mn></msub><mrow><mo>(</mo><mn>3</mn><mo>)</mo></mrow></mrow></semantics></math></inline-formula>.
ISSN:1999-4893