Plans on the basic graph functionality.
More...
Go to the source code of this file.
Detailed Description
Plans on the basic graph functionality.
 Todo:
 DONE Naming conventions

DONE "g" for graphs, "gl" for graphs with loops, "dg" for directed graph, "dgl" for directed graphs with loops, "gg" for general graph, and "gdg" for "general directed graph".

DONE "og" for ordered graphs, similarly "ogl", "odg", "odgl", "ogg" and "ogdg".

DONE For Maximagraphs we use "mg" and "mdg".

So for multigraphs we need to use the abbreviation "mug", for multigraphs with loops mugl, for directed multigraphs mudg, for directed multigraphs with loops mudgl, and finally omug, omugl, omudg, omudgl denote the ordered versions.

DONE There is a clash for "directed graphs":

Either we speak of "directed graphs", "directed multigraphs", "directed general graphs", or of "digraphs", "multidigraphs", "general digraphs".

The "digraph" has the advantage that there is no confusion about the order of adjectives.
 Todo:
 Graph concepts

DONE A "graph" is just a 2element list, consisting of the set of vertices, and a set of 2element vertex sets.

DONE A "graph with loops" also allows 1element vertex sets.

DONE A "general graph" is a triple [V,E,f], where V, E are sets and f is a map from E to 12element subsets of V.

DONE The same with directed graphs, only that this time we have vertexlists (always of size 2) instead of vertexsets.

There is also the (cryptomorphic) notion of a "precategory", which is a 4tuple [V,E,source,target]; abbreviation "precat".

Multigraphs:

A "multigraph" is a triple [V,E,f], where [V,E] is a graph, and f is a map which maps every element of E to a natural number (that is, >0).

While a "multigraph with loops" is similarly a triple [V,E,f] such that [V,E] is a graph with loops.

And a "directed multigraph" is a triple [V,E,f], where now the elements of E or pairs, while a "directed multigraph with loops" allows the elements of the pairs to be identical.

One could actually make the domain of f the set of all possible edges (directed or undirected, with or without loops), allowing then (of course) the value 0. Then possibly the edge set could be dropped.

We needed then to change all functions concerned with multi(di)graphs.

To compute the set of edges, one had to go through all possible edges (given the vertex set) and select those with a weight at least 1.

The basic possibilities are (i) with/without explicit edge set, (ii) allowing/disallowing zero multiplicities. Without explicit edge set, we need to allow zero multiplicities, while with it one could disallow (as now) or allow them (having then two possibilities for checking whether some edge is present).

At this time it seems best to avoid the further proliferation of graph types, and just stick to the current form of "multigraph", since yet there is no concrete motivation to consider further types.

Since also for general graphs the edge set needs to be given, we don't have the possibility of "lazy graph representations". Seems unavoidable  except that by changing the concept of a multigraph as above we can at least avoid to mention the edgeset.

"Oriented" versions:

An "oriented general digraph" has additionally a function o, defined on edgelabels and returning 1 or +1.

We use "or", so " orgdg, ordgl, ordg, and oorgdg,oordgl, and oordg.

From an oriented digraph one gets a digraph by oriented the edges accordingly.

Morphisms of oriented digraphs can additionally flip the orientations (and the result must be an ordinary morphism).

Shall we also use "oriented graphs", as graphs with such orientation functions, to be interpreted according to the natural order on vertices?

Standardisation of vertexnames:

From the point of view of the OKlibrary, the best choice for standard vertex sets would be {1,..,n}.

This coincides with mathematical conventions, and also 0 is not possible as a clausesetvariable.

However Maxima graphs by themselves are labelled starting with 0, and arrayindices start with 0 as well.

So well, when translating Maxima graphs to graphs we translate vertex names, if needed, to start with 1.

That is, when these or "original" Maxima graphs, which one can apparently recognise by the vertex list in reverse order, finishing with a zero.

Standardised graphs can be denoted by "stdg", "stdog" etc.

Given a vertex, we need the set of edges incident to the vertex; this can be handled via the dual hypergraph, but we should provide some more convenient methods.

Likely, our graphetcconcepts are conceptually appropriate, but when using or implementing algorithms then we should, if possible, use the maximagraphs.

How to handle "properties" ? DONE (these shall just be maps)

Can we tag such objects as being "graphs" ? DONE (we are living typefree)
 Todo:
 Subgraph concepts

Perhaps we should create "Subgraphs.mac".

Likely the subgraphs of ordered graphstypes should inherit the order(s).
Definition in file Basic.hpp.