Shellability is NP-complete

We prove that for every d ≥ 2, deciding if a pure, d-dimensional, simplicial complex is shellable is NP-hard, hence NP-complete. This resolves a question raised, e.g., by Danaraj and Klee in 1978. Our reduction also yields that for every d ≥ 2 and k ≥ 0, deciding if a pure, d-dimensional, simplicial complex is k-decomposable is NP-hard. For d ≥ 3, both problems remain NP-hard when restricted to contractible pure d-dimensional complexes. Another simple corollary of our result is that it is NP-hard to decide whether a given poset is CL-shellable.


INTRODUCTION
A d-dimensional simplicial complex is called pure if all its facets (i.e., inclusion-maximal faces) have the same dimension d. A pure d-dimensional simplicial complex is shellable if there exists a

Results
From a computational viewpoint, it is natural to ask if one can decide efficiently (in polynomial time) whether a given complex is shellable. This question was raised at least as early as in the 1970s [11,12] (see also [18,Problem 34]) and is of both practical and theoretical importance (besides direct consequences for the experimental exploration of simplicial complexes, the answer is also closely related to the question whether there are simple conditions that would characterize shellability). Danaraj and Klee proved that shellability of 2-dimensional pseudomanifolds can be tested in linear time [11], whereas a number of related problems have been shown to be NP-complete [2,13,17,19,20,29] (see Section 1.2), but the computational complexity of the shellability problem has remained open. Here, we settle the question in the negative and show that the problem is intractable (modulo P NP). 2 Theorem 1. Deciding if a pure 2-dimensional simplicial complex is shellable is NP-complete.
Here, the input is given as a finite abstract simplicial complex (see Section 2). 3 Remark 2. The problem of testing shellability is easily seen to lie in the complexity class NP (given a linear ordering of the facets of a complex, it is straightforward to check whether it is a shelling). Thus, the nontrivial part of Theorem 1 is that deciding shellability of pure 2-dimensional complexes is NP-hard. 1 A pure, d-dimensional complex K is a pseudomanifold (with boundary) if every (d − 1)-face of K is contained in exactly two (at most two) facets. (Sometimes, it is additionally required that the facet-adjacency graph of K is connected, but this does not matter in our setting, since shellable complexes always satisfy this connectivity property.) 2 For basic notions from computational complexity, such as NP-completeness or reductions, see, e.g., [1]. 3 There are a several different ways of encoding an abstract simplicial complex-e.g., we can list the facets, or we can list all of its simplices-but since we work with complexes of fixed dimension, these encodings can be translated into one another in polynomial time, so the precise choice does not matter.
It is easy to check that a pure simplicial complex K is shellable if and only if the cone {v} * K is shellable, where v is a vertex not in K (see Section 2). Thus, the hardness of deciding shellability easily propagates to higher-dimensional complexes, even to cones. Corollary 3. For d ≥ 3, deciding if a pure d-dimensional complex is shellable is NP-complete even when the input is assumed to be a cone (hence, contractible).
Moreover, our hardness reduction (from 3-SAT) used in the proof of Theorem 1 (see Section 3) turns out to be sufficiently robust to also imply hardness results for a number of related problems.
Hardness of k-Decomposability. Let d ≥ 2 and k ≥ 0. A pure d-dimensional simplicial complex K is k-decomposable if it is a simplex or if there exists a face σ of K of dimension at most k such that (i) the link of σ in K is pure (d − |σ |)-dimensional and k-decomposable, and (ii) deleting σ and faces of K containing σ produces a d-dimensional k-decomposable complex. This notion, introduced by Provan and Billera [25], provides a hierarchy of properties (k-decomposability implies (k + 1)-decomposability) interpolating between vertex-decomposable complexes (k = 0) and shellable complexes (shellability is equivalent to d-decomposability [25]). The initial motivation for considering this hierarchy was to study the Hirsch conjecture on combinatorial diameters of convex polyhedra, or in the language of simplicial complexes, the diameter of the facet-adjacency graphs of pure simplicial complexes: at one end, the boundary complex of every d-dimensional simplicial polytope is shellable [9], and at the other end, every vertex-decomposable simplicial complex has small diameter (it satisfies the Hirsch bound [25]).
, the problem is already NP-hard for pure d-dimensional simplicial complexes that are cones (hence, contractible).
Shellability of Posets. The shellability of simplicial complexes is closely related to the shellability of posets. A poset P is shellable if the order complex 4 Δ(P ) of P is shellable. A poset with n vertices and edges in its Hasse diagram may contain more than polynomially many faces, even if we count the maximal faces only. Thus, order complexes of posets can be encoded more efficiently than general simplicial complexes (simply by giving the poset); therefore, the problems of recognizing shellable posets and shellable simplicial complexes, respectively, may belong to different complexity classes.
On the one hand, our approach implies NP-hardness of shellability of posets.
Theorem 5. Deciding if a given poset is shellable is NP-hard.
On the other hand, it is not obvious, in our opinion, whether shellability of posets (of unbounded rank) belongs to NP.
Hardness of CL-Shellability of posets. Yet another related notion is the CL-shellability of a poset, introduced in [6]. This notion often serves as an auxiliary tool to confirm shellability of a poset. The definition of CL-shellability is rather technical, so we do not reproduce it here, but simply note that a simplicial complex is shellable if and only if the dual of its face lattice is CL-shellable [7,Corollary 4.4]. Since for any fixed dimension d, the face lattice has height d + 2 and can be computed in time polynomial in the size of the d-complex, we obtain the following corollary of Theorem 1.
Corollary 6. For any fixed d ≥ 4, deciding CL-shellability of posets of height at most d is NP-hard.

