Abstract:
In this paper we study the problem of total derivability in context-free, noncontracting, and context-sensitive grammars. Given a grammar and a terminal word, one has to determine whether there exists a derivation of this word which uses each production no less than a given number of times. It is proved that the problem of total derivability of the emptyword in a context-free grammar is NP-complete. For noncontracting and context-sensitive grammars it is polynomially decidable for words of length 1, and it is NP-complete for every fixed word of length at least 2. Analagous results are obtained for another variant of the problem of total derivability when restrictions are placed on the amount of uses of nonterminals in the derivation.