Gadget structures in proofs of the Kochen-Specker theorem

The Kochen-Specker theorem is a fundamental result in quantum foundations that has spawned massive interest since its inception. We show that within every Kochen-Specker graph, there exist interesting subgraphs which we term $01$-gadgets, that capture the essential contradiction necessary to prove the Kochen-Specker theorem, i.e,. every Kochen-Specker graph contains a $01$-gadget and from every $01$-gadget one can construct a proof of the Kochen-Specker theorem. Moreover, we show that the $01$-gadgets form a fundamental primitive that can be used to formulate state-independent and state-dependent statistical Kochen-Specker arguments as well as to give simple constructive proofs of an"extended"Kochen-Specker theorem first considered by Pitowsky.


I. INTRODUCTION
According to the quantum formalism, a projective measurement M is described by a set M = {V 1 , . . . , V m } of projectors V i that are orthogonal, V i V j = δ ij V i , and sum to the identity, i V i = I. Each V i corresponds to a possible outcome i of the measurement M and determines the probability of this outcome when measuring a state |ψ through the formula Pr ψ (i | M ) = ψ|V i |ψ .
If two physically distinct measurements M = In other words, though quantum measurements are defined by sets of projectors, the outcome probabilities of these measurements are determined by the individual projectors alone, independently of the broader setor the context -to which they belong. We say that the probability assignment is non-contextual. The Kocken-Specker (KS) theorem [1] is a cornerstone result in the foundations of quantum mechanics, establishing that, in Hilbert spaces of dimension greater than two, it is not possible to find a deterministic outcome assignment that is non-contextual. Deterministic means that all outcome probabilities should take only the values 0 or 1. Non-contextual means, as above, that these probabilities are not directly assigned to the measurements themselves, but to the individual projectors from which they are composed, independently of the context to which the projectors belong. More formally, the KS theorem establishes that it is not possible to find a rule f such that which would provide a deterministic analogue of a quantum state.
The most common way to prove the KS theorem involves a set S = {V 1 , . . . , V n } of rank-one projectors. We can represent these projectors by the vectors (strictly speaking, the rays) onto which they project and thus view S as a set of vectors S = {|v 1 , . . . , |v n } ⊂ C d .
Consider an assignment f : S → {0, 1} that associates to each |v i in S a probability f (|v i ) ∈ {0, 1}. To interpret the f (|v i ) as valid measurement outcome probabilities, they should satisfy the two following conditions: • |v ∈O f (|v ) ≤ 1 for every set O ⊆ S of mutually orthogonal vectors; • |v ∈B f (|v ) = 1 for every set B ⊆ S of d mutually orthogonal vectors. (3) The first condition is required because if a set of vectors are mutually orthogonal, they may be part of the same measurement, but then their corresponding probabilities must sum at most to 1. The second condition follows from the fact that if d vectors are mutually orthogonal in C d , they form a complete basis, and then their corresponding probabilities must exactly sum to one. Note that the first condition implies in particular that any two vectors |v 1 and |v 2 in S that are orthogonal cannot both be assigned the value 1 by f . We call any assignment f : S → {0, 1} satisfying the above two conditions, a {0, 1}-coloring of S. The Kocken-Specker theorem states that if d ≥ 3, there exist sets of vectors that are not {0, 1}-colorable, thus establishing the impossibility of a non-contextual deterministic outcome assignment. We call such {0, 1}-uncolorable sets, KS sets. In their original proof, Kochen and Specker describe a set S of 117 vectors in C d dimension d = 3 [1]. The minimal KS set contains 18 vectors in dimension d = 4 [18,20].
In this paper, we identify within KS sets interesting subsets which we term 01-gadgets. Such 01-gadgets are {0, 1}-colorable and thus do not represent by themselves KS sets. However, they do not admit arbitrary {0, 1}-2 coloring: in any {0, 1}-coloring of a 01-gadget, there exist two non-orthogonal vectors |v 1 and |v 2 that cannot both be assigned the color 1. We show that such 01gadgets form the essence of the KS contradiction, in the sense that every KS set contains a 01-gadget and from every 01-gadget one can construct a KS set.
Besides being useful in the construction of KS sets, we show that 01-gadgets also form a fundamental primitive in constructing statistical KS argumentsà la Clifton [17] and state-independent non-contextuality inequalities as introduced in [25]. Moreover, we show that an "extended" Kochen-Specker theorem considered by Pitowsky [22] and Abbott et al. [2,3] can be easily proven using an extension of the notion of 01-gadgets. We give simple constructive proofs of these different results.
Certain 01-gadgets have already been studied previously in the literature, as they possess other interesting properties. In particular, 01-gadgets were also used in [15] to show that the problem of checking whether certain families of graphs (which represent natural candidates for KS sets) are {0, 1}-colorable is NP-complete, a result which we refine in the present paper.
This paper is organized as follows. In section II, we introduce some notation and elementary concepts, in particular the representation of KS sets as graphs. In section III, we define the notion of 01-gadgets and establish their relation to KS sets. In section IV, we give several constructions of 01-gadgets and associated KS sets. In section V, we show how 01-gadgets can be used to construct statistical KS arguments. In section VI, we also show a simple constructive proof of the extended Kochen-Specker theorem of Pitowsky [22] and Abbott et al. [3] using a notion of extended 01-gadgets which we introduce. In section VII, we show that 01-gadgets can be used to establish the NP-completeness of {0, 1}-coloring of the family of graphs relevant for KS proofs. We finish by a general discussion and conclusion in section IX.

