In graph drawing and geometric graph theory, the slope number of a graph is the minimum possible number of distinct slopes of edges in a drawing of the graph in which vertices are represented as points in the Euclidean plane and edges are represented as line segments that do not pass through any non-incident vertex.
Complete graphs
Although closely related problems in discrete geometry had been studied earlier, e.g. by and, the problem of determining the slope number of a graph was introduced by, who showed that the slope number of an -vertex complete graph is exactly . A drawing with this slope number may be formed by placing the vertices of the graph on a regular polygon.
The slope number of a graph of maximum degree is clearly at least, because at most two of the incident edges at a degree- vertex can share a slope. More precisely, the slope number is at least equal to the linear arboricity of the graph, since the edges of a single slope must form a linear forest, and the lineararboricity in turn is at least. There exist graphs with maximum degree five that have arbitrarily large slope number. However, every graph of maximum degree three has slope number at most four; the result of for the complete graph shows that this is tight. Not every set of four slopes is suitable for drawing all degree-3 graphs: a set of slopes is suitable for this purpose if and only it forms the slopes of the sides and diagonals of a parallelogram. In particular, any degree 3 graph can be drawn so that its edges are either axis-parallel or parallel to the main diagonals of the integer lattice. It is not known whether graphs of maximum degree four have bounded or unbounded slope number.
Planar graphs
As showed, every planar graph has a planar straight-line drawing in which the number of distinct slopes is a function of the degree of the graph. Their proof follows a construction of for bounding the angular resolution of planar graphs as a function of degree, by completing the graph to a maximal planar graph without increasing its degree by more than a constant factor, and applying the circle packing theorem to represent this augmented graph as a collection of tangent circles. If the degree of the initial graph is bounded, the ratio between the radii of adjacent circles in the packing will also be bounded by the ring lemma, which in turn implies that using a quadtree to place each graph vertex on a point within its circle will produce slopes that are ratios of small integers. The number of distinct slopes produced by this construction is exponential in the degree of the graph.
Complexity
It is NP-complete to determine whether a graph has slope number two. From this, it follows that it is NP-hard to determine the slope number of an arbitrary graph, or to approximate it with an approximation ratio better than 3/2. It is also NP-complete to determine whether a planar graph has a planar drawing with slope number two, and hard for the existential theory of the reals to determine the minimum slope number of a planar drawing.