# Cayley graphs¶

This page contains information about the member functions of the FroidurePinBase class related to left and right Cayley graphs.

inline element_index_type libsemigroups::FroidurePinBase::left(element_index_type i, letter_type j)

Returns the index of the product of a generator and an element.

Returns the index of the product of the generator with index j with the element in position i.

Complexity

At worst $$O(|S|n)$$ where $$S$$ is the semigroup represented by this, and $$n$$ is the return value of FroidurePin::number_of_generators.

Parameters
• i – the index of the element

• j – the index of the generator

Throws
Returns

A value of type element_index_type.

inline cayley_graph_type const &libsemigroups::FroidurePinBase::left_cayley_graph()

Returns a const reference to the left Cayley graph.

Complexity

At worst $$O(|S|n)$$ where $$S$$ is the semigroup represented by this, and $$n$$ is the return value of FroidurePin::number_of_generators.

Parameters

None.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A const reference to cayley_graph_type.

inline element_index_type libsemigroups::FroidurePinBase::right(element_index_type i, letter_type j)

Returns the index of the product of an element and a generator.

Returns the index of the product of the element in position i with the generator with index j.

left.

Complexity

At worst $$O(|S|n)$$ where $$S$$ is the semigroup represented by this, and $$n$$ is the return value of FroidurePin::number_of_generators.

Parameters
• i – the index of the element

• j – the index of the generator

Throws
Returns

A value of type element_index_type.

inline cayley_graph_type const &libsemigroups::FroidurePinBase::right_cayley_graph()

Returns a const reference to the right Cayley graph.

Complexity

At worst $$O(|S|n)$$ where $$S$$ is the semigroup represented by this, and $$n$$ is the return value of FroidurePin::number_of_generators.

Parameters

None.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A const reference to cayley_graph_type.