Reducing the ambiguity of Parikh matrices: theoretical considerations and tools