II. PRELIMINARIES
Much of the reasoning involving KS sets is usually carried out using a graph representation of KS sets defined below. We thus start by reminding some basic graphtheoretic definitions.
Graphs. Throughout the paper, we will deal with simple undirected finite graphs G, i.e., finite graphs without loops, multi-edges or directed edges. We denote V (G) the vertices of G and E(G) the edges of G. If two vertices v 1 , v 2 are connected by an edge, we say that they are adjacent, and write v 1 ∼ v 2 .
A subgraph H of G (denoted H < G) is a graph formed from a subset of vertices and edges of G, i.e., V (H) ⊆ V (G) and E(H) ⊆ E(G). An induced subgraph K of G (denoted K G) is a subgraph that includes all the edges in G whose endpoints belong to the vertex subset A clique in the graph G is a subset of vertices Q ⊂ V (G) such that every pair of vertices in Q is connected by an edge, i.e., ∀v 1 , v 2 ∈ Q we have v 1 ∼ v 2 . A maximal clique in G is a clique that is not a subset of a larger clique in G. A maximum clique in G is a clique that is of maximum size in G. The clique number ω(G) of G is the cardinality of a maximum clique in G.
Orthogonality graphs. The use of graphs in the context of the KS theorem comes from the fact that it is convenient to represent the orthogonality relations in a KS set S by a graph G S , known as its orthogonality graph [6,7]. In such a graph, each vector |v i in S is represented by a vertex v i of G S and two vertices v 1 , v 2 of G S are connected by an edge if the associated vectors |v 1 , |v 2 are orthogonal, i.e. v 1 ∼ v 2 if v 1 |v 2 = 0 (for instance the graph in Fig. 1 is the orthogonality graph of the set of vectors given by eq. (5)).
It follows that in an orthogonality graph G S , a clique corresponds to a set of mutually orthogonal vectors in S. If S ⊂ C d contains a basis set of d orthogonal vectors, then the maximum clique in G S is of size ω(G S ) = d.
Coloring of graphs. The problem of {0, 1}-coloring S thus translates into the problem of coloring the vertices of its orthogonality graph G S such that vertices connected by an edge cannot both be assigned the color 1 and maximum cliques have exactly one vertex of color 1. Formally, we say that an arbitrary graph G is {0, 1}-colorable if there exists an assignment f : The KS theorem is then equivalent to the statement that there exist for any d ≥ 3, finite sets of vectors S ⊂ C d (the KS sets) such that their orthogonality graph G S is not {0, 1}-colorable. Deciding if a given graph G admits a {0, 1}-coloring is NP-complete [15]. Note that any graph G that is not {0, 1}-colorable must contain at least two cliques of maximum size ω(G). Indeed, if a graph G contains a single clique of maximum size it always admits a {0, 1}-coloring consisting in assigning the value 0 to all its vertices, except for one vertex in the maximum clique that is assigned the value 1.
Orthogonal representations. For a given graph G, an orthogonal representation S of G in dimension d is a set of non-zero vectors S = {|v i } in C d obeying the orthogonality conditions imposed by the edges of the graph, i.e., v 1 ∼ v 2 ⇒ v 1 |v 2 = 0 [28]. We denote by d(G) the minimum dimension of an orthogonal representation of G and we say that G has dimension d(G). Obviously, d(G) ≥ ω(G). A faithful orthogonal representation of G is given by a set of vectors S = {|v i } that in addition obey the condition that non-adjacent vertices are assigned non-orthogonal vectors, i.e., v 1 ∼ v 2 ⇔ v 1 |v 2 = 0 and that distinct vertices are assigned different vectors, i.e., v 1 = v 2 ⇔ |v 1 = |v 2 . We denote by d * (G) the minimum dimension of such a faithful orthogonal repre-sentation of G and we say that G has faithful dimension d * (G).
Given a graph G of dimension d(G), the orthogonality graph G S of the minimal orthogonal representation S of G has faithful dimension d * (G S ) = d(G). The graph G S can be seen as obtained from G by adding edges (between vertices that are non-adjacent in G, but corresponding to vectors in S that are nevertheless orthogonal) and by identifying certain vertices (those that correspond to identical vectors in S). We say that G S is the faithful version of G.
KS graphs. While the non-{0, 1}-colorability of a set S translates into the non-{0, 1}-colorability of its orthogonality graph G S , the non-{0, 1}-colorability of an arbitrary graph G translates into the non-{0, 1}-colorability of one of its orthogonal representations only if this representation has the minimal dimension d(G) = ω(G). Indeed, it is only under this condition that the requirement that v∈Qmax f (v) = 1 in the definition of the {0, 1}-coloring of the graph G gives rise to the corresponding requirement that v∈Qmax f (|v ) = 1 for its orthogonal representation (if the dimension d is larger If a graph G is not {0, 1}-colorable and has dimension d(G) = ω(G), it thus follows that its minimal orthogonal representation S forms a KS set. If in addition d * (G) = ω(G), we say that G is a KS graph (this last condition can always be obtained by considering the faithful version of G, i.e., the orthogonality graph G S of its minimal orthogonal representation S).
The problem of finding KS sets can thus be reduced to the problem of finding KS graphs. But as we have noticed above, deciding if a graph is {0, 1}-colorable is NPcomplete. In addition, while finding an orthogonal representation for a given graph can be expressed as finding a solution to a system of polynomial equations, efficient numerical methods for finding such representations are still lacking. Thus, finding KS sets in arbitrary dimensions is a difficult problem towards which a huge amount of effort has been expended [21]. In particular, "records" of minimal Kochen-Specker systems in different dimensions have been studied [18], the minimal KS system in dimension four is the 18-vector system due to Cabello et al. [18,20] while lower bounds on the size of minimal KS systems in other dimensions have also been established.

III. 01-GADGETS AND THE KOCHEN-SPECKER THEOREM
We now introduce the notion of 01-gadgets that play a crucial role in constructions of KS sets. In other words, while a 01-gadget S gad admits a {0, 1}coloring, in any such coloring the two distinguished nonorthogonal vertices cannot both be assigned the value 1 (as if they were actually orthogonal). We can give an equivalent, alternative definition of a gadget as a graph.
In the following when we refer to a 01-gadget, we freely alternate between the equivalent set or graph definitions.
An example of a 01-gadget in dimension 3 is given by the following set of 8 vectors in C 3 : where the two distinguished vectors are |v 1 = |u 1 and |v 2 = |u 8 . Its orthogonality graph is represented in Fig. 1. It is easily seen from this graph representation that the vertices u 1 and u 8 cannot both be assigned the value 1, as this then necessarily leads to the adjacent vertices u 4 and u 5 to be both assigned the value 1, in contradiction with the {0, 1}-coloring rules. This graph was identified by Clifton, following work by Stairs [17,26], and used by him to construct statistical proofs of the Kochen-Specker theorem. We will refer to it as the Clifton gadget G Clif . The Clifton gadget and similar gadgets were termed "definite prediction sets" in [21]. We identify the role played by 01-gadgets in the construction of Kochen-Specker sets via the following theorem.
Theorem 1. For any Kochen-Specker graph G KS , there exists a subgraph G gad < G KS with ω(G gad ) = ω(G KS ) that is a 01-gadget. Moreover, given a 01-gadget G gad , one can construct a KS graph G KS with ω(G KS ) = ω(G gad ).
The demonstration of our theorem is constructive, it allows to build a 01-gadget from a KS graph and conversely. The 01-gadget in the original 117-vector proof by Kochen-Specker is the Clifton graph in Fig. 1. A 16-vertex 01-gadget in dimension 4 that is an induced subgraph of the 18-vertex KS graph introduced in [18] is represented in Fig. 2.
Proof. We start by showing the first part of the Theorem: that one can construct a 01-gadget G gad from any KS graph G KS . Given G KS , which by definition is not {0, 1}-colorable, we first construct, by deleting vertices one at a time, an induced subgraph G crit that is vertexcritical. By vertex-critical, we mean that (i) G crit is not {0, 1}-colorable, but (ii) any subgraph obtained from it by deleting a supplementary vertex does admit a {0, 1}coloring. Observe that in the process of constructing G crit we are able to preserve the maximum clique size, i.e., ω(G crit ) = ω(G KS ). This is because we are able to delete vertices from all but two maximum cliques, simply because at least two maximum cliques must exist in a graph that is not {0, 1}-colorable. Observe also that G crit is itself a KS graph, since the faithful orthogonal representation of G KS in dimension d = ω(G KS ) provides an orthogonal representation of G crit in the same dimension. We consider three cases: (i) there exists a vertex in G crit that belongs to a single maximum clique, (ii) all vertices in G crit belong to at least two maximum cliques, and there exists a vertex that belong to exactly two maximum cliques; (iii), all vertices in G crit belong to at least three maximum cliques. In the first two cases, which happens to be the case encountered in all known KS graphs, we will be able to prove that the 01-gadget appears as an induced subgraph while in the third case, the 01-gadget appears as a subgraph that may not necessarily be induced.
In case (i), let v be one of the vertices having the property that it belongs to a single maximum clique. We denote this clique Q 1 ⊂ G crit S . Deleting v leads to a graph G crit \ v that is {0, 1}-colorable by definition. However, observe that in any coloring f of G crit \ v, all the vertices in Q 1 \ v are assigned the value 0 by f . This is because, if one of these vertices were assigned value 1, then one could obtain a valid coloring of G crit from f by defining f (v) = 0. Choose a vertex v 1 ∈ Q 1 \ v and any other non-adjacent vertex v 2 ∈ G crit \ v. Then G crit \ v is the required 01-gadget with v 1 , v 2 playing the role of the distinguished vertices.
In case (ii), let v be one of the vertices having the property that it belongs to exactly two maximum cliques, which we denote Q 1 , Q 2 ⊂ G crit . Again, deleting v leads to a graph G crit \ v that is {0, 1}-colorable. However, in any coloring f of G crit \ v, it cannot be that a value f (v 1 ) = 1 and a value f (v 2 ) = 1 are simultaneously assigned to a vertex v 1 ∈ Q 1 \ v and a vertex v 2 ∈ Q 2 \ v. This is again because if there was such a coloring f , then one could obtain a valid coloring for G crit by defining f (v) = 0, in contradiction with the criticality of G crit . Choose v 1 ∈ Q 1 \ v and v 2 ∈ Q 2 \ v such that v 1 and v 2 are not adjacent. Two such vertices must exist. Indeed, if all vertices Q 1 \v where adjacent to all vertices of Q 2 \v, then the maximum clique size would be strictly greater than ω(G crit ). Therefore, we have that G crit \ v is the required 01-gadget with v 1 , v 2 the distinguished vertices.
Finally, we consider the case (iii) where each vertex in G crit belongs to at least three maximum cliques. In this case, we cannot proceed as above where we remove a certain vertex v and pick vertices from two maximal cliques containing v, because we can no longer guarantee that these two vertices cannot simultaneously be assigned the value 1 (we can only guarantee that a certain t-uple of vertices, each one picked from the t maximum cliques to which v belongs, cannot all simultaneously be assigned the value 1). Instead, we proceed as follows. We start by deleting edges of G crit one at a time, to construct a new graph G crit that is edge-critical. By edge-critical, we mean, similarly to the construction above, that G crit is not {0, 1}-colorable, but any graph obtained from it by deleting a supplementary edge (and thus also by deleting a supplementary vertex) does admit a {0, 1}-coloring. As above, we are able to preserve the maximum clique size in the process, i.e., ω(G crit ) = ω(G crit ) = ω(G KS )) and G crit is still a KS graph admitting an orthogonal representation in dimension d = ω(G crit ).
If the resulting graph G crit is as in the cases (i) and (ii) above, we proceed as before to construct a 01-gadget from a graph G crit \ v, with the caveat that choosing two non-adjacent vertices v 1 and v 2 in G crit does not necessarily guarantee that they are non-orthogonal in the natural representation induced by the one of G KS . This is because we have been removing edges from G crit to construct G crit . However, we can always choose two vertices v 1 and v 2 that were non-adjacent in the original graph G KS and thus that correspond to non-orthogonal vectors. Again, this is because otherwise the maximum clique size of G KS would be greater than ω(G KS ). The 01-gadget construction can then be completed by taking the faithful version of G crit \ v.
If the resulting graph G crit is not as in the cases (i) and (ii) above, we proceed as follows. Let v be an arbitrary vertex of G crit . By assumption, this vertex belong to at least two maximun cliques Q 1 , Q 2 (and actually even at least a third one). Delete all the edges ( In the first case, we must necessarily have that f (v ) = 0 for all v ∈ Q 1 \ v, since otherwise the coloring f would also define a valid coloring for G crit . In the second case, we have f (v ) = 0 for all v ∈ Q 2 \ v by definition of a coloring. We thus conclude that it cannot be simultaneously the case that Choose v 1 ∈ Q 1 and v 2 ∈ Q 2 non-adjacent in G KS , which is always possible by the same argument as given before. The faithful version of the graph G crit \ E(Q 1 ) forms the required 01-gadget with v 1 , v 2 being the distinguished vertices.
We now proceed to prove the second part of the statement. Starting from a gadget graph we give a construction of a KS graph. The construction generalizes the original Kochen-Specker construction of [1] to arbitrary dimensions and arbitrary repeating gadget units. Given G gad , we know that there exists a faithful orthogonal rep- Let v 1 , v 2 denote the distinguished vertices, and let |v ⊥ 2 denote a vector orthogonal to |v 2 that lies in the plane span(|v 1 , |v 2 ), spanned by the vectors |v 1 and |v 2 , with θ = arccos | v 1 |v ⊥ 2 | > 0 by definition of a 01-gadget. We consider the following cases: (i) π 2θ is rational and can be written as p q with q an odd integer, (ii) π 2θ is rational and is given by p q with q an even integer, or alternatively, π 2θ is irrational. Case (i): π 2θ is rational and is given by p q with q an odd integer. Recall that |v ⊥ 2 is orthogonal to |v 2 in the plane span(|v 1 , |v 2 ). In the subspace orthogonal to span(|v 1 , |v 2 ), choose a basis consisting of d − 2 mutually orthogonal vectors |w 1 , . . . , |w d−2 . Denoting G gad as the orthogonality graph of the entire set of these . . , |w d−2 }, we obtain a gadget graph that can be used as a building block in a Kochen-Specker type construction. In particular, the crucial property of G gad is that in any {0, 1}-coloring This can be seen as follows: f (v 1 ) = 1 implies, by the {0, 1}-coloring rules, that f (w i ) = 0 for all i ∈ [d − 2]. Moreover, by the gadget property, we have f (v 2 ) = 0, and this imposes f (v ⊥ 2 ) = 1 to satisfy the requirement that exactly one of the vertices in the maximum clique (v 2 , v ⊥ 2 , w 1 , . . . , w d−2 ) is assigned value 1.
As in the original KS construction of [1], we construct a chain of p + 1 copies G (i) gad (i = 0, 1, . . . , p} of G gad so that pθ = q π 2 is an odd integral multiple of π 2 . These copies are obtained from the realization of G gad by successive applications of a unitary U, i.e., |v . . , p and j = 1, . . . , n and similarly for the other vectors in G gad . This unitary operator U is defined as where |v ⊥ 1 denotes the vector orthogonal to |v 1 in the plane span(|v 1 , |v 2 ) and where 1 W denotes the identity on the subspace orthogonal to span(|v 1 , |v 2 ). Writing |v ⊥ 2 = α|v 1 + β|v ⊥ 1 for some α, β ∈ C, we see that applying once U to the faithful realization of G gad gives We have evidently We thus have that under successive applications of U, |v , and so on, with |v gad gives rise to a graph with a clique formed by the vertices v and the d−2 vectors that complete the basis. The resulting graph is a Kochen-Specker graph since in any {0, 1}coloring, if any of the vertices in this maximal clique is assigned value 1 then so are all of them, giving rise to a contradiction. We thus obtain a finite system of vectors given by the union of the vector sets in each of the graphs, that gives rise to a proof of the Kochen-Specker theorem in dimension ω(G gad ).
Case (ii): π 2θ is rational and is given by p q with q an even integer, or alternatively, π 2θ is irrational. In this case, we construct from G gad a larger gad-getG gad with the property that the angleθ between the distinguished vectors obeys π 2θ =p q ∈ Q, with q an odd integer. As in the previous case, we let |v ⊥ span(|v 1 , |v 2 ), and |v ⊥ 1 be the vector orthogonal to |v 1 in this plane, so that |v ⊥ 2 = α|v 1 + β|v ⊥ 1 , for some α, β ∈ C. We also consider a basis {|w 1 , . . . , |w d−2 } for the subspace orthogonal to span(|v 1 , |v 2 ) and denote G gad as the orthogonality graph of the set of vectors with |v 2 , |w 1 , . . . , |w d−2 orthogonal to |v ⊥ 2 and orthogonal to each other. Applying U to the orthogonal representation of the gadget gives that We choose |v 2 and thereby U such that π 2θ =p q ∈ Q withq an odd integer. Now construct G gad as the orthogonality graph of the set of vectors We have thus concatenated two gadgets to form the new gadget G gad with the property that if f (|v 1 ) = 1 then also f (|v ⊥ 2 ) = 1 and consequently also f (U|v ⊥ 2 ) = 1. We are now in the same position as in the previous case i.e., we may construct a chain ofp+1 copies G (i) gad of G gad and follow the steps as in the previous case to construct the entire KS set in dimension ω(G gad ).
In both cases, we thus obtain a construction of a Kochen-Specker set in dimension ω(G gad ), completing the proof.
We remark that the above Theorem does not guarantee that the 01-gadgets appear as induced subgraphs in KS graphs; this is the case only when at least one vertex in the {0, 1}-critical subgraph of the KS graph belongs to at most two maximum cliques.

