KnuthBendixCongruenceByPairs¶

class KnuthBendixCongruenceByPairs : public libsemigroups::CongruenceByPairs<FroidurePin<detail::KBE, FroidurePinTraits<detail::KBE, fpsemigroup::KnuthBendix>>>¶
Defined in
congpair.hpp
.On this page, we describe the functionality relating to the brute force enumeration of pairs of elements belonging to a congruence (of any type) that is implemented in the class KnuthBendixCongruenceByPairs. This class is derived from CongruenceByPairs and implements the same algorithm. The only difference is that KnuthBendixCongruenceByPairs runs the KnuthBendix algorithm (see fpsemigroup::KnuthBendix) to completion, and then runs the brute force enumeration of pairs on the semigroup represented by the output of fpsemigroup::KnuthBendix. If the semigroup represented by the output of fpsemigroup::KnuthBendix is infinite, but the number of pairs belonging to the congruence represented by a KnuthBendixCongruenceByPairs instance is finite, then KnuthBendixCongruenceByPairs will terminate eventually, where as CongruenceByPairs would not (since it would attempt to enumerate the infinite semigroup represented by the output of fpsemigroup::KnuthBendix first).
See also
congruence_kind, tril, and CongruenceByPairs.
 Example
fpsemigroup::KnuthBendix kb; kb.set_alphabet(3); kb.add_rule({0, 1}, {1, 0}); kb.add_rule({0, 2}, {2, 0}); kb.add_rule({0, 0}, {0}); kb.add_rule({0, 2}, {0}); kb.add_rule({2, 0}, {0}); kb.add_rule({1, 2}, {2, 1}); kb.add_rule({1, 1, 1}, {1}); kb.add_rule({1, 2}, {1}); kb.add_rule({2, 1}, {1}); KnuthBendixCongruenceByPairs kbp(twosided, kb); kbp.add_pair({0}, {1}); kbp.number_of_non_trivial_classes(); // == 1 kbp.cbegin_ntc()>size(); // == 5
Member types¶
Type for indices of congruence class indices. 

Type for a 

Type for a 

Type for nontrivial classes. 
Constructors¶

Construct a 

Construct a 
Deleted constructors¶
Deleted. 


Deleted. 

Deleted. 
Deleted. 

Deleted. 
Member functions inherited from CongruenceInterface¶

Add a generating pair to the congruence. 
Add a generating pair to the congruence. 

Returns a const iterator pointing to the first generating pair. 

Returns a const iterator pointing to the first nonsingleton class. 

Returns a const iterator pointing oneaftertheend of the last generating pair. 

Returns a const iterator pointing onepasttheend of the last nonsingleton class. 

Get a canonical representative of the 

Check if a pair of words is known to belong to the congruence. 

Check if a pair of words belongs to the congruence. 

Check if the congruence was constructed from a 

Check if the congruence was constructed from a 

Check if the quotient semigroup has been computed. 

Deterministically check if the quotient is finite. 

Deterministically check if the quotient is infinite. 

The handedness of the congruence (left, right, or 2sided). 

Compare the indices of the classes containing two words. 

Returns a shared pointer to the nontrivial classes. 

Compute the number of classes in the congruence. 

The number of generating pairs. 

The number of generators. 

The number of nonsingleton classes. 

Get the parent 

Get the parent 

Returns a semigroup represented as an instance of a derived class of 

Set the number of generators of the congruence. 

Convert a word into the index of the class containing it. 
Member functions inherited from Runner¶
Check if the runner is dead. 

Check if 

Stop 

Check if it is time to report. 

Get the minimum elapsed time between reports. 

Set the minimum elapsed time between reports. 

Set the minimum elapsed time between reports. 

Report why 

Run until 

Run for a specified amount of time. 

Run for a specified amount of time. 

Run until a nullary predicate returns 

Run until a nullary predicate returns 

Check if currently running. 

Check if the runner is currently running for a particular length of time. 

Check if the runner is currently running until a nullary predicate returns 

Check if 

Check if the runner is stopped. 

Check if the runner was, or should, stop because of the argument for 

Check if the amount of time passed to 