np-complete
835 papers tagged with this keyword
Hardness Transitions of Star Colouring and Restricted Star Colouring
We study how the complexity of the graph colouring problems star colouring and restricted star colouring vary with the maximum degree of the graph. Restricted star colouring (in short, rs colouring) is a variant of star colouring. For $k\in \mathbb{N}$, a $k$-colouring of a graph $G$ is a function $f\colon V(G)\to \mathbb{Z}_k$ such that $f(u)\neq f(v)$ for every edge $uv$ of $G$. A $k$-colouring of $G$ is called a $k$-star colouring of $G$ if there is no path $u,v,w,x$ in $G$ with $f(u)=f(w)$ and $f(v)=f(x)$. A $k$-colouring of $G$ is called a $k$-rs colouring of $G$ if there is no path $u,v,w$ in $G$ with $f(v)>f(u)=f(w)$. For $k\in \mathbb{N}$, the problem $k$-STAR COLOURABILITY takes a graph $G$ as input and asks whether $G$ admits a $k$-star colouring. The problem $k$-RS COLOURABILITY is defined similarly. Recently, Brause et al. (Electron. J. Comb., 2022) investigated the complexity of 3-star colouring with respect to the graph diameter. We study the complexity of $k$-star colouring and $k$-rs colouring with respect to the maximum degree for all $k\geq 3$. For $k\geq 3$, let us denote the least integer $d$ such that $k$-STAR COLOURABILITY (resp. $k$-RS COLOURABILITY) is NP-complete for graphs of maximum degree $d$ by $L_s^{(k)}$ (resp. $L_{rs}^{(k)}$).
We prove that for $k=5$ and $k\geq 7$, $k$-STAR COLOURABILITY is NP-complete for graphs of maximum degree $k-1$. We also show that $4$-RS COLOURABILITY is NP-complete for planar 3-regular graphs of girth 5 and $k$-RS COLOURABILITY is NP-complete for triangle-free graphs of maximum degree $k-1$ for $k\geq 5$. Using these results, we prove the following: (i) for $k\geq 4$ and $d\leq k-1$, $k$-STAR COLOURABILITY is NP-complete for $d$-regular graphs if and only if $d\geq L_s^{(k)}$; and (ii) for $k\geq 4$, $k$-RS COLOURABILITY is NP-complete for $d$-regular graphs if and only if $L_{rs}^{(k)}\leq d\leq k-1$.
Hamiltonian path and Hamiltonian cycle are solvable in polynomial time in graphs of bounded independence number
A Hamiltonian path (a Hamiltonian cycle) in a graph is a path (a cycle, respectively) that traverses all of its vertices. The problems of deciding their existence in an input graph are well-known to be NP-complete, in fact, they belong to the first problems shown to be computationally hard when the theory of NP-completeness was being developed. A lot of research has been devoted to the complexity of Hamiltonian path and Hamiltonian cycle problems for special graph classes, yet only a handful of positive results are known. The complexities of both of these problems have been open even for $4K_1$-free graphs, i.e., graphs of independence number at most $3$. We answer this question in the general setting of graphs of bounded independence number.
We also consider a newly introduced problem called \emph{Hamiltonian-$\ell$-Linkage} which is related to the notions of a path cover and of a linkage in a graph. This problem asks if given $\ell$ pairs of vertices in an input graph can be connected by disjoint paths that altogether traverse all vertices of the graph. For $\ell=1$, Hamiltonian-1-Linkage asks for existence of a Hamiltonian path connecting a given pair of vertices. Our main result reads that for every pair of integers $k$ and $\ell$, the Hamiltonian-$\ell$-Linkage problem is polynomial time solvable for graphs of independence number not exceeding $k$.
Forbidden Tournaments and the Orientation Completion Problem
For a fixed finite set of finite tournaments ${\mathcal F}$, the ${\mathcal F}$-free orientation problem asks whether a given finite undirected graph $G$ has an $\mathcal F$-free orientation, i.e., whether the edges of $G$ can be oriented so that the resulting digraph does not embed any of the tournaments from ${\mathcal F}$. We prove that for every ${\mathcal F}$, this problem is in P or NP-complete. Our proof reduces the classification task to a complete complexity classification of the orientation completion problem for ${\mathcal F}$, which is the variant of the problem above where the input is a directed graph instead of an undirected graph, introduced by Bang-Jensen, Huang, and Zhu (2017). Our proof uses results from the theory of constraint satisfaction, and a result of Agarwal and Kompatscher (2018) about infinite permutation groups and transformation monoids.
Perfect Roman Domination and Unique Response Roman Domination
The idea of enumeration algorithms with polynomial delay is to polynomially bound the running time between any two subsequent solutions output by the enumeration algorithm. While it is open for more than four decades if all minimal dominating sets of a graph can be enumerated in output-polynomial time, it has recently been proven that pointwise-minimal Roman dominating functions can be enumerated even with polynomial delay. The idea of the enumeration algorithm was to use polynomial-time solvable extension problems. We use this as a motivation to prove that also two variants of Roman dominating functions studied in the literature, named perfect and unique response, can be enumerated with polynomial delay. This is interesting since Extension Perfect Roman Domination is W[1]-complete if parameterized by the weight of the given function and even W[2]-complete if parameterized by the number vertices assigned 0 in the pre-solution, as we prove. Otherwise, efficient solvability of extension problems and enumerability with polynomial delay tend to go hand-in-hand. We achieve our enumeration result by constructing a bijection to Roman dominating functions, where the corresponding extension problem is polynomimaltime solvable. Furthermore, we show that Unique Response Roman Domination is solvable in polynomial time on split graphs, while Perfect Roman Domination is NP-complete on this graph class, which proves that both variations, albeit coming with a very similar definition, do differ in some complexity aspects. This way, we also solve an open problem from the literature.
Flat origami is Turing Complete
"Flat origami" refers to the folding of flat, zero-curvature paper such that the finished object lies in a plane. Mathematically, flat origami consists of a continuous, piecewise isometric map $f:P\subseteq\mathbb{R}^2\to\mathbb{R}^2$ along with a layer ordering $λ_f:P\times P\to \{-1,1\}$ that tracks which points of $P$ are above/below others when folded. The set of crease lines that a flat origami makes (i.e., the set on which the mapping $f$ is non-differentiable) is called its "crease pattern." Flat origami mappings and their layer orderings can possess surprisingly intricate structure. For instance, determining whether or not a given straight-line planar graph drawn on $P$ is the crease pattern for some flat origami has been shown to be an NP-complete problem, and this result from 1996 led to numerous explorations in computational aspects of flat origami. In this paper we prove that flat origami, when viewed as a computational device, is Turing complete, or more specifically P-complete. We do this by showing that flat origami crease patterns with "optional creases" (creases that might be folded or remain unfolded depending on constraints imposed by other creases or inputs) can be constructed to simulate Rule 110, a one-dimensional cellular automaton that was proven to be Turing complete by Matthew Cook in 2004.
Star Colouring of Bounded Degree Graphs and Regular Graphs
Published in Discrete Mathematics, 345 (6), 112850 (2022)
• View Publication
• BIB
A $k$-star colouring of a graph $G$ is a function $f:V(G)\to\{0,1,\dots,k-1\}$ such that $f(u)\neq f(v)$ for every edge $uv$ of $G$, and every bicoloured connected subgraph of $G$ is a star. The star chromatic number of $G$, $χ_s(G)$, is the least integer $k$ such that $G$ is $k$-star colourable. We prove that $χ_s(G)\geq \lceil (d+4)/2\rceil$ for every $d$-regular graph $G$ with $d\geq 3$. We reveal the structure and properties of even-degree regular graphs $G$ that attain this lower bound. The structure of such graphs $G$ is linked with a certain type of Eulerian orientations of $G$. Moreover, this structure can be expressed in the LC-VSP framework of Telle and Proskurowski (SIDMA, 1997), and hence can be tested by an FPT algorithm with the parameter either treewidth, cliquewidth, or rankwidth. We prove that for $p\geq 2$, a $2p$-regular graph $G$ is $(p+2)$-star colourable only if $n:=|V(G)|$ is divisible by $(p+1)(p+2)$. For each $p\geq 2$ and $n$ divisible by $(p+1)(p+2)$, we construct a $2p$-regular Hamiltonian graph on $n$ vertices which is $(p+2)$-star colourable.
The problem $k$-STAR COLOURABILITY takes a graph $G$ as input and asks whether $G$ is $k$-star colourable. We prove that 3-STAR COLOURABILITY is NP-complete for planar bipartite graphs of maximum degree three and arbitrarily large girth. Besides, it is coNP-hard to test whether a bipartite graph of maximum degree eight has a unique 3-star colouring up to colour swaps. For $k\geq 3$, $k$-STAR COLOURABILITY of bipartite graphs of maximum degree $k$ is NP-complete, and does not even admit a $2^{o(n)}$-time algorithm unless ETH fails.
Non-Clashing Teaching Maps for Balls in Graphs
Recently, Kirkpatrick et al. [ALT 2019] and Fallat et al. [JMLR 2023] introduced non-clashing teaching and showed it is the most efficient machine teaching model satisfying the Goldman-Mathias collusion-avoidance criterion. A teaching map $T$ for a concept class $\mathcal{C}$ assigns a (teaching) set $T(C)$ of examples to each concept $C \in \mathcal{C}$. A teaching map is non-clashing if no pair of concepts are consistent with the union of their teaching sets. The size of a non-clashing teaching map (NCTM) $T$ is the maximum size of a teaching set $T(C)$, $C \in \mathcal{C}$. The non-clashing teaching dimension NCTD$(\mathcal{C})$ of $\mathcal{C}$ is the minimum size of an NCTM for $\mathcal{C}$. NCTM$^+$ and NCTD$^+(\mathcal{C})$ are defined analogously, except the teacher may only use positive examples.
We study NCTMs and NCTM$^+$s for the concept class $\mathcal{B}(G)$ consisting of all balls of a graph $G$. We show that the associated decision problem B-NCTD$^+$ for NCTD$^+$ is NP-complete in split, co-bipartite, and bipartite graphs. Surprisingly, we even prove that, unless the ETH fails, B-NCTD$^+$ does not admit an algorithm running in time $2^{2^{o(\text{vc})}}\cdot n^{O(1)}$, nor a kernelization algorithm outputting a kernel with $2^{o(\text{vc})}$ vertices, where vc is the vertex cover number of $G$. We complement these lower bounds with matching upper bounds. These are extremely rare results: it is only the second problem in NP to admit such a tight double-exponential lower bound parameterized by vc, and only one of very few problems to admit such an ETH-based conditional lower bound on the number of vertices in a kernel. For trees, interval graphs, cycles, and trees of cycles, we derive NCTM$^+$s or NCTMs for $\mathcal{B}(G)$ of size proportional to its VC-dimension, and for Gromov-hyperbolic graphs, we design an approximate NCTM$^+$ of size 2.
Thick Forests
We consider classes of graphs, which we call thick graphs, that have the vertices of a corresponding thin graph replaced by cliques and the edges replaced by cobipartite graphs In particular, we consider the case of thick forests, which we show to be the largest class of perfect thick graphs.
Recognising membership of a class of thick graphs is NP-complete unless the class of thin graphs is triangle-free, so we focus on this case. Even then membership can be NP-complete. However, we show that the class of thick forests can be recognised in polynomial time. We consider two well-studied combinatorial problems on thick graphs, independent sets and proper colourings. Since determining the independence or chromatic number of a perfect graph is known to be tractable, we examine the complexity of counting all independent sets and colourings in thick forests.
Finally, we consider two parametric extensions to larger classes of thick graphs: where the parameter is the size of the thin graph, and where the parameter is its treewidth.
Mutual visibility in hypercube-like graphs
Let $G$ be a graph and $X\subseteq V(G)$. Then, vertices $x$ and $y$ of $G$ are $X$-visible if there exists a shortest $u,v$-path where no internal vertices belong to $X$. The set $X$ is a mutual-visibility set of $G$ if every two vertices of $X$ are $X$-visible, while $X$ is a total mutual-visibility set if any two vertices from $V(G)$ are $X$-visible. The cardinality of a largest mutual-visibility set (resp. total mutual-visibility set) is the mutual-visibility number (resp. total mutual-visibility number) $μ(G)$ (resp. $μ_t(G)$) of $G$. It is known that computing $μ(G)$ is an NP-complete problem, as well as $μ_t(G)$. In this paper, we study the (total) mutual-visibility in hypercube-like networks (namely, hypercubes, cube-connected cycles, and butterflies). Concerning computing $μ(G)$, we provide approximation algorithms for both hypercubes and cube-connected cycles, while we give an exact formula for butterflies. Concerning computing $μ_t(G)$ (in the literature, already studied in hypercubes), we provide exact formulae for both cube-connected cycles and butterflies.
Constructing and sampling partite, $3$-uniform hypergraphs with given degree sequence
Partite, $3$-uniform hypergraphs are $3$-uniform hypergraphs in which each hyperedge contains exactly one point from each of the $3$ disjoint vertex classes. We consider the degree sequence problem of partite, $3$-uniform hypergraphs, that is, to decide if such a hypergraph with prescribed degree sequences exists. We prove that this decision problem is NP-complete in general, and give a polynomial running time algorithm for third almost-regular degree sequences, that is, when each degree in one of the vertex classes is $k$ or $k-1$ for some fixed $k$, and there is no restriction for the other two vertex classes. We also consider the sampling problem, that is, to uniformly sample partite, $3$-uniform hypergraphs with prescribed degree sequences. We propose a Parallel Tempering method, where the hypothetical energy of the hypergraphs measures the deviation from the prescribed degree sequence. The method has been implemented and tested on synthetic and real data. It can also be applied for $χ^2$ testing of contingency tables. We have shown that this hypergraph-based $χ^2$ test is more sensitive than the standard $χ^2$ test. The extra sensitivity is especially advantageous on small data sets, where the proposed Parallel Tempering method shows promising performance.
Budget-constrained cut problems
The minimum and maximum cuts of an undirected edge-weighted graph are classic problems in graph theory. While the Min-Cut Problem can be solved in P, the Max-Cut Problem is NP-Complete. Exact and heuristic methods have been developed for solving them. For both problems, we introduce a natural extension in which cutting an edge induces a cost. Our goal is to find a cut that minimizes the sum of the cut weights but, at the same time, restricts its total cut cost to a given budget. We prove that both restricted problems are NPComplete and we also study some of its properties. Finally, we develop exact algorithms to solve both as well as a non-exact algorithm for the min-cut case based on a Lagreangean relaxation that generally provides optimal solutions. Their performance is reported by an extensive computational experience.
Algorithmic study of $d_2$-transitivity of graphs
Let $G=(V, E)$ be a graph where $V$ and $E$ are the vertex and edge sets, respectively. For two disjoint subsets $A$ and $B$ of $V$, we say $A$ \emph{dominates} $B$ if every vertex of $B$ is adjacent to at least one vertex of $A$. A vertex partition $π= \{V_1, V_2, \ldots, V_k\}$ of $G$ is called a \emph{transitive partition} of size $k$ if $V_i$ dominates $V_j$ for all $1\leq i<j\leq k$. In this article, we initiate the study of a generalization of transitive partition, namely \emph{$d_2$-transitive partition}. For two disjoint subsets $A$ and $B$ of $V$, we say $A$ \emph{$d_2$-dominates} $B$ if, for every vertex of $B$, there exists a vertex in $A$, such that the distance between them is at most two. A vertex partition $π= \{V_1, V_2, \ldots, V_k\}$ of $G$ is called a \emph{$d_2$-transitive partition} of size $k$ if $V_i$ $d_2$-dominates $V_j$ for all $1\leq i<j\leq k$. The maximum integer $k$ for which the above partition exists is called \emph{$d_2$-transitivity} of $G$, and it is denoted by $Tr_{d_2}(G)$. The \textsc{Maximum $d_2$-Transitivity Problem} is to find a $d_2$-transitive partition of a given graph with the maximum number of parts. We show that this problem can be solved in linear time for the complement of bipartite graphs and bipartite chain graphs. On the negative side, we prove that the decision version of the \textsc{Maximum $d_2$-Transitivity Problem} is NP-complete for split graphs, bipartite graphs, and star-convex bipartite graphs.
Open-locating-dominating sets with error correction
An open-locating-dominating set of a graph models a detection system for a facility with a possible "intruder" or a multiprocessor network with a possible malfunctioning processor. A "sensor" or "detector" is assumed to be installed at a subset of vertices where it can detect an intruder or a malfunctioning processor in their neighborhood, but not at itself. We consider a fault-tolerant variant of an open-locating-dominating set called an error-correcting open-locating-dominating set, which can correct a false-positive or a false-negative signal from a detector. In particular, we prove the problem of finding a minimum error-correcting open-locating-dominating set in an arbitrary graph is NP-complete. Additionally, we characterize the existence criteria for an error-correcting open-locating-dominating sets for an arbitrary graph. We also consider extremal graphs that require every vertex to be a detector and minimum error-correcting open-locating-dominating sets in infinite grids.
Recognition of chordal graphs and cographs which are Cover-Incomparability graphs
Published in Discrete Mathematics & Theoretical Computer Science, vol. 26:3, Discrete Algorithms (November 15, 2024) dmtcs:11657
• View Publication
• BIB
Cover-Incomparability graphs (C-I graphs) are an interesting class of graphs from posets. A C-I graph is a graph from a poset $P=(V,\le)$ with vertex set $V$, and the edge-set is the union of edge sets of the cover graph and the incomparability graph of the poset. The recognition of the C-I graphs is known to be NP-complete (Maxová et al., Order 26(3), 229--236(2009)). In this paper, we prove that chordal graphs having at most two independent simplicial vertices are exactly the chordal graphs which are also C-I graphs. A similar result is obtained for cographs as well. Using the structural results of these graphs, we derive linear time recognition algorithms for chordal graphs and cographs which are C-I graphs.
Mutual-visibility in distance-hereditary graphs: a linear-time algorithm
The concept of mutual-visibility in graphs has been recently introduced. If $X$ is a subset of vertices of a graph $G$, then vertices $u$ and $v$ are $X$-visible if there exists a shortest $u,v$-path $P$ such that $V(P)\cap X \subseteq \{u, v\}$. If every two vertices from $X$ are $X$-visible, then $X$ is a mutual-visibility set. The mutual-visibility number of $G$ is the cardinality of a largest mutual-visibility set of $G$. It is known that computing the mutual-visibility number of a graph is NP-complete, whereas it has been shown that there are exact formulas for special graph classes like paths, cycles, blocks, cographs, and grids. In this paper, we study the mutual-visibility in distance-hereditary graphs and show that the mutual-visibility number can be computed in linear time for this class.
(k-2)-linear connected components in hypergraphs of rank k
Published
• View Publication
• BIB
We define a $q$-linear path in a hypergraph $H$ as a sequence $(e_1,\ldots,e_L)$ of edges of $H$ such that $|e_i \cap e_{i+1}| \in [\![1,q]\!]$ and $e_i \cap e_j=\varnothing$ if $|i-j|>1$. In this paper, we study the connected components associated to these paths when $q=k-2$ where $k$ is the rank of $H$. If $k=3$ then $q=1$ which coincides with the well-known notion of linear path or loose path. We describe the structure of the connected components, using an algorithmic proof which shows that the connected components can be computed in polynomial time. We then mention two consequences of our algorithmic result. The first one is that deciding the winner of the Maker-Breaker game on a hypergraph of rank 3 can be done in polynomial time. The second one is that tractable cases for the NP-complete problem of "Paths Avoiding Forbidden Pairs" in a graph can be deduced from the recognition of a special type of line graph of a hypergraph.
Complexity and algorithms for matching cut problems in graphs without long induced paths and cycles
In a graph, a (perfect) matching cut is an edge cut that is a (perfect) matching. Matching Cut (MC), respectively, Perfect Matching Cut (PMC), is the problem of deciding whether a given graph has a matching cut, respectively, a perfect matching cut. The Disconnected Perfect Matching problem (DPM) is to decide if a graph has a perfect matching that contains a matching cut. Solving an open problem posed in [Lucke, Paulusma, Ries (ISAAC 2022, Algorithmica 2023)], we show that PMC is NP-complete in graphs without induced 14-vertex path $P_{14}$. Our reduction also works simultaneously for MC and DPM, improving the previous hardness results of MC on $P_{15}$-free graphs and of DPM on $P_{19}$-free graphs to $P_{14}$-free graphs for both problems. Actually, we prove a slightly stronger result: within $P_{14}$-free 8-chordal graphs (graphs without chordless cycles of length at least 9), it is hard to distinguish between those without matching cuts (respectively, perfect matching cuts, disconnected perfect matchings) and those in which every matching cut is a perfect matching cut. Moreover, assuming the Exponential Time Hypothesis, none of these problems can be solved in $2^{o(n)}$ time for $n$-vertex $P_{14}$-free 8-chordal graphs.
On the positive side, we show that, as for MC [Moshi (JGT 1989)], DPM and PMC are polynomially solvable when restricted to 4-chordal graphs. Together with the negative results, this partly answers an open question on the complexity of PMC in $k$-chordal graphs asked in [Le, Telle (WG 2021, TCS 2022) & Lucke, Paulusma, Ries (MFCS 2023, TCS 2024)].
Computing Subset Vertex Covers in $H$-Free Graphs
We consider a natural generalization of Vertex Cover: the Subset Vertex Cover problem, which is to decide for a graph $G=(V,E)$, a subset $T\subseteq V$ and integer $k$, if $V$ has a subset $S$ of size at most $k$, such that $S$ contains at least one end-vertex of every edge incident to a vertex of $T$. A graph is $H$-free if it does not contain $H$ as an induced subgraph. We solve two open problems from the literature by proving that Subset Vertex Cover is NP-complete on subcubic (claw,diamond)-free planar graphs and on $2$-unipolar graphs, a subclass of $2P_3$-free weakly chordal graphs. Our results show for the first time that Subset Vertex Cover is computationally harder than Vertex Cover (under P $\neq$ NP). We also prove new polynomial time results, some of which follow from a reduction to Vertex Cover restricted to classes of probe graphs. We first give a dichotomy on graphs where $G[T]$ is $H$-free. Namely, we show that Subset Vertex Cover is polynomial-time solvable on graphs $G$, for which $G[T]$ is $H$-free, if $H=sP_1+tP_2$ and NP-complete otherwise. Moreover, we prove that Subset Vertex Cover is polynomial-time solvable for $(sP_1+P_2+P_3)$-free graphs and bounded mim-width graphs. By combining our new results with known results we obtain a partial complexity classification for Subset Vertex Cover on $H$-free graphs.
Recognizing $\mathbf{W_2}$ Graphs
Let $G$ be a graph. A set $S \subseteq V(G)$ is independent if its elements are pairwise non-adjacent. A vertex $v \in V(G)$ is shedding if for every independent set $S \subseteq V(G) \setminus N[v]$ there exists $u \in N(v)$ such that $S \cup \{u\}$ is independent. An independent set $S$ is maximal if it is not contained in another independent set. An independent set $S$ is maximum if the size of every independent set of $G$ is not bigger than $|S|$. The size of a maximum independent set of $G$ is denoted $α(G)$. A graph $G$ is well-covered if all its maximal independent sets are maximum, i.e. the size of every maximal independent set is $α(G)$. The graph $G$ belongs to class $\mathbf{W_2}$ if every two pairwise disjoint independent sets in $G$ are included in two pairwise disjoint maximum independent sets. If a graph belongs to the class $\mathbf{W_2}$ then it is well-covered.
Finding a maximum independent set in an input graph is an NP-complete problem. Recognizing well-covered graphs is co-NP-complete. The complexity status of deciding whether an input graph belongs to the $\mathbf{W_2}$ class is not known. Even when the input is restricted to well-covered graphs, the complexity status of recognizing graphs in $\mathbf{W_2}$ is not known.
In this article, we investigate the connection between shedding vertices and $\mathbf{W_2}$ graphs. On the one hand, we prove that recognizing shedding vertices is co-NP-complete. On the other hand, we find polynomial solutions for restricted cases of the problem. We also supply polynomial characterizations of several families of $\mathbf{W_2}$ graphs.
Lower General Position Sets in Graphs
A subset $S$ of vertices of a graph $G$ is a \emph{general position set} if no shortest path in $G$ contains three or more vertices of $S$. In this paper, we generalise a problem of M. Gardner to graph theory by introducing the \emph{lower general position number} $\gp ^-(G)$ of $G$, which is the number of vertices in a smallest maximal general position set of $G$. We show that ${\rm gp}^-(G) = 2$ if and only if $G$ contains a universal line and determine this number for several classes of graphs, including Kneser graphs $K(n,2)$, line graphs of complete graphs, and Cartesian and direct products of two complete graphs. We also prove several realisation results involving the lower general position number, the general position number and the geodetic number, and compare it with the lower version of the monophonic position number. We provide a sharp upper bound on the size of graphs with given lower general position number. Finally we demonstrate that the decision version of the lower general position problem is NP-complete.