Related Work on Collapsibility and Our Approach
Our proof of Theorem 1 builds on earlier results concerning collapsibility, a combinatorial analog, introduced by Whitehead [32], of the topological notion of contractibility. 5 A face σ of a simplicial complex K is free if there is a unique inclusion-maximal face τ of K with σ τ . An elementary collapse is the operation of deleting a free face and all faces containing it. A simplicial complex K collapses to a subcomplex L ⊆ K if L can be obtained from K by a finite sequence of elementary collapses; K is called collapsible if it collapses to a single vertex.
The problem of deciding whether a given 3-dimensional complex is collapsible is NPcomplete [29]; the proof builds on earlier work of Malgouyres and Francés [20], who showed that it is NP-complete to decide whether a given 3-dimensional complex collapses to some 1-dimensional subcomplex. By contrast, collapsibility of 2-dimensional complexes can be decided in polynomial time (by a greedy algorithm) [17,20]. It follows that for any fixed integer k, it can be decided in polynomial time whether a given 2-dimensional simplicial complex can be made collapsible by deleting at most k faces of dimension 2; by contrast, the latter problem is NP-complete if k is part of the input [13]. 6 Our reduction uses the gadgets introduced by Malgouyres and Francés [20] and reworked in [29] to prove NP-hardness of deciding collapsibility for 3-dimensional complexes. However, these gadgets are not pure: they contain maximal simplices of two different dimensions, 2 and 3. Roughly speaking, we fix this by replacing the 3-dimensional subcomplexes by suitably triangulated 2spheres and modifying the way in which they are glued. Interestingly, this also makes our reduction robust to subdivision and applicable to other types of decomposition.
Collapsibility and Shellability. Furthermore, we will use the following connection between shellability and collapsibility, due to Hachimori [16] (throughout,χ denotes the reduced Euler characteristic). At first glance, Hachimori's theorem might suggest to prove Theorem 1 by a direct polynomialtime reduction of collapsibility to shellability. However, for 2-dimensional complexes this would not imply hardness, since, as mentioned above, collapsibility of 2-dimensional complexes is decidable in polynomial time [17,20]. Instead, we will use the existential part of Hachimori's theorem ("there existsχ (K ) triangles") to encode instances of the 3-SAT problem, a classical NP-complete problem.

