# Generalized sierpinski graph construction

How do we construct the generalised sierpinski graph $S[n,k]$ which has order $nk$ and size $\frac{(k+1)n(n-1)}{2}$ in SageMath. The graphs.SierpinskiGasketGraph is just the graph $S[3,k]$. But I want to generalise this. Is there any direct command available? Thanks beforehand.

edit retag close merge delete

Sort by Â» oldest newest most voted

See https://trac.sagemath.org/ticket/33854. This is the generalized Sierpinski graphs generator as proposed in [1]. To get a Sierpinski graph, it suffices to call the generator with a clique.

Note that the Sierpinski-Gasket graphs are not isomorphic to Sierpinski graphs. The construction is different.

[1] Sylvain Gravier, Matjaz Kovse and Aline Parreau. Generalized Sierpinski graphs. Poster, European Conference on Combinatorics, Graph Theory and Applications (EuroCombâ€™11), Budapest, 2011. https://www.renyi.hu/conferences/ec11...

more

How do we call the function, like is it graphs.GeneralizedSierpinskiGraph or should we do from sage.graphs.GeneralizedSierpinskiGraphs import GneralizedSierpinskiGraph?

( 2022-05-30 12:15:57 +0200 )edit

The documentation of graphs.SierpinskiGasketGraph, which you can get with:

sage: graphs.SierpinskiGasketGraph?


tells that some generalization with two parameters can be found as graphs.HanoiTowerGraph.

If it is not what you are looking for, you can get the source code for the construction of (ungeneralized) Sierpinski gasket graphs, and try to generalize it with:

sage: graphs.SierpinskiGasketGraph??

more

Thanks!, I saw the source code, but I am afraid it looks complicated. I just dont understand how to scale it for any graph. From here,( preliminary portion), I must label the vertices in a certain way. Is that possible. And, moreover, when I define a function that uses graph as a parameter, I dont get the required base graph.

( 2022-05-13 20:02:04 +0200 )edit