normal_form(std::initializer_list<letter_type>)

word_type libsemigroups::FpSemigroup::normal_form(std::initializer_list<letter_type> w)

Returns a normal form for a libsemigroups::word_type.

If u and v represent the same element of the finitely presented semigroup represented by this, then normal_form(u) is guaranteed to equal normal_form(v). No further guarantees are given, the return value of normal_form() depends on the implementation and may vary between finitely presented semigroups defined in precisely the same way.

Return

the normal form of the parameter w, a value of type libsemigroups::word_type.

Complexity

See warning.

Warning

The function for finding the structure of a finitely presented semigroup may be non-deterministic, or since the problem is undecidable in general, this function may never return a result.

See

normal_form(std::string const&) and normal_form(std::initializer_list<letter_type>).

Parameters
  • w: the word whose normal form we want to find. The parameter w must be a libsemigroups::word_type consisting of indices of the generators of the finitely presented semigroup that this represents.

Exceptions
  • LibsemigroupsException: if w contains a letter that is out of bounds, or the object has not been fully initialised.