equal_to(word_type const&, word_type const&)

virtual bool libsemigroups::FpSemigroupInterface::equal_to(word_type const &u, word_type const &v)

Check if two words represent the same element.

Complexity

See warning.

See

equal_to(std::string const&, std::string const&).

Warning

The problem of determining the return value of this function is undecidable in general, and this function may never terminate.

Parameters
Throws

LibsemigroupsException – if u or v contains a letter that is out of bounds.

Returns

true if the words u and v represent the same element of the finitely presented semigroup, and false otherwise.