Minimizing LR(1) State Machines is NP-Hard

10/02/2021
by   Wuu Yang, et al.
0

LR(1) parsing was a focus of extensive research in the past 50 years. Though most fundamental mysteries have been resolved, a few remain hidden in the dark corners. The one we bumped into is the minimization of the LR(1) state machines, which we prove is NP-hard. It is the node-coloring problem that is reduced to the minimization puzzle. The reduction makes use of two technique: indirect reduction and incremental construction. Indirect reduction means the graph to be colored is not reduced to an LR(1) state machine directly. Instead, it is reduced to a context-free grammar from which an LR(1) state machine is derived. Furthermore, by considering the nodes in the graph to be colored one at a time, the context-free grammar is incrementally extended from a template context-free grammar that is for a two-node graph. The extension is done by adding new grammar symbols and rules. A minimized LR(1) machine can be used to recover a minimum coloring of the original graph.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/20/2018

The isomorphism problem for finite extensions of free groups is in PSPACE

We present an algorithm for the following problem: given a context-free ...
research
05/26/2022

Computing homomorphisms in hereditary graph classes: the peculiar case of the 5-wheel and graphs with no long claws

For graphs G and H, an H-coloring of G is an edge-preserving mapping fro...
research
10/13/2020

Digraph Coloring and Distance to Acyclicity

In k-Digraph Coloring we are given a digraph and are asked to partition ...
research
04/17/2021

3-Coloring on Regular, Planar, and Ordered Hamiltonian Graphs

We prove that 3-Coloring remains NP-hard on 4- and 5-regular planar Hami...
research
07/11/2017

Multiple Context-Free Tree Grammars: Lexicalization and Characterization

Multiple (simple) context-free tree grammars are investigated, where "si...
research
03/05/2011

Teraflop-scale Incremental Machine Learning

We propose a long-term memory design for artificial general intelligence...
research
09/08/2017

Gigamachine: incremental machine learning on desktop computers

We present a concrete design for Solomonoff's incremental machine learni...

Please sign up or login with your details

Forgot password? Click here to reset