size¶
-
uint64_t
libsemigroups::fpsemigroup::KnuthBendix::size() override¶ Returns the size of the finitely presented semigroup.
- Return
A
uint64_t, the value of which equals the size ofthisif this number is finite, or libsemigroups::POSITIVE_INFINITY in some cases if this number is not finite.- Exceptions
This function guarantees not to throw a LibsemigroupsException.
- 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
(None)
- Note
If
thishas been run until finished, then this function can determine the size of the semigroup represented bythiseven if it is infinite. Moreover, the complexity of this function is at worst \(O(mn)\) where \(m\) is the number of letters in the alphabet, and \(n\) is the number of nodes in the KnuthBendix::gilman_digraph.