IV. OTHER 01-GADGETS AND KS SETS CONSTRUCTIONS
In this section, we make some interesting observations about 01-gadgets and provide new constructions of 01gadgets that will be used in the next sections. Proof. For d = 3, a 8-vertex 01-gadget is simply given by the Clifton gadget G Clif . In higher dimensions, a new 01-gadget G Clif can be obtained by adding d − 3 vertices to G Clif with edges joining the additional vertices to each other and to each of the 8 vertices in G Clif . Clearly, a faithful representation of G Clif can be obtained by supplementing the 3-dimensional representation of G Clif with d − 3 mutually orthogonal vectors in the complementary subspace. The construction preserves the property that a {0, 1}-coloring of G Clif exists and that the two distinguished vertices v 1 , v 2 of G Clif , now viewed as vertices of G Clif , cannot both be assigned the value 1 in any {0, 1} coloring.
The 8-vertex Clifton gadget G Clif was shown to be the minimal 01-gadget in dimension 3 [15]. This result was obtained by an exhaustive search over all non-isomorphic square-free graphs of up to 7 vertices. It is an open question to prove if the simple construction in Lemma 1 gives the minimal 01-gadgets in dimension d > 3 or whether even smaller gadgets exist in these higher dimensions.
In the Clifton gadget G Clif the overlap between the two distinguised vertices is | v 1 |v 2 | = 1/3. The following Lemma shows that one can reduce this overlap at the expense of increasing the dimension by one.
⊂ C d be the set of n vectors forming the gadget G. We define G as the set of n + 1 vectors {|v i } n i=0 in C d+1 defined as follows. For given |u i ∈ C d , let |ũ i ∈ C d+1 be the vector obtained by padding a 0 to the end of |u i . Define the vectors |v i as with a free parameter x ∈ R and corresponding normalization factor N . Now, notice that the orthogonality relations between the set of vectors |v 1 , . . . , |v n is the same as the orthogonality relations between the set of vectors |u 1 , . . . , |u n . The only additional orthogonality relations in G involve |v 0 , which is orthogonal to all other vectors but |v 1 . By this property, it follows that if f (|v 0 ) = 0 in a coloring of G , then the coloring of the remaining vectors |v 1 , . . . , |v n is constrained exactly as for |u 1 , . . . , |u n| in G. In particular, we cannot have simultaneously f (|v 1 ) = f (|v 2 ) = 1. Now simply observe that if f (|v 2 ) = 1, we must have necessarily have f (|v 0 ) = 0 since |v 0 ⊥ |v 2 and thus |v 1 cannot also satisfy f (|v 1 ) = 1. In other words, G is a 01-gadget with |v 1 , |v 2 playing the role of the distinguished vertices. Finally, we see that by varying the free parameter x ∈ R, we get any overlap 0 < | v 1 |v 2 | ≤ | u 1 |u 2 | between the distinguished vertices.
We now show the following.
Theorem 2. Let |v 1 and |v 2 be any two distinct nonorthogonal vectors in C d with d ≥ 3. Then there exists a 01-gadget in dimension d with |v 1 and |v 2 being the two distinguished vertices.
While the existence of such a construction can be anticipated from the Kochen-Specker construction from Theorem 1, we give a construction with much fewer vectors based on the 43-vertex graph of Fig. 3.
Proof. The construction is based on the 43-vertex graph G of Fig. 3. We first show the construction for C 3 , and then straightforwardly extend it to C d for d > 3. Suppose thus that we are given |v 1 , |v 2 ∈ C 3 . We consider two cases: Suppose without loss of generality that |v 1 = (1, 0, 0) T and |v 2 = } will suffice to construct the gadget with u 1 and u 22 the two distinguished vertices, corresponding to |v 1 and |v 2 . First, it is easily verified from the graph that in any {0, 1}-coloring f , f (u 1 ) and f (u 22 ) cannot both be assigned the value 1. It thus only remains to provide an orthogonal representation of the graph G ind . Such a representation is given by the following set of (non-normalized) vectors: with It is easily verified that this set of vectors satisfy all the orthogonality relations encoded by the induced subgraph G ind we are considering.
Case ( x, 0) T / √ 2 + 2x 2 with 0 < x ≤ 1. In this case, we consider the entire 43-vertex graph G from Fig. 3, with u 1 and u 42 the two distinguished vertices, corresponding to |v 1 and |v 2 . Again, it is easily seen that in any {0, 1}coloring f , f (u 1 ) and f (u 42 ) cannot both be assigned the value 1. It thus only remains to provide an orthogonal representation of the graph G.
Theorem 2 allows to construct new KS graphs than the one given in the proof of Theorem 1. Some of such constructions in dimension 3 are shown in Fig. 4. A crucial role in these is played by the repeating unit G 0 shown in Fig. 4 (a). This unit is given by a set of basis vectors {|u 1 , |u 2 , |u 3 } all connected via appropriate 01gadgets to a central vector |v 1 . In any {0, 1}-coloring f of G 0 , one of the three basis vectors must be assigned the value 1, so that we necessarily have f (|v 1 ) = 0. In other words, G 0 is a graph in which a particular vector necessarily takes value 0 in any {0, 1}-coloring. Note that this property is also shown by the graph in Fig. 3 Note that from G 0 , one can also construct an orthogonality graph G 1 in which a particular vector necessarily takes values 1 in any {0, 1}-coloring. Indeed, consider two copies of G 0 with the respective central vectors |v 1 and |v 2 orthogonal to each other, so that f (|v 1 ) = f (|v 2 ) = 0. Then, in any {0, 1}-coloring of the resulting graph G 1 , the third basis vector |v 3 ⊥ |v 1 , |v 2 necessarily obeys f (|v 3 ) = 1.
In Fig. 4 (b), a KS proof in C 3 is based on the unit G 0 , repeated three times with a basis set of central vectors |v 1 , |v 2 , |v 3 . By the property of G 0 in any {0, 1}coloring, all these three basis vectors are assigned value 0 leading to a KS contradiction. In Fig. 4 (c), the construction is based on two basis sets {|u 1 , |u 2 , |u 3 } and {|v 1 , |v 2 , |v 3 } with an appropriate 01-gadget connecting every pair |u i , |v j for i, j = 1, 2, 3. So that assigning value 1 to any of the vectors in one basis, necessarily implies that all of the vectors in the other basis are assigned value 0, leading to a contradiction. Furthermore, the construction can be readily extended to derive KS graphs using any frustrated graph.

