Plans for the module on computing hypergraph transversals of size at most k.
More...
Go to the source code of this file.
Detailed Description
Plans for the module on computing hypergraph transversals of size at most k.
 Todo:
 Connections to other modules
 Todo:
 Trivial algorithm for input G, k

The task is to find a transversal T with T <= k.

Outline of the algorithm:

Another input is a vertex set T of size <= k, to be extended to a transversal of size at most k.

If all hyperedges are covered, return T.

Otherwise, if T is of size = k, then return "impossible".

Otherwise choose some hyperedge H which is not hit by T, and for all v in H try recursively T + {v}.

If a minimal transversal T is needed (w.r.t. setinclusion), then by some heuristics unnecessary vertices in T are removed (iteratively).

For the choice of H the simplest heuristics is to choose a smallest H.

Simplest to order the hyperedges once at the beginning.

Stronger if the hypergraph datastructure gives access to the current smallest hyperedge; but this is not enough, we need the smallest *uncovered* hyperedge (one whose size has not changed since the beginning).

For the order of vertices, the simplest heuristics is to order them in descending degree.

Special services needed from the hypergraph:

Necessary is a largest hyperedge.

For heuristical purposes a smallest hyperedge (strongest: amongst the untouched hyperedges).

For heuristical purposes a vertex of largest degree.
 Todo:
 An "eager, binary" variation of the (above) trivial algorithm

The algorithms transversals_be, transversals_bes in ComputerAlgebra/Hypergraphs/Lisp/Transversals/Bounded/MaintainingBound.mac implement the above algorithm, but with the following two differences:

Above we use "clause branching", while these algorithms use binary branching; this should be better.

Above the handling of the hypergraph is "lazy" (not performing the assignment), while these algorithms are "eager" (actually performing the assignment).

DONE (implemented transversals_bvs, but without any further embellishments) We should directly implement the algorithms transversals_be, transversals_bes in C++:

As a first prototype for the concept of hypergraphs as (just) containers of hyperedges; here perhaps using std::vector for the list, and std::set for the hyperedges.

A simple generic strategy provides the possibility to use different heuristics for the choice of the branching vertex.

For vertices we just have integers in mind (but this is not hardcoded).

This would extend the already existing "nonabstract" hypergraph concepts; programming at this level quite similar to the Maxima/Lisp level.

Compare also the point below about enumerating all transversals.
 Todo:
 Enumerating all transversals T with T <= k

The above trivial algorithm also enumerates all transversals T with T <= k, when just continuing the process until the end.

However, to really obtain all such transversals, one needs to use the set of formal vertices, not just those left over.

One should construct a little example.

Of course, we are not interesting in computing all transversals (from the minimal transversals we trivially could obtain them by padding), but the point is that considering only the existing vertices already achieves some simple form of "tree pruning".

See the specification of transversals_be in ComputerAlgebra/Hypergraphs/Lisp/Transversals/Bounded/MaintainingBound.mac.

However now we really only want to find minimal transversals (w.r.t. inclusion).

This can be achieved by computing all and then applying subsumption elimination, but we need also more efficient solutions.

It seems natural, as above for a transversal T found just to minimise it (trivially), and then to prune parts of the tree which cannot contribute a minimal transversal anymore. This process is similar to tree pruning ("intelligent backtracking") for SAT.

Of course, if k is at most the transversal number, then no further steps are needed; this situation arises naturally when either searching for a minimum transversal from below, or when computing transversal numbers for monotonically increasing sequences of hypergraphs (at one new vertex at each step); see Experimentation/Investigations/RamseyTheory/VanderWaerdenProblems/Transversals/plans/general.hpp.

Perhaps actually such pruning cannot be done efficiently? It should be the case that when branching on a still occurring vertex, then the subtree contains at least one minimal transversal (if not already some superfluous vertex has been included)?
 Todo:
 Application BoundedTransversals_bv

Perhaps we should provide some variations.

Instead of using sets sorted by size one could just use sets (this should be slower).

Instead of using std::set, one could use std::vector, and sort it when needed.

The various setoperation used in Transversals::Bounded_transversals_bv should be provided independently, so that the code becomes clearer.

And G_with_a could be a vector.
 Todo:
 As generalisedSAT algorithms

The above algorithms can be viewed as very simple backtracking generalisedSAT solvers, where the condition on the number of 1settings in the partial assignment is integrated into the backtracking mechanism.
 Todo:
 Overview on more sophisticated algorithms
Definition in file general.hpp.