BACKGROUND AND TERMINOLOGY
In this section, we briefly recall some further basic notions regarding simplicial complexes and the 3-SAT problem that we will use throughout the article.
Simplicial Complexes. A (finite) abstract simplicial complex is a collection K of subsets of a finite set V that is closed under taking subsets, i.e., if σ ∈ K and τ ⊆ σ , then τ ∈ K. The elements v ∈ V are called the vertices of K (and often identified with the singleton sets {v} ∈ K), and the elements of K are called faces or simplices of K. The dimension of a face is its cardinality minus 1, and the dimension of K is the maximum dimension of any face. This is a purely combinatorial description of a simplicial complex and a natural input model for computational questions.
For the purposes of exposition, in particular for describing the gadgets used in the reduction, it will be more convenient to use an alternative, geometric description of simplicial complexes: A (finite) geometric simplicial complex is a finite collection K of geometric simplices (convex hulls of affinely independent points) in R d (for some d) such that (i) if σ ∈ K and τ is a face of σ , then τ also belongs to K, and (ii) if σ 1 , σ 2 ∈ K, then σ 1 ∩ σ 2 is a face of both σ 1 and σ 2 . The polyhedron of a geometric simplicial complex K is defined as the union of simplices contained in K, σ ∈K σ . We also say that K triangulates X ⊆ R d if X is the polyhedron of K. Note that a given polyhedron usually has many different triangulations.
There is a straightforward way of translating between the two descriptions (see, e.g., [21, Chapter 1]): On the one hand, for every geometric simplicial complex K there is an associated abstract simplicial complex, namely, the collection of sets of vertices of the simplices of K (considered as finite sets, neglecting their geometric position). Conversely, for any given abstract simplicial complex K, there is a geometric simplicial complex whose associated abstract simplicial complex is (isomorphic to) K: For a sufficiently large d, pick affinely independent points p v ∈ R d , one for each vertex v of K, and let the simplices of the geometric complex be the convex hulls of the point sets For the rest of the article, we work in the setting of geometric simplicial complexes (except for the definition of joins (see below), which is simpler for abstract simplicial complexes), with the understanding that a geometric simplicial complex is simply a convenient way to describe the associated abstract simplicial complex. (In particular, we will not care about issues such as coordinate complexity of the geometric complex.) Links, Subdivisions, and Joins. Let K be a (geometric) simplical complex. The link of a vertex v in K is defined as lk K v := {σ ∈ K : v σ and conv({v} ∪ σ ) ∈ K }. A subdivision of a complex K is a complex K such that the polyhedron of K coincides with the polyhedron of K and every simplex of K is contained in some simplex of K.
We will use a specific class of subdivision, called barycentric subdivision. Given a nonempty simplex σ ∈ R d , let b σ denote its barycenter (we have v = b v for a vertex v). The barycentric subdivsion of a complex K in R d is the complex sd K with vertex set {b σ : σ ∈ K \ {∅}} and whose simplices are of the form conv The th barycentric subdivision of K, denoted sd K, is the complex obtained by taking successively the barycentric subdivision times.
The join K * L of two (abstract) simplicial complexes with disjoint sets of vertices is the complex 7 we extend this to the case = −1, by using the convention that Δ −1 = {∅} is the abstract simplicial complex whose unique face is the empty face ∅. Note that, for a pure simplicial complex K, an ordering σ 1 , σ 2 , . . . , σ n of the facets of K is a shelling if and only if the ordering Δ ∪ σ 1 , Δ ∪ σ 2 , . . . , Δ ∪ σ n is a shelling of Δ * K.
Reduced Euler Characteristic. The reduced Euler characteristic of a complex K is defined as where f i (K ) is the number of i-dimensional faces of K and, by convention, f −1 (K ) is 0 if K is empty and 1 otherwise. We will use well known properties that the reduced Euler characteristic is an invariant of homotopy type; The 3-SAT Problem. For our reduction, we use the 3-SAT problem (a classical NP-hard problem). The 3-SAT problem takes as input a 3-CNF formula ϕ, i.e., a Boolean formula which is a conjunction of simpler formulas called clauses; each clause is a disjunction of three literals, where a literal is a variable or the negation of a variable. An example of a 3-CNF formula is The size of a formula is the total number of literals appearing in its clauses (counting repetitions). The output of the 3-SAT problem states whether ϕ is satisfiable, i.e., whether we can assign variables true or false so that the formula evaluates as true. The formula ϕ given above is satisfiable, for example, by setting x 1 to true, x 2 to false, and x 3 and x 4 arbitrarily.

THE MAIN PROPOSITION AND ITS CONSEQUENCES
The cornerstone of our argument is the following construction. Proposition 8. There is an algorithm that, given a 3-CNF formula ϕ, produces, in time polynomial in the size of ϕ, a pure 2-dimensional simplicial complex K ϕ with the following properties: then ϕ is satisfiable.
The rest of this section derives our main result and its variants from Proposition 8. We then describe the construction of K ϕ in Section 4 and prove Proposition 8 in Sections 5-8.

