Embedding a balanced binary tree (original) (raw)

Embedding a balanced binary tree on a bounded point set

Given an undirected planar graph G with n vertices and a set S of n points inside a simple polygon P, a point-set embedding of G on S is a planar drawing of G such that each vertex is mapped to a distinct point of S and the edges are polygonal chains surrounded by P. A special case of the embedding problem is that in which G is a balanced binary tree. In this paper, we present a new algorithm for embedding an n-vertex balanced binary tree BBT on a set S of n points bounded by a simple m-gon P in O(m^2 + n(log n)^2 + mn) time with at most O(m) bends per edge.

Planar embedding of trees on point sets without the general position assumption

TURKISH JOURNAL OF MATHEMATICS, 2015

The problem of point-set embedding of a planar graph G on a point set P in the plane is defined as finding a straight-line planar drawing of G such that the nodes of G are mapped one to one on the points of P. Previous works in this area mostly assume that the points of P are in general position, i.e. P does not contain any three collinear points. However, in most of the real applications we cannot assume the general position assumption. In this paper, we show that deciding the point-set embeddability of trees without the general position assumption is NP-complete. Then we introduce an algorithm for point-set embedding of n-node binary trees with at most n 3 total bends on any point set. We also give some results when the problem is limited to degree-constrained trees and point sets having constant number of collinear points.

Complexity of Planar Embeddability of Trees inside Simple Polygons

Corr, 2009

Geometric embedding of graphs in a point set in the plane is a well known problem. In this paper, the complexity of a variant of this problem, where the point set is bounded by a simple polygon, is considered. Given a point set in the plane bounded by a simple polygon and a free tree, we show that deciding whether there is a planar straight-line embedding of the tree on the point set inside the simple polygon is NP-complete. This implies that the straight-line constrained point-set embedding of trees is also NP-complete, which was posed as an open problem in [8].

Heuristic Algorithms for Geometric Embedding of Complete Binary Trees onto a Point-set

In the geometric graph embedding problem, a graph with n vertices and a set of n points in the plane are given, and the aim of embedding is to find a mapping between vertices of the graph to these points in such a way that minimizes the length of the embedded graph on the point set. Since the travelling salesman problem is a special case of the graph embedding problem, therefore, the problem is an NPhard problem. In this paper, we consider a particular case where the given graph is a binary tree. We present four heuristic approaches, then we compare the time complexity, and the resulted embedding length of these algorithms.

Point-set embeddings of trees with given partial drawings

2009

Given a graph G with n vertices and a set S of n points in the plane, a point-set embedding of G on S is a planar drawing such that each vertex of G is mapped to a distinct point of S. A geometric point-set embedding is a point-set embedding with no edge bends. This paper studies the following problem: The input is a set S of n points, a planar graph G with n vertices, and a geometric point-set embedding of a subgraph G ⊂ G on a subset of S. The desired output is a point-set embedding of G on S that includes the given partial drawing of G . We concentrate on trees and show how to compute the output in O (n 2 log n) time in a real-RAM model and with at most n − k edges with at most 1 + 2 k/2 bends, where k is the number of vertices of the given subdrawing. We also prove that there are instances of the problem which require at least k − 3 bends on n − k edges.

Geometric Embedding of Path and Cycle Graphs in Pseudo-convex Polygons

arXiv (Cornell University), 2017

Given a graph G with n vertices and a set S of n points in the plane, a point-set embedding of G on S is a planar drawing such that each vertex of G is mapped to a distinct point of S. A straight-line point-set embedding is a point-set embedding with no edge bends or curves. The point-set embeddability problem is NP-complete, even when G is 2-connected and 2-outerplanar. It has been solved polynomially only for a few classes of planar graphs. Suppose that S is the set of vertices of a simple polygon. A straight-line polygon embedding of a graph is a straight-line point-set embedding of the graph onto the vertices of the polygon with no crossing between edges of graph and the edges of polygon. In this paper, we present O(n)-time algorithms for polygon embedding of path and cycle graphs in simple convex polygon and same time algorithms for polygon embedding of path and cycle graphs in a large type of simple polygons where n is the number of vertices of the polygon.

Packing trees into planar graphs

Journal of Graph …, 2002

In this study, we provide methods for drawing a tree with n vertices on a convex polygon, without crossings and using the minimum number of edges of the polygon. We apply the results to obtain planar packings of two trees in some specific cases.© 2002 ...

Optimal Algorithms to Embed Trees in a Point Set

Journal of Graph Algorithms and Applications, 1997

We present optimal O(n log n) time algorithms to solve two tree embedding problems whose solution previously took quadratic time or more: rooted-tree embeddings and degree-constrained embeddings. In the rooted-tree embedding problem we are given a rooted-tree T with n nodes and a set of n points P with one designated point p and are asked to find a straight-line embedding of T into P with the root at point p. In the degree-constrained embedding problem we are given a set of n points P where each point is assigned a positive degree and the degrees sum to 2n-2 and are asked to embed a tree in P using straight lines that respects the degrees assigned to each point of P. In both problems, the points of P must be in general position and the embeddings have no crossing edges.

Embedding Vertices at Points: Few Bends Suffice for Planar Graphs

Journal of Graph Algorithms and Applications, 2002

The existing literature gives efficient algorithms for mapping trees or less restrictively outerplanar graphs on a given set of points in a plane, so that the edges are drawn planar and as straight lines. We relax the latter requirement and allow very few bends on each edge while considering general plane graphs. Our results show two algorithms for mapping four-connected plane graphs with at most one bend per edge and for mapping general plane graphs with at most two bends per edge. Furthermore we give a point set, where for arbitrary plane graphs it is NP-complete to decide whether there is an mapping such that each edge has at most one bend.

Optimal Polygonal Representation of Planar Graphs

Algorithmica, 2012

In this paper, we consider the problem of representing graphs by polygons whose sides touch. We show that at least six sides per polygon are necessary by constructing a class of planar graphs that cannot be represented by pentagons. We also show that the lower bound of six sides is matched by an upper bound of six sides with a linear time algorithm for representing any planar graph by touching hexagons. Moreover, our algorithm produces convex polygons with edges with slopes 0, 1, -1. Fig. 1. Given a drawing of a planar graph(a), we apportion the edges to the endpoints by cutting each edge in half (b), and then apportion the faces to form polygons (c).