Coedit is a program whose purpose is to compute a cograph completion, deletion or editing of an arbitrary graph given as input. It outputs the cotree of the obtained cograph. Coedit is composed of 3 files: coedit.c, cotree_prelim.c, semigraph prelim.c. The program is written in C language and can be compiled using: gcc -O3 -W -Wall -o coedit coedit.c A comprehensive list of options can be obtained by running the program with option -h: coedit -h Input graph format: ------------------- It is a text file formed as follows. The first line contains the number n of vertices in the graph. The n following lines contain two integers separated by a space: the first one is an integer v between 0 and n-1 that is the identifyer of vertex v; the second one is the number of neighbours of vertex v that have a smaller identifyer than v. Each of the remaining lines is for one edge of the graph. It contains two integers between 0 and n-1, separated by a space, that are the identifyers of the two end vertices of the edge. Each edge must appear exactly once and there must not be any blank line in the middle or at the end of the file. example of an input graph: --- 4 0 0 1 1 2 2 3 2 1 0 2 0 2 1 3 0 3 2 --- Output format for the cotree: ----------------------------- The first line contains the number p of nodes in the cotree (internal nodes + leaves). The second line contains 0 or 1: 0 if the root of the cotree is labelled parallel, 1 if the root is labelled series. The following p lines contains two integers separated by a space: the first one is the identifyer of the node v of the cotree (between 0 and n-1 for the leaves, as in the input graph, and between n and p-1 for the internal nodes of the cotree); the second one is the number of children of v in the cotree (0 iff v is a leaf). Each of the remaining lines is for one edge of the cotree and contains two integers separated by a space: the first one is the identifyer of the parent node; the second one is the identifyer of the child node. example of an output cotree (it is the cotree of the example input given above, which is already a cograph): --- 6 1 0 0 1 0 2 0 3 0 4 3 5 2 4 0 4 2 4 5 5 1 5 3 ---