Hardness of Shellability. Proposition 8 and Hachimori's theorem readily imply our main result.
Proof of Theorem 1. Let ϕ be a 3-CNF formula and let K ϕ denote the 2-dimensional complex built according to Proposition 8. Since the link of every vertex of K ϕ is connected, Theorem 7 guarantees that sd 2 K ϕ is shellable if and only if there existχ (K ϕ ) triangles whose removal makes K ϕ collapsible. Hence, by statements (ii) and (iii), the formula ϕ is satisfiable if and only if sd 2 K ϕ is shellable. Taking the barycentric subdivision of a 2-dimensional complex multiplies its number of simplices by at most a constant factor. The complex sd 2 K ϕ can thus be constructed from ϕ in polynomial time, and 3-SAT reduces in polynomial time to deciding the shellability of 2-dimensional pure complexes.
Hardness of k-Decomposability. Note that statement (iii) in Proposition 8 deals with arbitrary subdivision, whereas we needed it without subdivisions in the proof above. This extra elbow room comes at no cost in the proof of Proposition 8 and yields the NP-hardness of k-decomposability.
Proof of Theorem 4 and Theorem 5. Assume without loss of generality that k ≤ d. We will use the following basic facts about shellability and k-decomposability: Now, let ϕ be a 3-CNF formula and K ϕ the complex produced by Proposition 8. We have the following implications: 8 The first and last implications are by construction of K ϕ (Proposition 8). The second and second to last follow from Theorem 7, given that Proposition 8 ensures that links of vertices in K ϕ are connected. The remaining implications follow from the facts stated above (where ⇒ (x ) is used to mean that the implication follows from Fact (x)): Since the first and last statements are identical, these are all equivalences. In particular, ϕ is satisfiable if and only if the d-complex Δ d −3 * sd 3 K ϕ is k-decomposable. Since this complex can be computed in time polynomial in the size of K ϕ , which is polynomial in the size of ϕ, the first statement follows. For d ≥ 3, Δ d −3 * sd 3 K ϕ is contractible so the second statement follows. This finishes the proof of Theorem 4.
For the proof of Theorem 5, let us consider the face poset P (sd 2 K ϕ ) of the complex sd 2 K ϕ . It is shellable, by the definition, if and only if the order complex Δ(P (sd 2 K ϕ )) is shellable. However, Δ(P (sd 2 K ϕ )) is isomorphic to sd 3 K ϕ ; see, for example, [21,Chapter 1]. Therefore, P (sd 2 K ϕ ) is shellable if and only if ϕ is satisfiable by the chain of implications above. Again, P (sd 2 K ϕ ) can be constructed in polynomial time from ϕ.

CONSTRUCTION
We now define the complex K ϕ of Proposition 8. This complex consists of several building blocks, called gadgets. We first give a "functional" outline of the gadgets (in Section 4.1), insisting on the properties that guided their design, before moving on to the details of their construction and gluing (Sections 4.2 and 4.3).
We use the notational convention that complexes that depend on a variable u are denoted with round brackets, e.g., f (u), whereas complexes that depend on a literal are denoted with square brackets, e.g.,

Outline of the Construction
The gadgets forming K ϕ are designed with two ideas in mind. First, every gadget, when considered separately, can only be collapsed starting in a few special edges. Next, the special edges of each gadget are intended to be glued to other gadgets, so as to create dependencies in the flow of collapses: if an edge f of a gadget G is attached to a triangle of another gadget G , then G cannot be collapsed starting with f before some part of G has been collapsed.
Variable Gadgets. For every variable u we create a gadget V(u). This gadget has three special edges; two are associated, respectively, with true and false; we call the third one "unlocking." Overall, the construction ensures that any removal ofχ (K ϕ ) triangles from K ϕ either frees exactly f and every clause gadget collapsing all clause gadgets one of the edges associated with true or false in every variable gadget, or makes K ϕ obviously non-collapsible. This relates the removal of triangles in K ϕ to the assignment of variables in ϕ.
We also ensure that part of each variable gadget remains uncollapsible until the special unlocking edge is freed.
Clause Gadgets. For every clause c = 1 ∨ 2 ∨ 3 we create a gadget C(c). This gadget has three special edges, one per literal i . Assume that i ∈ {u, ¬u}. Then the special edge associated with i is attached to V(u) so that it can be freed if and only if the triangle removal phase freed the special edge of V(u) associated with true (if i = u) or with false (if i = ¬u). This ensures that the gadget C(c) can be collapsed if and only if one of its literals was "selected" at the triangle removal phase.
Conjunction Gadget. We add a gadget A with a single special edge, that is attached to every clause gadget. This gadget can be collapsed only after the collapse of every clause gadget has started (hence, if every clause contains a literal selected at the triangle removal phase). In turn, the collapse of A will free the unlocking special edge of every variable gadget, allowing one to complete the collapse.
Notations. For any variable u, we denote the special edges of V(u) associated with true and false by, respectively, f [u] and f [¬u]; we denote the unlocking edge by f (u). For every clause c = 1 ∨ 2 ∨ 3 , we denote by f [ i , c] the special edge of C(c) associated with i . We denote by f and the special edge of the conjunction gadget A. The attachments of these edges are summarized in Table 1.