01-GADGETS
The KS theorem can be seen as a proof that no noncontextual deterministic hidden-variable interpretation of quantum theory is possible. In a deterministic hiddenvariable model, we aim to reproduce the quantum probabilities in term of hidden-variables λ, where a distribution q ψ (λ) over the hidden-variables is associated to each quantum state |ψ , and where for each λ, the model predicts with certainty that one of the outcomes i will occur for each measurement M , i.e., the hidden measurement outcome probabilities f λ (i|M ) satisfy f λ (i|M ) ∈ {0, 1}. Furthermore, the model is non-contextual if, as in the quantum case, the probabilistic assignment to the outcome i of the (projective) measurement M , only depends on the corresponding projector V i , independently of the wider context provided by the full description of the measurement M = {V 1 , V 2 , . . . , V n }. In other words in a noncontextual deterministic hidden-variable, we aim to write for every projector V : where f λ (V ) ∈ {0, 1}. Obviously, we should also require for consistency that i∈O f (V i ) ≤ 1 for any set O of mutually orthogonal projectors, with equality when the projectors in O sum to the identity.
No-go theorems against such models, i.e., "proofs of contextuality" , are usually obtained by considering a finite set S = {|v 1 , . . . , |v n } ⊂ C d of rank-one projectors V i , represented as vectors through V i = |v i v i |. Specializing to this case, a non-contextual hidden variable model should satisfy for each |v i in S and each |ψ in C d , where the f λ : S → {0, 1} are {0, 1}-colorings of S. At least three types of no-go theorems, from strongest to weakest, against such non-contextual hidden-variable models can be constructed.
The first types correspond to Kochen-Specker theorems. They establish that for certain sets S, it is not possible to consistently define {0, 1}-colorings f λ of S, even before attempting to use them to reproduce the quantum probabilities. This is what we have discussed until now.
In the second type of proofs, a {0, 1}-coloring of S is not excluded. But it can be shown that for any such coloring f λ of S, a certain inequality i c i f λ (|v i ) ≤ c 0 must necessarily be satisfied, while in the quantum case, it happens that i c i |v i v i | > c 0 I. In other words, though it is possible to find a {0, 1} assignment f λ (|v i ) to each projector |v i v i | in S that is compatible with the orthogonality relations among such projectors, any such assignment fails to reproduce some more complex relation of the type i c i |v i v i | > c 0 I satisfied by these projectors. This immediately implies a contradiction with eq. (16), since in the quantum case we have for any |ψ , i c i | ψ|v i | 2 > c 0 , while according to a non-contextual hidden variable model, we Such no-go theorems are referred to as "statistical state-independent" KS arguments and were introduced by Yu and Oh [25].
Finally, for certain sets S, it is possible to find valid {0, 1}-colorings that do not lead to any type of contradictions of the second type above. However, it is not possible to take mixtures of such colorings, as in eq. (16), to reproduce the predictions of certain quantum states |ψ . Such no-go theorems are referred to as "statistical state-dependent" KS arguments and were introduced by Clifton in [17].
While we have seen in the previous section how proofs of the KS theorem can be constructed using 01-gadgets, in this section we show how to use them to build statistical state-independent and state-dependent KS arguments

