1
C-280 COMPUTER PHYSICS COMMUNICATIONS 8 (1974) 320-328. NORTH-HOLLAND PUBLISHING COMPANY COMPUTER GENERATION OF CONNECTED GRAPHS D.C. RAPAPORT Physics Department, Bar-llan University, Ramat-Gan, Israel Received 26 June 1974 PROGRAM SUMMARY Title o f program: GRAFFITI Catalogue number: ACOA Computer: IBM 360/50; Installation: Bar-llan University Operath~g system: HASP/OS/MFT Programming language used: FORTRAN IV High speed storage required: 20K words No. of bits in a word: 32 Overlay structure: No ne No. o f magnetic tapes required: None Other peripherals used: Card reader, line printer, scratch disk, card punch (optional) No. of cards in combined program and test deck: 635 Keywords: Solid state, statistical mechanics, cluster expan- sions, cooperative pjenomena, critical exponents, diagram matic expansions, ferromagnetism, graphical enumeration, Ising model, lattice statistics, perturbation theory, phase transi- tions, series expansions. Nature of the physical problem The most successful technique currently used in studying the behaviour of magnetic spin models (e.g., the lsing model) near their phase transitions is the series expansion method [ 1 ]. Generation of the coefficients of these expansions i'equires the availability of a list of suitable graphs, the type of graph required depending on the quantity being expanded. The computer program described here generates the connected graphs used in a study of the lsing model with impurities [2]. Graphs required for other kinds of perturbation expansion in statistical mechanics, quantum electrodynamics, or many- body theory, can either be obtained from this list of connected graphs, or generated directly using appropriately modified versions of the program. Method of solution Graphs are generated iteratively in order of increasing edge and vertex numbers by adding additional edges to already existing graphs. The problem is to do this efficiently and, be- cause most graphs can be generated in more than one way, to en- sure that the graphs in the final list are all distinct. The de- gree of overgeneration is reduced by taking into account the graph symmetry, and the problem of determining whether or not graphs are distinct is overcome by developing a canonical labelling scheme for the graphs. Restrictions on complexity The maximum graph size is set by the array dimensions and the scheme used in packing the graph adjacency matrices. Both are easily altered. The real limitation is execution time due to the rapid increase in graph numbers as more edges are added. Typical runnhlg times 709 graphs with 7 vertices and 6 to 13 edges were generated in approx. 500 sec, and 834 graphs with 8 vertices and 7 to 10 edges in approx. 1000 see on the IBM 360/50 computer. References [ 1 ] C. Domb and M.S. Green (eds.), Phase transitions and critical phenomena, vol. 3 (Academic Press, London, 1974). [2] D.C. Rapaport, J. Phys. C 5 (1972) 1830, 2813.

Computer generation of connected graphs

Embed Size (px)

Citation preview

Page 1: Computer generation of connected graphs

C-280

COMPUTER PHYSICS COMMUNICATIONS 8 (1974) 320-328. NORTH-HOLLAND PUBLISHING COMPANY

COMPUTER GENERATION OF CONNECTED GRAPHS

D.C. RA PA PO RT

Physics Department, Bar-llan University, Ramat-Gan, Israel

Received 26 June 1974

PRO G RA M SUMMARY

Title of program: GRAFFITI

Catalogue number: ACOA

Computer: IBM 360/50; Installation: Bar-llan University

Operath~g system: HASP/OS/MFT

Programming language used: FORTRAN IV

High speed storage required: 20K words

No. of bits in a word: 32

Overlay structure: No ne

No. of magnetic tapes required: None

Other peripherals used: Card reader, line printer, scratch disk, card punch (optional)

No. of cards in combined program and test deck: 635

Keywords: Solid state, statistical mechanics, cluster expan- sions, cooperative pjenomena, critical exponents, diagram matic expansions, ferromagnetism, graphical enumeration, Ising model, lattice statistics, perturbation theory, phase transi- tions, series expansions.

Nature of the physical problem The most successful technique currently used in studying the behaviour of magnetic spin models (e.g., the lsing model) near their phase transitions is the series expansion method [ 1 ]. Generation of the coefficients of these expansions i'equires the availability of a list of suitable graphs, the type of graph required depending on the quantity being expanded. The computer program described here generates the connected

graphs used in a study of the lsing model with impurities [2]. Graphs required for other kinds of perturbation expansion in statistical mechanics, quantum electrodynamics, or many- body theory, can either be obtained from this list of connected graphs, or generated directly using appropriately modified versions of the program.

Method of solution Graphs are generated iteratively in order of increasing edge and vertex numbers by adding additional edges to already existing graphs. The problem is to do this efficiently and, be- cause most graphs can be generated in more than one way, to en- sure that the graphs in the final list are all distinct. The de- gree of overgeneration is reduced by taking into account the graph symmetry, and the problem of determining whether or not graphs are distinct is overcome by developing a canonical labelling scheme for the graphs.

Restrictions on complexity The maximum graph size is set by the array dimensions and the scheme used in packing the graph adjacency matrices. Both are easily altered. The real limitation is execution time due to the rapid increase in graph numbers as more edges are added.

Typical runnhlg times 709 graphs with 7 vertices and 6 to 13 edges were generated in approx. 500 sec, and 834 graphs with 8 vertices and 7 to 10 edges in approx. 1000 see on the IBM 360/50 computer.

References [ 1 ] C. Domb and M.S. Green (eds.), Phase transitions and

critical phenomena, vol. 3 (Academic Press, London, 1974).

[2] D.C. Rapaport, J. Phys. C 5 (1972) 1830, 2813.