Pregraphs |
HomeAuthorsGunnar Brinkmann Nico Van Cleemput Tomaž Pisanski |
IntroductionHere you will find the generator and related programs described in the paper G.Brinkmann, N. Van Cleemput and T. Pisanski, Generation of various classes of trivalent graphs, Theoretical Computer Science, Volume 502, 2 september 2013, p.16-29, doi: 10.1016/j.tcs.2012.01.018 The generator and filtersDownloadThe pregraphs project is released under the GNU General Public License (GPL) with the following copyright notice Copyright (C) 2010-2011 Universiteit Gent 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 the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License can be found in the file LICENSE.txt provided with the source distribution of this program (see the META-INF directory in the source jar). This license can also be found on the GNU website at http://www.gnu.org/licenses/gpl.html. If you did not receive a copy of the GNU General Public License along with this program, contact the lead developer, or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.You can download the source files here: pregraphs-sources.zip/pregraphs-sources.tar.gz. You can also visit the GitHub page of this project. Build
There are some special make targets which you might want to use:
Besides these targets there are several flags that can be set to make pregraphs print out more detailed statistics and/or debugging information about the generation process. The most general of these two are _PROFILE and _DEBUG. If you like to see huge amounts of texts scrolling on your window, then use these flags, but otherwise these flags just make the program slower and aren't useful unless you're modifying the program. For more detail you'll have to look at the header files. Usage
The program pregraphs calculates pregraphs of a given order n. Valid options:
ExamplesIf you want to count all bipartite multigraphs with 4 vertices you use the following command: ./pregraphs -MB 4The output will then be: Generating bipartite multigraphs with 4 vertices. Found 1 pregraph with 4 vertices. CPU time: 0.0 seconds.If you want to view this graph as a simple table, you can use the output option and write the graph to a table: ./pregraphs -MB -oh 4The output will then be: Generating bipartite multigraphs with 4 vertices. ============================== | Graph number: 1 | | Number of vertices: 4 | ============================== | 1 || 4 | 2 | 2 || | 2 || 1 | 3 | 1 || | 3 || 2 | 4 | 4 || | 4 || 3 | 1 | 3 || ============================== Found 1 pregraph with 4 vertices. CPU time: 0.0 seconds.If you want to store this graph in a file named bipartite_multigraph.code, you write the following: ./pregraphs -MB -oc 4 > bipartite_multigraph.codeIf you want to check whether this graph has a 2-factor where each component is a quotient of a 4-cycle, you can do this using: ./pregraphs -MBq -oc 4The output will then be: Generating bipartite multigraphs with 4 vertices and filtering graphs that have a 2-factor where each component is a quotient of a 4-cycle. Found 1 pregraph with 4 vertices. CPU time: 0.0 seconds. Utility programsThe pregraphs project also includes several small utility programs which might come in handy when working with the generator and/or the filter programs. We just list a small description of the programs here. If you need help using them, please contact us.
The format pregraph_codeThe standard output format for the generator and the filters is pregraph_code. This code is based upon multicode. It is a binary code structured as follows.
The convention is to give the filename the extension .code. The file starts with a header this header is one of >>pregraph_code<<,
>>pregraph_code le<< or >>pregraph_code be<<. The first two headers mean that little endian is used, the third
that big endian is being used (see later). Pregraph ViewerFiles containing pregraphs encoded in the pregraph_code format can be viewed using the program Pregraph Viewer. This program uses Java (5.0 or later) and is available for Windows and UNIX (GNU Linux and Mac OS X).
Pregraph Viewer is released under the GNU General Public License (GPL) with the following copyright notice Copyright (C) 2010-2011 Universiteit Gent 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 the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License can be found in the file LICENSE.txt provided with the source distribution of this program (see the META-INF directory in the source jar). This license can also be found on the GNU website at http://www.gnu.org/licenses/gpl.html. If you did not receive a copy of the GNU General Public License along with this program, contact the lead developer, or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Pregraph Viewer uses the following open source software:
Embedded pregraphsPregraph Viewer introduces a new file format: embedded pregraphs. When opening a pregraph_code file Pregraph Viewer tries to embed that graph using a random embedder and a force directed embedder. You can rearrange these embedding using the mouse. Afterwards you might want to save these changed embeddings. You can do this by using the menu item Save list of embedded pregraphs. This uses an XML-based format to store the graphs. The default extension for these files is .epxml. The root element is embeddedpregraphs. This element contains one or more embeddedpregraph elements. Each of these contains exactly one vertices element and
one edges element. RemarksIf you download any of these files, we would appreciate to receive an e-mail which lets us know that you have done so. |