A. State-independent KS arguments
In [25], Yu and Oh introduced a set of 13 vectors in C 3 that provides a state-independent proof of contextuality, despite not being a KS set. We show how using Theorem 2, it is possible to construct other state-independent proofs of contextuality based on 01-gadgets. To do this, we make use of the following lemma.
Proof. Since |u i form the vertices of the d-simplex, we have u i |u j = − 1 d for any i = j ∈ {1, . . . , d + 1}. It then follows This then implies that Now, state-independent KS arguments for C d are straightforwardly constructed as follows. For every pair of vectors |u i , |u j of the d-simplex, consider a 01-gadget S ij with |u i , |u j the distinguished vertices. Since |u i and |u j are non-orthogonals, such gadgets exists, as implied by Theorem 2. The resulting set of vectors S = ∪ ij S ij exhibits state-independent contextuality. Indeed, by the property of the 01-gadgets, only one of the vectors |u i for i = 1, . . . , d + 1 can be assigned the value 1 in any {0, 1}-coloring of S. It thus follows that On the other hand, from Lemma 3, every state |ψ from While we have used the d + 1 vertices of a d-simplex in the construction above, we observe that any set {|u i } of vectors in C d such that i | ψ|u i | 2 > 1 for all |ψ ∈ C d can be utilized in the construction, although such a set clearly needs to contain at least d + 1 vectors.

