contains¶
-
virtual bool libsemigroups::Congruence::contains(word_type const&, word_type const&) override¶
Check if a pair of words belongs to the congruence.
- Complexity
See warning.
Warning
The problem of determining the return value of this function is undecidable in general, and this function may never terminate.
- Parameters
u – a word (vector of integers) over the generators of the semigroup.
v – a word (vector of integers) over the generators of the semigroup.
- Throws
LibsemigroupsException – if
u
orv
contains a letter that is out of bounds.std::bad_alloc – if the (possibly infinite) computation uses all the available memory.
- Returns
true
if the wordsu
andv
belong to the same congruence class, andfalse
otherwise.