In this note, we show that LR(k) testing of context-free grammars with respect to random instances is many-one complete for DistNP (Distributional NP). The same result holds for testing whether a context-free grammar is LL(k), strong LL(k), SLR(k), LC(k) or strong LC(k), respectively.
Recently, Watanabe proposed a new framework for testing the correctness and average case behavior of algorithms that purport to solve a given NP search problem eeciently on average. The idea is to randomly generate certiied instances in a way that resembles the underlying distribution. We discuss this approach and show that test instances can be generated… (More)