B. State-dependent KS arguments
The relation between state-dependent KS arguments and 01-gadgets is even more direct than in the above construction. Actually, the first state-dependent KS argument introduced by Clifton in [17] was precisely based on the set of vectors (5) forming the Clifton gadget G gad . His argument was as follows. In every non-contextual hidden-variable model attempting to replicate the quantum probabilities associated to the projectors of the Clifton gadget, we should have | ψ|u 1 | 2 + | ψ|u 8 | 2 = λ q ψ (λ) (f λ (|u 1 ) + f λ (|u 8 )) ≤ 1, by the gadget property. However, if we take |ψ = |u 1 , we find that according to the quantum predictions | u 1 |u 1 | 2 + | u 1 |u 8 | 2 = 1 + | u 1 |u 8 | 2 > 1 since | u 1 |u 8 | 2 > 0 as |u 1 and |u 8 are non-orthogonal. Other state-dependent proofs based on inequalities have since been developed, with the smallest involving five vectors [4].
Obviously, the argument used by Clifton for the particular set of vectors he introduced, immediately carries over to any 01-gadget. Thus every 01-gadget serves as a proof of state-dependent contextuality.
Note that it was realized in [13] that a class of graphs, known as perfect graphs, define a class of graphs that cannot serve as proofs of (even state-dependent) contextuality. That is, for any orthogonal representation {|v j } ⊂ C d of a perfect graph and for any pure state |ψ ∈ C d , the outcome probabilities | ψ|v j | 2 admit a non-contextual hidden variable model of the form (16). Since a non-contextual hidden variable model is not possible for a 01-gadget, we deduce that no perfect graph is a 01-gadget. Perfect graphs are a well-known class of graphs which by the strong perfect graph theorem [31] can be characterized as those graphs that do not contain odd cycles and anti-cycles of length greater than three as induced subgraphs.
Finally, remark that the argument due to Clifton presented above works not only for the state |ψ = |u 1 , but for any state |ψ ∈ C 3 which obeys | ψ|u 1 | 2 +| ψ|u 8 | 2 > 1. More generally, we now present a 01-gadget which serves to prove state-dependent contextuality for all but a measure zero set of states in C 3 .
This construction is based on the gadget G of Fig. 3 with the 43 vector orthogonal representation presented in the proof of Theorem 2. Note that if we take x = 1 in this representation, then the two distinguished vectors |u 1 and |u 42 actually coincide and are both equal to (1, 0, 0) (i.e., the two distinguished vertices u 1 and u 42 should actually be identified). Therefore in any {0, 1}coloring f of G, 2f (|u 1 ) = f (|u 1 ) + f (|u 42 ) ≤ 1, i.e. the vector |v 1 is assigned value 0. This implies that G witnesses state-dependent contextuality of all states in C 3 but for a measure zero set of states |ψ that are orthogonal to |v 1 = (1, 0, 0).
The construction that we just described is based on 42 vectors. It is actually possible to find a slightly smaller construction based on the following 40 vectors: , and where we have the following identities |u 1 = |u 42 , |u 2 = |u 39 , |u 3 = |u 40 . It can be verified that the graph in Fig. 3 where we identify the vertices u 1 and u 42 , u 2 and u 39 , u 3 and u 40 , is the orthogonality graph of these 40 vectors. These 40 vec-tors thus form a 01-gadget, where as above the vector |u 1 = (1, −1, 0) can only be assigned the value 0, implying that it can serve as a state-dependent contextuality proof for any vector in C 3 that is not orthogonal to (1, −1, 0). We leave it as an open question whether this set of 40 vectors is the minimal set with this property.

