Similar Items: Complexity of Problems of Commutative Grammars