Commit e7152871 authored by Radek Hušek's avatar Radek Hušek
Browse files

groupConnectivityNaive: add Zkn

parent ebf7b625
from sage.graphs.graph import Graph, DiGraph
from sage.rings.finite_rings.integer_mod_ring import Integers
def Zkn(k, n):
Zk = Integers(k)
return Zk.cartesian_product( *([Zk] * (n - 1)) )
def prettifyGraph(G_):
"""Convert graph into directed one and number its edges."""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment