Boolean graphs

The boolean_graph module defines the BooleanGraph class, which represents a Graph whose order is a power of 2.

AUTHORS:

  • Paul Leopardi (2017-11-11): initial version

class boolean_cayley_graphs.boolean_graph.BooleanGraph(*args, **kwargs)[source]

Bases: sage.graphs.graph.Graph, boolean_cayley_graphs.saveable.Saveable

A Graph whose order is a power of 2.

EXAMPLES:

sage: from boolean_cayley_graphs.boolean_graph import BooleanGraph
sage: g16 = BooleanGraph(16)
sage: g16.order()
16

TESTS:

sage: from boolean_cayley_graphs.boolean_graph import BooleanGraph
sage: g16 = BooleanGraph(16)
sage: print(g16)
Graph on 16 vertices
is_linear_isomorphic(other, certificate=False, algorithm='sage')[source]

Check that the two BooleanGraphs self and other are isomorphic and that the isomorphism is given by a GF(2) linear mapping on the vector space of vertices.

INPUT:

  • self – the current object.

  • other – another object of class BooleanFunctionImproved.

  • certificate – bool (default False). If true, return a GF(2) matrix

    that defines the isomorphism.

OUTPUT:

If certificate is false, a bool value. If certificate is true, a tuple consisting of either (False, None) or (True, M), where M is a GF(2) matrix that defines the isomorphism.

EXAMPLES:

sage: from boolean_cayley_graphs.boolean_function_improved import BooleanFunctionImproved
sage: from boolean_cayley_graphs.boolean_graph import BooleanGraph
sage: bf1 = BooleanFunctionImproved([0,1,0,0])
sage: cg1 = BooleanGraph(bf1.cayley_graph())
sage: bf2 = BooleanFunctionImproved([0,0,1,0])
sage: cg2 = BooleanGraph(bf2.cayley_graph())
sage: cg1.is_linear_isomorphic(cg2)
True
sage: cg2.is_linear_isomorphic(cg1, certificate=True)
(
      [0 1]
True, [1 0]
)