[Nauty] counting graphs

Brendan McKay bdm at cs.anu.edu.au
Thu Dec 5 19:25:01 EST 2002


It isn't GAP, it's Maple.  Converting to C would be a lot
of work because it relies on the symmetric function package
SF that you would also need to convert.  If anyone wants
Maple code for counting graphs I can provide the procedures
I wrote with Gordon Royle some years ago.  They would also
be a chore to convert to C as they use series expansions.
You would also need to use a multiprecision package.

All graphs (not necessarily connected):

                                     1, 1
                                     2, 2
                                     3, 4
                                     4, 11
                                     5, 34
                                    6, 156
                                    7, 1044
                                   8, 12346
                                   9, 274668
                                 10, 12005168
                                11, 1018997864
                               12, 165091172592
                              13, 50502031367952
                             14, 29054155657235488
                           15, 31426485969804308768
                          16, 64001015704527557894928
                        17, 245935864153532932683719776
                      18, 1787577725145611700547878190848
                    19, 24637809253125004524383007491432768
                  20, 645490122795799841856164638490742749440
               21, 32220272899808983433502244253755283616097664
             22, 3070846483094144300637568517187105410586657814272
          23, 559946939699792080597976380819462179812276348458981632
       24, 195704906302078447922174862416726256004122075267063365754368
    25, 131331393569895519432161548405816890146389214706146483380458576384

Execution time (1GHz Pentium) about 20 seconds.

Brendan.

> Presumably "GAP" - language. See below.
> Someone can use it in GAP or knows how to convert it to C ?
> 
> #
> # graph - count unlabeled graphs via the Polya-Redfield method.
> #
> # Calling sequence:
> #  graph(n)
> #  graph(n,a)
>...




More information about the Nauty mailing list