Skip to content

Commit

Permalink
sagemathgh-38321: Implemented generators for some small graphs/ digraphs
Browse files Browse the repository at this point in the history
    
<!-- ^ Please provide a concise and informative title. -->
This PR adds generators for the Bicorn graph, the Tricorn graph, the
Murty graph, the KohTindell digraph, the Cubeplex Graph and the Twinplex
graph.
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
This PR introduces new static methods, specifically `BicornGraph`,
`TricornGraph`, `MurtyGraph`, `KohTindellDiGraph`, `CubeplexGraph` and
`TwinplexGraph`.
<!-- v Why is this change required? What problem does it solve? -->
There is no current implementation of the generators for the above
mentioned graphs/ digraphs.
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->
Fixes sagemath#38320.


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
Nothing as of now (up to my knowledge).
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

cc: @dcoudert.
    
URL: sagemath#38321
Reported by: Janmenjaya Panda
Reviewer(s): David Coudert, Janmenjaya Panda
  • Loading branch information
Release Manager committed Sep 18, 2024
2 parents 0f6c22d + 1897136 commit 18e499f
Show file tree
Hide file tree
Showing 4 changed files with 607 additions and 6 deletions.
37 changes: 37 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,11 @@ REFERENCES:
for closed Riemannian manifolds*, Ann. of Math. (2) 45 (1944),
747–752.
.. [CHNP2020] Kieran Clancy, Michael Haythorpe, Alex Newcombe and Ed Pegg Jr,
*There Are No Cubic Graphs on 26 Vertices with Crossing Number 10
or 11*, Graphs and Combinatorics 36, pages: 1713 -- 1721, (2020),
:doi:`10.1007/s00373-020-02204-6`.
.. [CP2023] \M. Cati and D.V. Pasechnik.
*Implementing Hadamard Matrices in SageMath*.
Preprint, :arxiv:`2306.16812`, (2023).
Expand Down Expand Up @@ -1700,6 +1705,10 @@ REFERENCES:
bi-matrix
games*. http://vknight.org/unpeudemath/code/2015/06/25/on_testing_degeneracy_of_games/ (2015)
.. [CKWL2019] Marcelo H. de Carvalho, Nishad Kothari, Xiumei Wang and Yixun
Linc. *Birkhoff-von Neumann graphs that are PM-compact*. 2019.
:doi:`10.48550/arXiv.1807.07339`.
.. [CL1996] Chartrand, G. and Lesniak, L.: *Graphs and Digraphs*.
Chapman and Hall/CRC, 1996.
Expand All @@ -1725,6 +1734,11 @@ REFERENCES:
.. [CLG1997] Frank Celler and C. R. Leedham-Green,
*Calculating the Order of an Invertible Matrix*, 1997
.. [CLM2006] Marcelo H. de Carvalho, Cláudio L. Lucchesi and U.S.R. Murty,
*How to build a brick*, Discrete Mathematics, Volume 306,
Issues 19--20, Pages 2383--2410,ISSN 0012--365X, (2006),
:doi:`10.1016/j.disc.2005.12.032`.
.. [CLRS2001] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
and Clifford Stein, *Section 22.4: Topological sort*,
Introduction to Algorithms (2nd ed.), MIT Press and
Expand Down Expand Up @@ -2621,6 +2635,11 @@ REFERENCES:
Wehler K3 Surfaces over finite fields*. New Zealand Journal
of Mathematics 45 (2015), 19–31.
.. [FiLi2001] Ilse Fischer and Charles H.C. Little, *A Characterisation of
Pfaffian Near Bipartite Graphs*, Journal of Combinatorial Theory,
Series B, vol. 82, issue 2, (2001), pages: 175 -- 222, ISSN:
0095 -- 8956, :doi:`10.1006/jctb.2000.2025`.
.. [Fil2017] Ivana Filipan, *An Invitation to Combinatorial Tropical Geometry*.
Conference: 1st Croatian Combinatorial Days. 2017.
:doi:`10.5592/CO/CCD.2016.05`.
Expand Down Expand Up @@ -3943,6 +3962,10 @@ REFERENCES:
47:95-104, 1997.
:doi:`10.1023/A:1022444205860`
.. [KM2015] Nishad Kothari and U.S.R. Murty. *K4-free and C6¯-free Planar
Matching Covered Graphs.* Journal of Graph Theory. 82. (2015)
:doi:`10.1002/jgt.21882`.
.. [KMAUTOM2000] Masayuki Kanda, Shiho Moriai, Kazumaro Aoki, Hiroki Ueda,
Youichi Takashima, Kazuo Ohta, and Tsutomu Matsumoto,
*E2 - a new 128-bit block cipher*; in IEICE Transactions on
Expand Down Expand Up @@ -4484,6 +4507,11 @@ REFERENCES:
IEEE Trans. Inf. Th. 25(1979), 1-7.
:doi:`10.1109/TIT.1979.1055985`.
.. [Lov1983] László Lovász,
*Ear-decompositions of matching-covered graphs*,
Combinatorica 3, 105--117 (1983)
:doi:`10.1007/BF02579346`.
.. [LP2007] \G. Leander and A. Poschmann,
*On the Classification of 4 Bit S-boxes*; in WAIFI, (2007), pp. 159-176.
Expand Down Expand Up @@ -5164,6 +5192,10 @@ REFERENCES:
:doi:`10.1007/s00453-006-1225-y`,
http://www.cs.uoi.gr/~stavros/C-Papers/C-2004-SODA.pdf
.. [NT2007] Serguei Norine and Robin Thomas. *Minimally Non-Pfaffian Graphs*.
Combinatorica, vol. 27, no. 5, pages: 587 -- 600, Springer. 2007.
:doi:`10.1016/j.jctb.2007.12.005`.
.. [Nur2004] K. Nurmela. *Upper bounds for covering arrays by tabu search*.
Discrete Applied Math., 138 (2004), 143-152.
Expand Down Expand Up @@ -5675,6 +5707,11 @@ REFERENCES:
.. [RS2012] G. Rudolph and M. Schmidt, "Differential Geometry and Mathematical Physics.
Part I. Manifolds, Lie Groups and Hamiltonian Systems", Springer, 2012.
.. [RST2019] Neil Robertson, Paul Seymour and Robin Thomas, *Excluded minors in
cubic graphs*, Journal of Combinatorial Theory, Series B, vol. 138,
(2019), pages: 219 -- 285, ISSN: 0095 -- 8956,
:doi:`10.1016/j.jctb.2019.02.002`.
.. [RSW2011] Victor Reiner, Franco Saliola, Volkmar Welker.
*Spectra of Symmetrized Shuffling Operators*.
:arxiv:`1102.2460v2`.
Expand Down
29 changes: 23 additions & 6 deletions src/sage/graphs/digraph_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- Emily A. Kirkman (2006)
- Michael C. Yurko (2009)
- David Coudert (2012)
- Janmenjaya Panda (2024)
Functions and methods
---------------------
Expand All @@ -58,6 +59,7 @@
# and Emily A. Kirkman
# Copyright (C) 2009 Michael C. Yurko <myurko@gmail.com>
# Copyright (C) 2012 David Coudert <david.coudert@inria.fr>
# Copyright (C) 2024 Janmenjaya Panda <janmenjaya.panda.22@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -891,6 +893,9 @@ def Circulant(self, n, integers):
r"""
Return a circulant digraph on `n` vertices from a set of integers.
A circulant digraph of order `n` has an arc from vertex `i` to
vertex `i+j \pmod{n}`, for each `j` in ``integers``.
INPUT:
- ``n`` -- integer; number of vertices
Expand All @@ -899,18 +904,30 @@ def Circulant(self, n, integers):
that there is an edge from `i` to `j` if and only if `(j-i) \pmod{n}`
is an integer
EXAMPLES::
EXAMPLES:
sage: digraphs.Circulant(13,[3,5,7])
Circulant graph ([3, 5, 7]): Digraph on 13 vertices
Construct and show the circulant graph [3, 5, 7], a digraph on 13
vertices::
TESTS::
sage: g = digraphs.Circulant(13, [3, 5, 7])
sage: g.show() # long time # needs sage.plot
The Koh-Tindell digraph [LM2024]_ is the circulant digraph of order 7
with parameters `[1, 5]`. This `2`-diregular digraph is
vertex-transitive but not arc-transitive. The associated bipartite
digraph of the Koh-Tindell digraph is a Pfaffian orientation of the
Heawood graph. Construct and show the Koh-Tindell digraph::
sage: kohTindellDigraph = digraphs.Circulant(7, [1, 5])
sage: kohTindellDigraph.show() # long time # needs sage.plot
TESTS:
sage: digraphs.Circulant(13,[3,5,7,"hey"])
sage: digraphs.Circulant(13, [3, 5, 7, "hey"])
Traceback (most recent call last):
...
ValueError: the list must contain only integers
sage: digraphs.Circulant(3,[3,5,7,3.4])
sage: digraphs.Circulant(3, [3, 5, 7, 3.4])
Traceback (most recent call last):
...
ValueError: the list must contain only integers
Expand Down
Loading

0 comments on commit 18e499f

Please sign in to comment.