Flow of Collapses.
Let us summarize the mechanism sketched above. Assume that ϕ is satisfiable, and consider a satisfying assignment. Remove the triangles from each V(u) so that the edge that becomes free is f [u] if u was assigned true, and f [¬u] otherwise. This will allow one to collapse each clause gadget in order to make f and free. Consequently, we will be able to collapse A and make all unlocking edges f (u) free. This allows finishing the collapses on all V(u).
On the other hand, to collapse K ϕ we must collapse f and at some point. Before this can happen, we have to collapse in each clause c = 1 ∨ 2 ∨ 3 one of the edges f [ i , c]. This, in turn, requires that f [ i ] has been made free. If we can ensure that f [¬ i ] cannot also be free, then we can read off from the collapse an assignment of the variables that must satisfy every clause, and therefore ϕ.
(If i = u, then we set u to true; if i = ¬u, then we set u to false. If there are unassigned variables after considering all clauses, we assign them arbitrarily.)

Preparation: Modified Bing's Houses
Our gadgets rely on two modifications of Bing's house, a classical example of a 2-dimensional simplicial complex that is contractible but not collapsible. Bing's house consists of a box split into two parts (or rooms); each room is connected to the outside by a tunnel through the other room; each tunnel is attached to the room that it traverses by a rectangle (or wall). The modifications that we use here make the complex collapsible, but restricts its set of free faces to exactly one or exactly three edges.
One Free Edge. We use here a modification due to Malgouyres and Francés [20]. In one of the rooms (say the top one), the wall has been thickened and hollowed out (see Figure 1). We call the resulting polyhedron a Bing's house with a single free edge, or a 1-house for short. Two special elements of a 1-house are its free edge (denoted f and in thick stroke in Figure 1) and its lower wall rectangle (denoted L and colored in light blue in Figure 1). We only consider triangulations of 1-houses that subdivide the edge f and the lower wall L. We use 1-houses for the following properties: Lemma 9. Let B be a 1-house, f its free edge and L its lower wall. In any triangulation of B, the free faces are exactly the edges that subdivide f . Moreover, B collapses to any subtree of the 1-skeleton of B that is contained in L and shares with the boundary of L a single endpoint of f .
The first statement follows from the fact that the edges that subdivide f are the only ones that are not part of two triangles (see [20,Remark 1]). The second statement was proven in [29,Lemma 7] for certain trees, but the argument holds for arbitrary trees (see Appendix A for details).
When working with 1-houses, we will usually only describe the lower wall to clarify which subtree we intend to collapse to.
Remark 10. We note that there exist smaller simplicial complexes that have properties analogous to those of the 1-house. The smallest such example is obtained by a slight modification of the dunce hat; has 7 vertices and 13 facets and is described as the first example in [15,Section 5.3]. 9 For the purposes of exposition, however, we prefer to work with 1-houses, which allows us to use some of their properties proved in [20,29]. Moreover, the construction of the 1-house is similar to the construction of another gadget, the 3-house discussed below, and we currently do not know how to replace the latter by a smaller complex.
Three Free Edges. We also use the Bing's houses with three collapsed walls introduced in [29]; we call them 3-houses for short. These are 2-dimensional complexes whose construction is more involved; we thus state its main properties, so that we can use it as a black box, and refer the reader interested in its precise definition to [29, §4]. Refer to the figure on the right (which corresponds to Figure 9 in [29]). The 3-house has exactly three free edges f 1 , f 2 , f 3 , and has three distinguished paths p 1 , p 2 , p 3 sharing a common vertex v and such that each p i shares exactly one vertex with f i and no vertex with f j for j i. In addition, it contains an edge e incident to v so that the union of p 1 , p 2 , p 3 , f 1 , f 2 , f 3 , and e forms a subdivided star (in a graph-theoretic sense) with four rays.
Let C denote the 3-house as described above. In [29], the polyhedron of C is described in detail but no triangulation is specified. We are happy with any concrete triangulation for which Lemma 11 below holds; we can in addition require that the paths p 1 , p 2 , and p 3 each consist of two edges. 10 Lemma 11 ([29, Lemma 8]). In any subdivision of C, the free faces are exactly the edges that subdivide f 1 , f 2 , and f 3 . Moreover, C collapses to the 1-complex spanned by e, p 1 , p 2 , p 3 and any two of

