Dichotomy for orderings?
Fagin defined the class $NP$ by the means of Existential Second-Order logic. Feder and Vardi expressed it (up to polynomial equivalence) by special fragments of Existential Second-Order logic (SNP), while the authors used forbidden expanded substructures (cf. lifts and shadows). Consequently, for such problems there is no dichotomy, unlike for CSPs. We prove that ordering problems for graphs defined by finitely many forbidden ordered subgraphs capture the full power of the class $NP$, that is, any language in the class $NP$ is polynomially equivalent to an ordering problem. In particular, we refute a conjecture of Hell, Mohar and Rafiey that dichotomy holds for this class. On the positive side, we confirm the conjecture of Duffus, Ginn and Rödl that ordering problems defined by a single obstruction which is a biconnected ordered graph are $NP$-complete if the graph is not complete. We initiate the study of meta-theorems for classes which have the full power of the class $NP$. For example, homomorphism problems (or CSPs) do not have full power (similarly to coloring problems). On the other hand, we show that problems defined by the existence of an ordering, which avoids certain ordered patterns, have full power. We find it surprising that such simple structures can express the full power of $NP$. A principal tool for obtaining these results is the Sparse Incomparability Lemma in many of its variants, which are classical results in the theory of homomorphisms of graphs and structures. We prove it here in the setting of ordered stuctures as a Temporal Sparse Incomparability Lemma. This is a non-trivial result, even in the random setting, and a deterministic algorithm requires more effort. Interestingly, our proof involves the Lovász Local Lemma.