equal_to(std::string const&, std::string const&)ΒΆ

virtual bool libsemigroups::FpSemigroupInterface::equal_to(std::string const &u, std::string const &v) = 0

Check if two words represent the same element.

Return

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

Complexity

See warning.

Warning

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

See

equal_to(word_type const&, word_type const&).

Parameters
  • u: a string over the alphabet of the finitely presented semigroup.

  • v: a string over the alphabet of the finitely presented semigroup.

Exceptions
  • LibsemigroupsException: if u or v contains a letter that does not belong to alphabet().

  • std::bad_alloc: if the (possibly infinite) computation uses all the available memory.