Detailed Construction
Section 4.1 gave a quick description of the intended functions of the various gadgets. We now flesh them out and describe how they are glued together.
Triangulations. For some parts of the complex, it will be convenient to first describe the polyhedron, then discuss its triangulation. Our description of the triangulation may vary in precision: it may be omitted (if any reasonable triangulation works), given indirectly by the properties it should satisfy, or given explicitly (for instance, to make it clear that we can glue the gadgets as announced).
Conjunction Gadget. The conjunction gadget A is a 1house. We let f and denote its free edge and v and one of the endpoints of f and . We further triangulate the lower wall so that v and has sufficiently high degree, allowing one to assign every variable u to an internal edge f (u) of the lower wall incident to v and . See the lower left wall on the right picture. Any triangulation satisfying these prescriptions and computable in time polynomial in the size of ϕ suits our purpose.
Variable Gadget. The variable gadget V(u) associated with the variable u has four parts.
(1) The first part is a triangulated 2-sphere S (u) that consists of two disks D [u] and D [¬u] sharing a common boundary circle s (u (2) The second part is a 2-complex O (u) that consists of two "boundary" circles sharing a vertex. The vertex is identified with the vertex v (u) of S (u). One of the circles is identified with s (u). The other circle is decomposed into two arcs: one is a single edge named b (u), and the other is a path with two edges which we call p(u). The vertex common to b (u) and p(u), distinct from v (u), is identified with the vertex v and of the conjunction gadget. Putting it All Together. Let ϕ be a 3-CNF formula with variables u 1 , u 2 , . . . ,u n and clauses c 1 , c 2 , . . . , c m . The complex K ϕ is defined as Note that each of the gadgets has size at most linear in the size of the formula. Consequently, the size of K ϕ is at most quadratic.
To verify the proofs in Sections 5-8, it may be useful to be able to quickly identify for a given vertex, edge, or path which 2-complexes contain it. We provide this in Table 2.

CONNECTEDNESS OF LINKS
In this section, we prove Proposition 8(i), i.e., that the link of every vertex in the complex K ϕ of Section 4 is connected. By construction, the complex K ϕ is covered by the following subcomplexes: and C(c), where u ranges over all variables, ranges over all literals, and c ranges over all clauses. We first argue that in each subcomplex, the link of every vertex is connected. We then ensure that these subcomplexes are glued into K ϕ in a way that preserves the connectedness of the links.
Links Within the Subcomplexes. The proof is straightforward but rather pedestrian. Let us start with the 1-house B. Most points have a link homeomorphic to K 3 , so connectedness is immediate. For the remaining points, depicted on the left, the links are homeomorphic to one of K 2 , K 4 , K 2,3 and K 2 · K 3 , the graph obtained by gluing K 2 and K 3 at a vertex. This settles the cases of the subcomplexes A, B(u), and X [ ].
A similar analysis for the subcomplex S (u) ∪ O (u) reveals that the links are homeomorphic to one of K 2 , K 3 , K 2,3 , and the "bull graph," i.e., the graph on 5 vertices formed from the triangle and two edges attached to it at different vertices.
Last, a careful inspection of the construction in [29] of the 3-house yields that the link of every vertex is homeomorphic to one of K 2 , K 3 , K 2,3 , K 2 · K 3 , K 2,4 or the graph obtained from a triangle by gluing three other triangles to it, one along each edge. This covers the subcomplexes C(c).

Links After Gluing.
We now argue that if v is a vertex shared by two of our subcomplexes C and C , then there is an edge incident to v and common to C and C . This ensures that the links of v in C and C share at least a vertex, so the connectedness of lk C∪C v follows from that of lk C v and lk C v. If v is shared by subcomplexes C 1 , C 2 , . . . C k , we can apply this idea iteratively by finding a sequence of edges e 1 , e 2 , . . . , e k−1 where e i is common to C i and at least one of C 1 , C 2 , . . . , Let us first examine v (u) for some variable u. This vertex is common to S (u) ∪ O (u), B(u), X [u], and X [¬u]. The connectedness of lk K ϕ v (u) follows from the existence of the following edges incident to v (u): The remaining vertices shared by two or more of our subcomplexes are defined as part of an edge common to these subcomplexes. The connectedness of the links in K ϕ of these vertices is thus immediate. This completes the proof of Proposition 8(i).

REDUCED EULER CHARACTERISTIC OF K ϕ
In this section, we compute the reduced Euler characteristic of K ϕ , preparing the proofs of Proposition 8(ii)-(iii) in the following sections. By inclusion-exclusion, for any simplicial complexes K 1 and K 2 we haveχ (6.1) In particular, if both K 2 and K 1 ∩ K 2 are contractible, thenχ (K 1 ∪ K 2 ) =χ (K 1 ). Therefore, by the claim following Equation (6.1), we may replace each of these gadgets (in any order) with the shared trees without affecting the reduced Euler characteristic. That is, where the first (big) union is over all variables u, and the second is over all pairs ( , c) where a literal belongs to a clause c.
By collapsing the pendent edges and paths, we getχ

Remark 13.
It is possible, with slightly more effort, to show that K ϕ is homotopy equivalent to K , hence to a wedge of spheres, one for each variable. This also implies Proposition 12 but for our purpose, computing the reduced Euler characteristic suffices.

SATISFIABILITY IMPLIES COLLAPSIBILITY
In this section, we prove Proposition 8(ii), i.e., that if ϕ is satisfiable, then there exists a choice of χ (K ϕ ) triangles of K ϕ whose removal makes the complex collapsible.
Literal (u). Let us fix a satisfying assignment for ϕ. For every variable u, we set (u) to u if u is true in our assignment, and to ¬u otherwise.
Triangle Removal. For every variable u, we remove a triangle from the region D[ (u)] of the sphere S (u). Proposition 12 ensures that this removes preciselyχ (K ϕ ) triangles, as announced.
Constraint Complex. It will be convenient to analyze collapses of K ϕ locally within a subcomplex, typically a gadget. To do so formally, we use constraint complexes following [29]. Given a simplicial complex K and a subcomplex M of K, we define the constraint complex of (K, M ), denoted Γ(K, M ), as follows: Collapses. We now describe a sequence of collapses enabled by the removal of the triangles. Recall that we started from the complex (c) The collapses so far have freed every edge of f [ (u i ), c]. We now consider every clause c j in turn. Put c j = ( 1 ∨ 2 ∨ 3 ) and let K denote the current complex. The assignment that we chose is satisfying, so at least one of 1 , 2 , or 3 coincides with (u i ) for some i; let us assume without loss of generality that 1 = (u i ). The edge f [ 1 , c] is therefore free and Lemma 11 yields that locally, C(c j ) collapses to the tree T (c j ) = f and ∪ p[ [ 3 , c]. Moreover, Γ(K, C(c j )) = T (c j ) so Lemma 14 ensures that K can be globally collapsed to (K \ C(c j )) ∪ T (c j ). After proceeding in this way for every complex C(c j ), the complex becomes (d) The collapses so far have freed the edge f and . We can then proceed to collapse A. Locally, Lemma 9 allows one to collapse A to the tree (From this point, we expect the reader to be able to check by her/himself that Lemma 14 allows one to perform globally the collapse described locally.) The complex becomes .
(e) The collapses so far have freed every edge f (u i ). Thus, Lemma 9 allows one to collapse each complex B(u i ) to its edge b (u i ). This frees the edge b (u i ), so the complex O (u i ) can in turn be collapsed to s (u i ) ∪ p(u i ). At this point, the complex is At this point, we are left with a 1-dimensional complex. This complex is a tree (more precisely a subdivided star, in a graph-theoretic sense, centered in v and and consisting of the paths p(u i ), the paths p[ , c], and some of the edges f [ , c]). As any tree is collapsible, this completes the proof of Proposition 8(ii).

COLLAPSIBILITY IMPLIES SATISFIABILITY
In this section, we prove Proposition 8(iii), i.e., we consider some arbitrary subdivision K ϕ of K ϕ , and prove that if K ϕ becomes collapsible after removing someχ (K ϕ ) triangles, then ϕ is satisfiable.
We thus consider a collapsible subcomplex K of K ϕ obtained by removingχ (K ϕ ) triangles from K ϕ .
Notations. Throughout this section, we use the following conventions. In general, we use hats (e.g., K) to denote subcomplexes of K ϕ . Given a subcomplex M of K ϕ , we also write M for the subcomplex of K ϕ that subdivides M.
Variable Assignment from Triangle Removal. We first read our candidate assignment from the triangle removal following the same idea as in Section 7. This relies on two observations: -The set of triangles removed in K contains exactly one triangle from each sphere S (u).
Indeed, since K is collapsible and 2-dimensional, it cannot contain a 2-dimensional sphere. Hence, every sphere S (u) had at least one of its triangles removed. By Proposition 12, χ (K ϕ ) = χ (K ϕ ) equals the number of variables of ϕ, so this accounts for all removed triangles. -For any variable u, any removed triangle in S (u) is either in D [u] or in D [¬u]. We give u the true assignment in the former case and the false assignment in the latter case.
The remainder of this section is devoted to prove that this assignment satisfies ϕ. It will again be convenient to denote by (u) the literal corresponding to this assignment, i.e., (u) = u if u was assigned true and (u) = ¬u otherwise.
Analyzing the Collapse. Let us fix some collapse of K. We argue that our assignment satisfies ϕ by showing that these collapses must essentially follow the logical order of the collapse constructed in Section 7. To analyze the dependencies in the collapse, it is convenient to consider the partial order that it induces on the simplices of K: σ ≺ τ if and only if in our collapse, σ is deleted before τ . We also write σ ≺ M for a subcomplex M of K if σ was removed before removing any simplex of M.
The key observation is the following dependency. We can now identify e. Observe that b (u) ⊂ B (u). As B (u) is a 1-house, Lemma 9 ensures that the first edge removed from B (u) must subdivide f (u). Hence, there is an edge e 2 (u) ⊂ f (u) such that e 2 (u) ≺ e 1 (u). Since f (u) ⊂ A , another 1-house, the same reasoning yields an edge e 3 (u) in f and such that e 3 (u) ≺ e 2 (u). Let e denote the first edge removed from A among all edges e 3 (u). At this point, we have for every variable u e ≺ e 2 (u) ≺ e 1 (u) ≺ D [¬ (u)], as announced.
Let e denote the edge of A provided by Lemma 15, i.e., satisfying e ≺ D [¬ (u)] for every variable u. We can now check that the variable assignment does satisfy the formula: . It follows that i ¬ (u) and we must have i = (u). The definition of (u) thus ensures that our assignment satisfies the clause c.
Since our assignment satisfies every clause, it satisfies ϕ.

APPENDIX A COLLAPSING A 1-HOUSE
In this section, we prove the second statement of Lemma 9 (recalled below). We use an auxiliary lemma.
Lemma 16. A triangulation of a topological disk collapses to any tree contained in its 1-skeleton.
Proof. Let K be a triangulation of a topological disk (i.e., the polyhedron of K is homeomorphic to a 2-dimensional disk) and T a tree contained in the 1-skeleton of K. While there is an edge of K that is free and not in T , we collapse such an edge. Let K denote the resulting complex.
Let us first argue that K contains no triangle. Let c denote the (possibly empty) Z 2 -chain obtained by summing the triangles of K . The 1-chain ∂c is a 1-cycle by definition and it is supported on T . Indeed, every edge in K is contained in zero, one, or two triangles and any edge contained in exactly one triangle and not in T could be used as a free face to further collapse K . Since a tree does not contain any nontrivial 1-cycle, it follows that ∂c is empty. In K, any nonempty 2-chain has a non-empty boundary. It follows that c is empty and K is indeed 1-dimensional.
Since K is a collapse of K, it must be contractible. Hence, K is a tree and, by construction, it contains T . The statement follows since a tree always collapses to any of its sub-trees.
We can now prove the announced statement: that a 1-house with free edge f and lower wall L collapses to any subtree t of the 1-skeleton of B that is contained in L and shares with the boundary of L a single endpoint of f . Proof of Lemma 9. We apply Lemma 16 repeatedly. First, we collapse the lower wall L to the tree formed by t and the subcomplex of B triangulating (∂L) \ f . Next, we collapse the lowest floor, except for the edges that belong to walls that are still present. We proceed to collapse every wall that used to be attached to the lowest floor. The resulting complex is already a disk with t attached to it. We collapse the disk to the attachment point and are done.