01-GADGETS
In this section, we consider a stronger variant of the KS theorem due to Pitowsky [22] and Hrushovski and Pitowsky [23]. While the KS theorem is concerned with {0, 1}-colorings where all projectors (or vectors) in a given set S must be assigned a value in {0, 1}, we consider here more general assignments where any real value in [0, 1] is allowed to the members of S. Specifically, given a set of vectors S = {|v 1 , . . . , |v n } ⊂ C d , we say that f : S → [0, 1] is a [0, 1]-assignment if f satisfies the same rules (3) as it does for {0, 1}-colorings. Both {0, 1}-colorings and [0, 1]-assignments can be interpreted as assigning a probability to the projectors corresponding to each of the elements of S. But while the assignment is constrained to be deterministic in the case of {0, 1}colorings since these probabilities can only take the values 0 or 1, the probabilistic assignment may be completely general (hence non-deterministic) for [0, 1]-assignments. In particular, for any given quantum state |ψ , the Born rule f (|v i ) = | ψ|v i | 2 defines a valid [0, 1]-assignment.
Hrushovski and Pitowsky [23], following earlier work by Pitowsky in [22], proved the following theorem, which they call the "logical indeterminacy principle".
Thus for any two non-orthogonal vectors |v 1 and |v 2 , at least one of the probabilities associated to the vectors |v 1 or |v 2 must be strictly between zero and one, unless they are both equal to zero. A corollary of this result, observed in [3,8,9] is that if f (|v 1 ) = 1 (this should, for instance, necessarily be the case if we attempt to reproduce the quantum probabilities for measurements performed on the state |ψ = |v 1 ), then f (|v 2 ) = 0, 1, showing that one can localise the "value-indefiniteness" of quantum observables that the KS theorem implies. Theorem 3 therefore provides a stronger variant of the KS theorem, and we will refer to it as the extended KS theorem.
The proof of Theorem 3 given in [23] was obtained as a corollary of Gleason's theorem [24]. A more explicit constructive proof was given by Abbott, Calude and Svozil [3,9], where they also noted that significantly none of the known KS sets serves to prove Theorem 3. Note that an earlier proof of the extended KS theorem was also given in [22]. All these existing proofs of the extended KS theorem involve complicated constructions with no systematic procedure for obtaining the requisite sets of vectors. In this subsection, we will provide a simple systematic method for obtaining in a constructive way these extended KS sets.
In order to prove the extended KS theorem, we need gadgets of a special kind, which are defined as usual 01gadgets apart from the fact that the condition that the two distinguished vertices cannot both be assigned the value 1 in any {0, 1}-colorings should also hold for any [0, 1]-assignments. That is, we simply replace '{0, 1}coloring' by '[0, 1]-assignment' and f (|v 1 ) + f (|v 2 ) ≤ 1 by f (|v 1 ) + f (|v 2 ) < 2 in Definition 1, and similarly for Definition 2. We call such new gadgets 'extended 01-gadgets'. It is easily verified that the Clifton gadget in Fig. 1 and the 16-vertex gadget in Fig. 2 obey this additional restriction.
Our first aim will be to construct such extended 01-gadgets for any two given non-orthogonal vectors |v 1 , |v 2 ∈ C d for d ≥ 3. This is the content of the following Theorem, which generalizes Theorem 2. Proof. We begin with the construction for d = 3 and generalize it to higher dimensions naturally. The construction is an iterative procedure based on the Clifton gadget G Clif given in Fig. 1.
We now describe a nesting procedure that at each step decreases the angle between the vectors corresponding to the two outer vertices. The procedure works as follows. Replace the edge (u 4 , u 5 ) in G Clif by G Clif , a copy of G Clif where we identify u 1 = u 4 and u 8 = u 5 . The new graph thus obtained has 14 vertices and 21 edges. The operation has the property that in any [0, 1]-assignment f , an assignment of value 1 to the two outer vertices of the new graph (i.e. u 1 , u 8 ) leads to a similar assignment to the two outer vertices of the inner copy of G Clif (i.e. u 1 , u 8 ) thereby giving rise to a contradiction. In other words, the newly constructed graph is once again an extended 01-gadget. This procedure can be repeated an arbitrary number of times, as illustrated in Fig. 5, leading to an extended 01-gadget formed from k nested Clifford graphs G 1 Clif , G 2 Clif , G 2 Clif , . . . , G k Clif where G 1 Clif corresponds to the most inner graph and G k Clif to the most outer graph. We now show that the total graph at the kth iteration is an orthogonality graph where the overlap | u with k depending on the overlap of the given vectors | v 1 |v 2 |, then gives the required gadget and proves the Theorem.
Suppose that at the k-th step of the iteration, the vectors representing the two outer vertices of the "inner" gadget from the k − 1-th step are without loss of generality, so that the overlap between these vectors is | u , where for simplicity of the construction we take x k ∈ R + 0 . The remaining vectors then in general have the following (nonnormalized) orthogonal representation in R 3 with a k , b k , c k ∈ R. This gives an overlap of A direct optimization of this expression with respect to the parameters a k , b k , c k gives the choice b k = 1, c k = 1, a k = x k + 1 + x 2 k . So that the overlap between the two outer vertices at the k-th step of the iteration is given by

12
With the initial overlap for k = 1 of 1/3 and corresponding initial x values of x 1 = 0 and x 2 = 1 2 √ 2 , we can now evaluate the expression for the overlap for any k > 1. We find that the overlap at the k-th step is k k+2 . This is readily seen by an inductive argument. The base claim is clear, suppose that at the k-th step the overlap is given by . Moreover, we see that choosing b k = 1, c k = 1, the overlap expression (23) is a continuous function of a k for any fixed x k with the minimum value of 0 achieved at a k = 0. Thus, every intermediate overlap in [0, k k+2 ] between the two outer vectors is also achievable by appropriate choice of a k for the fixed value of x k , b k , c k . This completes the construction of the gadget for C 3 (possibly by taking its faithful version in the graph representation). Now, one may simply consider the same set of vectors as being embedded in any C d (with additional vectors(0, 0, 0, 1, 0, . . . , 0) T , (0, 0, 0, 0, 1, 0, . . . , 0) T etc.) to construct a gadget in this dimension.
In fact, the construction above is not unique. We give an alternative set of vectors that also serves to prove Theorem 4. The construction is shown in Fig. 6. Suppose we are given two distinct non-orthogonal vectors We begin by adding the following set of vectors with a parameter y ∈ R: The remaining vectors are obtained using a repeating unit consisting of four vectors: repeated t times for an integer t ≥ 1 depending on x.
Choosing the parameter y as we find that y ∈ R, for t satisfying (1 − x 2 ) 3 ≥ 4x 4t . We see that as t increases this inequality can be satisfied for  While the construction in Theorem 4 and that in the previous paragraph work for any two distinct vectors, given two such vectors it is of great interest to find the minimal extended 01-gadget with these vectors as the distinguished vertices. While this question is the foundational analog for extended KS systems of the question of finding minimal KS sets, it is also of practical interest in obtaining Hardy paradoxes with optimal values of the non-zero probability, and extracting randomness from the gadgets [29].
We now show how the extended 01-gadgets can be used to construct proofs of the extended KS Theorem 3.
Proof. (Theorem 3) We present the construction for d = 3, the proof for higher dimensions will follow in an analogous fashion. The idea is encapsulated by Fig. 7. Suppose we are given two distinct non-orthogonal vectors |v 1 and |v 2 in C d . We begin by constructing an appropriate extended 01-gadget G v1,v2 , depending on | v 1 |v 2 |, with the corresponding v 1 , v 2 being the distinguished vertices.

A. Discussion
Intuitively, with respect to any {0, 1} coloring, a 01gadget behaves like a "virtual edge" between its two special vertices, with this edge also obeying the rule that at most one of its incident vertices may be assigned the color 1. Moreover, in Theorem 2 we have shown that 01gadgets may be constructed with any two non-orthogonal vectors as the special vertices. Starting from a given set of vectors, this allows us to connect any two nonorthogonal vectors by an appropriate 01-gadget, which imposes additional constraints on the {0, 1}-colorings of the resulting set of vectors. By appropriately adding such virtual edges, we are eventually able to obtain a set of vectors that gives a Kochen-Specker contradiction. Moreover, it turns out that the statistical proofs of the Kochen-Specker theorem can also be interpreted in the same manner. For instance, the famous Yu-Oh graph of [25] can be interpreted as six 01-gadgets connecting the vectors (1, 1, 1) T , (1, 1, −1) T , (1, −1, 1) T and (−1, 1, 1) T . These four vectors thus form a "virtual clique", with the property that in any {0, 1}-coloring of the Yu-Oh set, the sum of the values attributed to these four vectors cannot exceed one. On the other hand, any quantum state has overlap with these four vectors summing to 4/3 providing a statistical contradiction. Similar considerations also apply to the extended Kochen-Specker theorem of Pitowsky by means of extended 01-gadgets.

