We give an efficient encoding and decoding scheme for computing a compact representation of a graph in one of unordered reduced trees, cographs and series-parallel graphs. The unordered reduced trees are rooted trees in which (i) the ordering of children of each vertex does not matter, and (ii) no vertex has exactly one child. This is one of basic models frequently used in many areas. Our algorithm computes a bit string of length 2l – 1 for a given unordered reduced tree with l ≥ 1 leaves in O(l) time, whereas a known folklore algorithm computes a bit string of length 2n – 2 for an ordered tree with n vertices. Note that in an unordered reduced tree, l ≤ n < 2l holds. To the best of our knowledge this is the first of such a compact representation for unordered reduced trees. From the theoretical point of view, the length of the representation gives us an upper bound of the number of unordered reduced trees with l leaves. Precisely, the number of unordered reduced trees with l leaves is at most 22l–2 for l ≥ 1. Moreover, the encoding and decoding can be done in linear time. Therefore, from the practical point of view, our representation is also useful to store a lot of unordered reduced trees efficiently. We also apply the scheme for computing a compact representation to cographs and series-parallel graphs. We show that each of cographs with n vertices has a compact representation in 2n – 1 bits, and the number of cographs with n vertices is at most 22n–1. The resulting number is close to the number of cographs with n vertices obtained by the enumeration for small n that approximates Cdn/n3/2, where C = 0.4126⋯ and d = 3.5608⋯. Series-parallel graphs are well-investigated in the context of the graphs of bounded treewidth. We give a method to represent a series-parallel graph with m edges in ⌈2.5285m – 2⌉ bits. Hence the number of series-parallel graphs with m edges is at most 2⌈2.5285m–2⌉. As far as the authors know, this is the first non-trivial result about the number of series-parallel graphs. The encoding and decoding of the cographs and series-parallel graphs also can be done in linear time.
[1]
Yi-Ting Chiang,et al.
Orderly Spanning Trees with Applications
,
2001,
SIAM J. Comput..
[2]
Shin-Ichi Nakano,et al.
A compact encoding of plane triangulations with efficient query supports
,
2005,
Inf. Process. Lett..
[3]
Michel Habib,et al.
A simple linear time algorithm for cograph recognition
,
2005,
Discret. Appl. Math..
[4]
Gilbert Labelle,et al.
Combinatorial species and tree-like structures
,
1997,
Encyclopedia of mathematics and its applications.
[5]
Lorna Stewart,et al.
A Linear Recognition Algorithm for Cographs
,
1985,
SIAM J. Comput..
[6]
Guy Jacobson,et al.
Space-efficient static trees and graphs
,
1989,
30th Annual Symposium on Foundations of Computer Science.
[7]
Rajeev Raman,et al.
Succinct ordinal trees with level-ancestor queries
,
2004,
SODA '04.
[8]
A. Brandstädt,et al.
Graph Classes: A Survey
,
1987
.
[9]
Jeremy P. Spinrad,et al.
Efficient graph representations
,
2003,
Fields Institute monographs.
[10]
Jeffery R. Westbrook,et al.
Short Encodings of Planar Graphs and Maps
,
1995,
Discret. Appl. Math..
[11]
J. Ian Munro,et al.
Succinct Representation of Balanced Parentheses and Static Trees
,
2002,
SIAM J. Comput..
[12]
Olivier Devillers,et al.
Succinct Representation of Triangulations with a Boundary
,
2005,
WADS.