
                Guide to the Programs that Found
             Counterexamples to the Poset Conjectures

                 John Stembridge <jrs@umich.edu>

  I. INTRODUCTION
 II. RUNNING TESTS
III. SUBPROGRAMS
 IV. PROCESSING THE RESULTS

I. INTRODUCTION

All of the programs here are written in Maple, except for one unix-style
shell script that can be used to launch particular search instances.
(Given that you were able to unpack this tar file, you probably have
access to a unix shell.)

Just about any version of Maple should work.

I'm assuming you have already have access to the companion paper,

  "Counterexamples to the Poset Conjectures
     of Neggers, Stanley, and Stembridge"

that goes with the programs. If not, get it here:

  <www.math.lsa.umich.edu/~jrs/papers.html>

The notation and terminology from the paper is used here, with one
important exception. In the paper, the labeling of a poset is specified
by the names of the vertices (usually {1,...,n} for some n). Here,
we use similar names for the vertices, but the names *DO NOT* specify
the labeling of the poset. Instead, we use the fact that the equivalence
class of a labeling may be specified by an acyclic orientation of the
covering relation. In this way, the labeling of a poset is specified by
a subset of the set of covering edges of the poset, signifying those
edges whose orientations are reversed from the orientation provided by
the poset.

In particular, the empty set specifies the equivalence class of a
natural labeling, and is independent of the names used for the vertices.

II. RUNNING TESTS

The main procedures are located in the 'programs' directory:

test_all_lab_e
test_all_lab_o
test_all_nat_e
test_all_nat_o
test_nar_lab_e
test_nar_lab_o
test_nar_nat_e
test_nar_nat_o

Read one of these files into a Maple session. It will load all
necessary subprograms, and define a procedure named 'testall'
Run the command 'testall(6)' to search for counterexample posets
on 6 vertices within the class relevant to this program.

The search parameters for these eight programs is
embedded into the name of each file:

  "nar" means "search only among narrow posets"
  "all" means "search all connected posets"
  "nat" means "search only among natural labelings"
  "lab" means "search among all labelings"
   "o"  means "ordinary"; i.e., look for NRZ posets
   "e"  means "enriched"; i.e., look for NRZ-bar posets

A Unix shell script 'runtest' is also provided to launch search instances.
Edit it first, so that it finds the executable for your (command-line)
version of Maple, and so that it directs output files into the directory
you specify.  For example, the shell command

  runtest nar lab o 6

would launch a search for narrow, arbitrarily labeled NRZ posets on 6
vertices, with all output results (including diagnostic information
about how many posets were tested, how much CPU time was consumed, etc)
written to a file in the designated output directory.

III. SUBPROGRAMS

The following subprograms are used by the test programs.

allrealzeros
  Test whether a (rational) polynomial has all real zeros.

fastW
  Compute the W-polynomial or W-bar-polynomial of a poset using the
  algorithm described in Section 2 of the paper.

ideals
  Generate the list of order ideals of a poset, sorted by increasing size.

posets2.2.1v.txt
  A copy of the posets package <www.math.lsa.umich.edu/~jrs/maple.html>.

traverse
  A program for visiting all isomorphism classes of posets on n vertices
  exactly once each. This is a minor modification of the version provided
  among the "example" applications in the posets package. See
    <www.math.lsa.umich.edu/~jrs/software/posetsexamples/traverse>.
  The version we provide here tracks both the covering relation and its
  transitive closure simultaneously, for improved performance.

narrow
  An analogue of 'traverse' for visiting all isomorphism classes of narrow
  posets of a given type. Note that we do not attempt to prune out
  isomorphic copies of a poset from the search tree. Instead, the task of
  pruning is left to...

canform
  Test whether a given (narrow) poset is lexicographically first among
  all isomorphic copies of it within the search tree. Optionally, we can
  also test whether the poset lexicographically precedes all copies
  of its dual within the search tree.

labelings
  A program to visit all equivalence classes of labelings of a poset P.
  Recalling that equivalence classes correspond to acyclic orientations
  of the covering relation of P, we specify the equivalence classes by
  subsets of the covering pairs of P--the subsets indicate which edges
  should have their orientation reversed from the way they occur in P.

orbitsquash
  Given a group of automorphisms of a poset P and a subset V of the
  covering relation of P, decide whether V is lexicographically first
  among all members of its orbit under the group action. This allows
  us to avoid processing more than one representative from each
  equivalence class of labelings of P. Optionally, we can also require
  V to lexicographically precede every member of the complementary orbit.

dualsquash
  This procedure returns true if the canonical labeling of the dual of
  a poset P precedes the canonical labeling of P in lexicographic order.
  This allows us to avoid processing both P and its dual. (Used only for
  searches of all labeled posets--otherwise it is too expensive.)

shift_equiv
  Test whether two labelings of a poset are shift-equivalent. This is not
  used by any of the searches, but is used by 'nrz' (see below).

IV. PROCESSING THE RESULTS

The directory 'rawdata' contains the raw output files from every search.
Log files that record the running times, space used, numbers of posets
tested, etc, are provided in the 'data' directory in the files

  all.log   searches of all connected posets
  nar.log   searches of narrow posets

The searches that produced actual instances of NRZ or
NRZ-bar posets are located in the 'rawdata' files 

  test_nar_lab_o_10.out
  test_nar_lab_e_11.out
  test_nar_nat_o_17.out

The posets embedded in these output files were extracted via 'grep'
and saved into files in the data directory:

  nrz.out       NRZ posets on 10 points
  nrzbar.out    NRZ-bar posets on 11 points
  natnrz.out    naturally labeled NRZ posets on 17 points

In the 'programs' directory,

  nrz
  nrzbar
  natnrzbar

are programs that process the above output files, verify that the
posets are indeed NRZ or NRZ-bar, and print the results in a format
suitable for human consumption. The results of this processing are
displayed on-line at <www.math.lsa.umich.edu/~jrs/data/pocon/>.

