Konieczny

class Konieczny

This page contains the documentation for functionality in libsemigroups_pybind11 for Konieczny's algorithm described in the article Green's equivalences in finite semigroups of binary relations by Janusz Konieczny. This algorithm is similar to that of Lallement and McFadden in this paper. It differs in being applicable to subsemigroups of a non-regular semigroup, though is essentially the same algorithm for elements which happen to be regular.

A Konieczny instance is defined by a generating set, and the main function is Konieczny.run(), which implements Konieczny's Algorithm. If Konieczny.run() is invoked and Konieczny.finished() returns True, then the size, partial order of \(\mathscr{D}\)-classes, and frames for each \(\mathscr{D}\)-class are known.

While Konieczny is not a class the objects returned by Konieczny have identical methods, and so we document Konieczny as if it was a class.

Constructors

Konieczny.__init__()

Construct from list of generators.

Generators

Konieczny.add_generator()

Add a copy of an element to the generators.

Konieczny.number_of_generators()

Returns the number of generators.

Konieczny.generator()

Returns the generator with specified index.

Konieczny.generators()

Returns an iterator pointing to the first generator.

Membership

Konieczny.contains()

Test membership of an element.

Konieczny.__contains__()

Test membership of an element.

Attributes

Konieczny.degree()

Returns the degree of any and all elements.

Konieczny.size()

Returns the size.

Konieczny.current_size()

Returns the current size.

Idempotents

Konieczny.number_of_idempotents()

Returns the number of idempotents.

Konieczny.current_number_of_idempotents()

Returns the current number of idempotents.

Green's relations

Konieczny.is_regular_element()

Test regularity of an element.

Konieczny.D_class_of_element()

Returns the \(\mathscr{D}\)-class containing an element.

Konieczny.D_classes()

Returns an iterator pointing to the first \(\mathscr{D}\)-class.

Konieczny.regular_D_classes()

Returns an iterator pointing to the first regular \(\mathscr{D}\)-class.

Konieczny.number_of_D_classes()

Returns the number of \(\mathscr{D}\)-classes.

Konieczny.number_of_L_classes()

Returns the number of \(\mathscr{L}\)-classes.

Konieczny.number_of_R_classes()

Returns the number of \(\mathscr{R}\)-classes.

Konieczny.number_of_H_classes()

Returns the number of \(\mathscr{H}\)-classes.

Konieczny.current_number_of_D_classes()

Returns the current number of \(\mathscr{D}\)-classes.

Konieczny.current_number_of_L_classes()

Returns the current number of \(\mathscr{L}\)-classes.

Konieczny.current_number_of_R_classes()

Returns the current number of \(\mathscr{R}\)-classes.

Konieczny.current_number_of_H_classes()

Returns the current number of \(\mathscr{H}\)-classes.

Konieczny.number_of_regular_D_classes()

Returns the number of regular \(\mathscr{D}\)-classes.

Konieczny.number_of_regular_L_classes()

Returns the number of regular \(\mathscr{L}\)-classes.

Konieczny.number_of_regular_R_classes()

Returns the number of regular \(\mathscr{R}\)-classes.

Konieczny.current_number_of_regular_D_classes()

Returns the number of regular \(\mathscr{D}\)-classes.

Konieczny.current_number_of_regular_L_classes()

Returns the number of regular \(\mathscr{L}\)-classes.

Konieczny.current_number_of_regular_R_classes()

Returns the number of regular \(\mathscr{R}\)-classes.

Running and reporting

Konieczny.enumerate()

Enumerate until at least a specified number of elements are found.

Konieczny.run()

Run the algorithm until it finishes.

Konieczny.run_for()

Run for a specified amount of time.

Konieczny.run_until()

Run until a nullary predicate returns True or finished().

Konieczny.kill()

Stop running the algorithm (thread-safe).

Konieczny.dead()

Check if the runner is dead.

Konieczny.finished()

Check if the main algorithm has been run to completion or not.

Konieczny.started()

Check if run() has been called at least once before.

Konieczny.report()

Check if it is time to report.

Konieczny.report_every()

Set the minimum elapsed time between reports.

Konieczny.report_why_we_stopped()

Report why we stopped.

Konieczny.running()

Check if currently running.

Konieczny.timed_out()

Check if the main algorithm has or should timed out.

Konieczny.stopped()

Check if the main algorithm has or should stop.

Konieczny.stopped_by_predicate()

Check if the main algorithm was, or should be, stopped by the nullary predicate passed as first argument to run_until().