VII. COMPUTATIONAL COMPLEXITY OF
{0, 1}-COLORINGS Clearly, complete graphs of size d + 1 cannot be faithfully realized in C d , but there also exist certain other graphs that cannot be faithfully realized in C d . The wellknown example is the four-cycle (square) graph in C 3 , this can be seen by the following simple argument. Suppose a pair of vertices in opposite corners of the square is assigned without loss of generality the vectors |0 and α|0 + β|1 , with α, β ∈ C. Since these vectors span a plane and the remaining pair of vertices are both required to be orthogonal to this plane, these latter vectors are both equal up to a phase to |2 , contradicting the requirement of faithfulness. There exist analogous graphs that are not faithfully realizable in higher dimensions, some of which are shown in Fig. 8. Graph (i) is the square graph which is not faithfully realizable in C 3 as explained in the text. Graph (iv) is the graph from [14] which was verified to be not faithfully realizable in dimension three despite being square-free. Graph (ii) is not faithfully realizable in C 4 , which can be seen as arising from the fact that the induced square subgraph is not faithfully realizable in C 3 and the additional vertex being adjacent to all vertices of the square, the vector corresponding to this vertex occupies an orthogonal subspace to that spanned by the square. Graph (iii) is similarly not realizable in C 5 this time owing to the presence of two vertices (which themselves cannot be represented by identical vectors) that are adjacent to all the vertices of the square. It is clear that the construction can be extended to higher dimensions.
In searching for Kochen-Specker vector systems in C d , it is therefore crucial to reduce the size of the search by restricting to non-isomorphic graphs which do not contain these forbidden graphs as subgraphs. Indeed, searching over non-isomorphic square-free graphs lead to the proof that the smallest Kochen-Specker vector system in C 3 is of size at least 18 [15].
Let us denote the set of forbidden graphs in C d as {G fbd }. We show, following the proof by Arends et al. [15,16] for the square-free case, that the problem of checking {0, 1}-colorability of {G fbd }-free graphs is NPcomplete. Here, by a {G fbd }-free graph we mean a graph that does not contain any of the forbidden graphs as subgraphs.
The proof is based on a reduction to the well-known graph coloring problem that uses 01-gadgets in a crucial manner. Let us first recall the usual notion of coloring of a graph used in the proof. A proper coloring c of a graph G is an assignment of one among n colors to each of the vertices of the graph c : V (G) → [n] ([n] := {1, . . . , n}) such that no pair of adjacent vertices are assigned the same color. If such a coloring exists, we say that G is n-colorable.
Proof. The proof generalizes and simplifies that for the analogous question of {0, 1}-colorability of square-free graphs in [15], with the difference being that we directly use the constructions of 01-gadgets from the previous sections. Firstly, we know that checking {0, 1}-colorability of a {G fbd }-free graph is in NP because the problem of checking an arbitrary graph for {0, 1}-colorability is in NP [15]. Suppose we are given a graph G. The idea is to construct a new graph H which is {G fbd }-free such that the problem of ω(G)-colorability of G is equivalent to the problem of {0, 1}-colorability of H. Provided the construction is achievable in polynomial time, this gives a reduction from the {0, 1}-colorability problem to the ω(G)-colorability problem (for ω(G) ≥ 3) which is known to be NP-complete [27].
The construction goes as follows. Replace every vertex v ∈ V (G) by a clique of size ω(G) in H and label the corresponding vertices v i ∈ V (H) for i ∈ [ω(G)]. For every edge (u, v) ∈ E(G), connect the corresponding vertices (u i , v i ) by a 01-gadget Γ (ui,vi) in H. The exact form of the gadget Γ (ui,vi) is left unspecified at the moment, for the polynomial time reduction it is only important that it is finite (i.e., |V (Γ (ui,vi) )| and |E(Γ (ui,vi) )| are finite), so that |V (H)| ≤ ω(G)(|V (Γ (ui,vi) )| max We first verify that H is {G fbd }-free. We do this by showing that H is in fact faithfully realizable in dimension ω(G) and consequently free of the forbidden subgraphs for that dimension. For the vertices v ∈ V (G), the actual representation of the vertices v i ∈ V (H) is chosen independent of the exact structure of the graph, i.e., for any G with |V (G)| = n, we choose a fixed faithful orthogonal representation {|v i } for v ∈ V (G) and i ∈ [ω(G)]. Indeed, to show the realizability of the rest of H, it suffices to show the realizability of the vertices v 1 for v ∈ V (G), since the representation for the remaining vertices v i for i ≥ 2 can be readily obtained by a cyclic permutation Π i : |j → |j + i with the sum taken modulo ω(G). The structure of the graph is then incorporated by means of an appropriate choice of the gadgets Γ (ui,vi) . The crucial idea behind the construction is that there exist finite sized gadgets (with faithful representations) for any two distinct vertices as shown in Prop. 4. So that for any edge (u, v) ∈ E(G), we use a gadget Γ(u 1 , v 1 ) from Prop. 4 (the same gadget is used for the other pairs (u i , v i )) corresponding to the required overlap | u 1 |v 1 |. Now, since the representation is faithful, we do not have different vertices represented by the same vector. As such, the construction from Prop. 4 yields a finite sized gadget for any pair of vertices (u i , v 1 ).
The proof that checking {0, 1}-colorability of the {G fbd }-free graph H is equivalent to checking the ω(G)colorability of G (which is N P -complete) follows along analogous lines to the proof in [15] and we present it measuring observable containing v, will be denoted by p(A v = 1). We correspondingly denote by p(A v = 0) the probability that the outcome v was not obtained. Clearly p(A v = 1)+p(A v = 0) = 1. Now, we shall show using nosignaling (which will impose non-contextuality), that the probability p(A 1 = 1, B 8 = 1) is bounded from above. To see this, we apply Eq.(31) to Alice's observables and get Therefore, the outcome (A 1 , B 8 ) = (1, 1) has randomness, which can be used in a randomness amplification scheme employing the protocol of [30]. The lower bound is 1 27 in noiseless conditions, and assuming we have exactly measured the specified projectors. In a real experiment, this value may be different, but if the noise is low enough it should be close to 1 27 . Also the upper bound, relies on perfect correlations, which in a real experiment may be imperfect. Thus in noisy conditions, we will have less stringent lower and upper bounds, though these are certifiable by statistics from the experiment. Note that crucially we have not used explicitly Bell inequalities, nor even the KS paradox. We have simply made use of the perfect correlations between the parties and the local 01-gadget structure of Alice and Bob's observables.