An Efficient Algorithm for Generating Colored Outerplanar Graphs

Given two integers n and m with 1 ≤ m ≤ n, we consider the problem of generating nonisomorphic colored outerplanar graphs with at most n vertices, where each outerplanar graph is colored with at most m colors. In this paper, we treat outerplanar graphs as rooted outerplane graphs, i.e., plane embeddings with a designated vertex as the root, and propose an efficient algorithm for generating all such colored graphs based on a unique representation of those embeddings. Our algorithm runs in O(n) space and outputs all colored and rooted outerplane graphs without repetition in O(1) time per graph.