Download Presentation
## GAMES AND COMPLEXITY

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**GAMES AND COMPLEXITY**Part 7 The Evasiveness Game Peter van Emde Boas ILLC-FNWI-Univ. of Amsterdam © Games Workshop © Games Workshop References and slides available at: http://staff.science.uva.nl/~peter/teaching/gac08.html**Testing Graph Properties**Has an edge ? Yes Has all edges ? No Connected ? Yes Has a Cycle ? No Even number of edges ? Yes ..... B A C E D F G Graph: n nodes and e edges Size Adjacency List representation: n + e Size Adjacency Matrix representation: n(n-1)/2 (undirected) and n2 in the directed case; n2-n when self loops are excluded.**Empirical observation around 1972**Testing graph properties algorithmically can for many of these properties be performed in linear time O(n+e) , provided the Adjacency list representation is used. If the Adjacency Matrix representation is used (edge probe model) in the worst case all edges must be probed and the time required becomes W(n2) ! This issue became disturbing when for many important graph properties linear time algorithms based on Depth First Search were discovered. Examples: connectivity, planarity, .... Conjecture: this is no accident....**Edge probe model**Adversory model for property testing: 2 person game between seeker (Thorgrim) and hider (Urgat) . Thorgrim identifies an edge and asks for its presence; Urgat gives yes-no answer. Thorgrim wins the game if he can decide the property before all edges have been asked; Urgat wins if the property only is decided when the complete graph is known. Note that Urgat is allowed to construct the graph during the game: Adaptive strategy. The property is called Evasive when Urgat has a winning strategy in this game (Evasiveness Game)**an ancient artifact**a sheet from my 1974 presentation on this topic…**Excluding Trivialities**Property 0 : The graph has n nodes This property doesn’t depend on the presence or absense of edges: Trivial property Property 1 : The graph contains a self loop : (there are only n loops) Property 2 : Edge (A,B) is present This property depends on the individuality of nodes and is therefore not invariant under renaming nodes: not a Graph property Restriction: Non Trivial graph properties which don’t involve loops only ! Non trivial: property doesn’t depend on the number of nodes only Graph property: Property is preserved under renaming nodes.**Rosenberg Conjecture**In 1973 Rosenberg conjectured that all non trivial Graph properties are Evasive. But Aandara soon presented a directed Counterexample: Property: The graph contains a sink Sink G’ Sink: all incoming edges are present no outgoing edge is present**O(n)-time Sink test**Ask for edge (X,Y) If present conclude that X is not a sink (has outgoing edge) If absent conclude that Y is not a sink (misses incoming edge) Always ask for an edge connecting two candidate sinks; regardless the answer given one candidate sink is removed. After n-1 probes only one candidate sink S remains; asking for its remaining incoming and outgoing edges (at most 2n-3 of which are still unprobed) decides whether S is a true sink. Note that the property is independent of edges within the subgraph G’ Also the property can de disrupted both by adding and removing edges (Non monotone property).**The Scorpion Example**O(n) probe example for a property on undirected graphs (invented by M. Best 1974). t s b The scorpion has a tail t , a body b connected via s and n-3 other nodes. The tail t has degree 1, node s has degree 2 , and the body b has degree n-2 . Connections amongst the n-3 other nodes are irrelevant.**O(n) Scorpion test**Idea: each node has two body-tickets and two tail-tickets. For each incident edge which is granted (refused) a tail-ticket (body-ticket) is destroyed. A dual candidate has still tickets remainin of both sorts. A body (tail) candidate has ony body (tail) tickets remaining. A node having lost all its tickets is moved to the irrelevant part. Strategy: questions between dual candiates destroy two tickets regardless the answer. If no more dual candidates remain questions between candidate bodies and candidate tails will destroy at least one ticket.**O(n) Scorpion test**In a first stage all n questions along a Hamiltonian path are probed. This will destroy 2n tickets. The remaining nodes are divided in 3 classes: body candidates, tail candiates and dual candidates. The dual candidates, which are the endpoints of chains of connected edges along the cycle, always can be matched by non-cycle edges and hence after at most n/2 more probes no dual candidates remain. In a second stage edges are probed connecting remaining candidate tails and candidate bodies. The remaining number of tickets being at most 2n this stage will terminate after at most 2n probes, resulting in a state where t candiate tails remain and b candidate bodies, and all t.b edges connecting them have been asked. At the same time from the connecting edges at most t have been granted and at most b have been refused, showing that t.b < t + b . The only solutions for this inequality are t=1, b=1 or t = b = 2 .**O(n) Scorpion test**Third stage: t=1 : ask all edges for the unique candidate tail; this identifies s . Validate that s has degree 2 and so identify the bodyb . Next validate that b indeed has degree n-2. This will require at most 3n probes. b=1 : ask all edges for the unique candidate body ; this identifies t. Next proceed as above, except for the final validation of b. Again at most 3n probes. t=b=2 : s must be one of the two candidate bodies. Asking their remaining edges will determine who is who. This identifies t as well. Finalize by asking all edges for the remaining tail candidate. At most 3n probes are required. Total number of probes < n + n/2 + 2n + 3n < 7n .**Monotonicity**Upward monotonicity: the property is not disturbed by adding edges Downward monotonicity: the property is not disturbed by removing edges. Property Q is upward monotone iff the complementrary property Q* is downward monotone. Q*(G) iff notQ(G) Upward monotone non trivial : notQ(En) & Q(Kn) ; EG. is connected Downward monotone non trivial: Q(En) & notQ(Kn) ; EG. is acyclic En= empty graph on n nodes ; Kn = complete graph on n nodes .**Aandara Rosenberg Conjecture**Based on the “has a sink” counterexample Aandara and Rosenberg revised the conjecture: Any Non-trivial (Upwards or downwards) Monotone Graph property is Evasive (Sharp version of AR-conjecture) Any Non-trivial (Upwards or downwards) Monotone Graph property requires in the worst case W(n2) probes in the edge probe model (original version of AR-conjecture) The original AR-conjecture was proven by Rivest and Vuillemin in 1974; The sharpened version is still open, but holds for many special cases. This result suffices for establishing the superiority of the Adjacency List Representation for Algorithmic purposes....**Lattice: powerset lattice on the**set of m edges in Kn; m = n(n-1)/2 Property : subset of Lattice Monotone : upward(downward) closed Non trivial : neither empty nor full Graph property : invariant under lattice automorphisms induced by permuting nodes Permutations in Sn induce permutations in Sm n = 3 is atypical since then n = m ....**AB?**Y N AC? BC? Y N Y N BC? AC? AC? BC? Y Y N N Y N N Y Algorithm / Strategy of Thorgrim Decision tree for the property “is connected” for the case n = 3 The purple boxes correspond to positive results.**AB?**Y N AC? BC? Y N Y N Thorgrim wins Thorgrim wins AC? BC? Y N Y N Urgat wins If the answer no longer depends on unprobed edges some questions can be omitted; but in the worst case all edges must be probed; Thorgrim has no better strategy; Urgat can win by giving one of the two edges probed first...**Relation Tree - Lattice**Each node in the decision tree represents a set T of edges given and a set R of edges refused in this position of the game That node also corresponds to the sublattice of all graphs with an set of edges including T and disjoint with R : G(T,R) The depth of this node equals d = #T + #R The game terminates if this entire set G(T,R) is included in the property or is disjoint with the property # G(T,R) = 2 m-#T-#R = 2 m-d .**A sufficient condition for Evasiveness**The number of graphs having the property equals: S2 m-d(v) v is terminal with G(T(v),R(v)) having the property Corollary: If the number of graphs having the property is odd then the property is Evasive Proof: in the above sum one of the terms must be odd, which requires d(v) = m indicating that all edges have been probed. Urgat’s winning strategy: give that answer which keeps the number of consistent graphs with the property odd. Example: the graph is non-empty.**Evasiveness based on Strategy**Property: the graph contains more than k edges Winning strategy for Urgat: answer “yes” on the first k questions and reject all subsequent ones. As long as there exists an unprobed edge, any subsequent “yes” aswer will produce a graph having the property while the graph actually constructed doesn’t have it.... Question: for which properties will such a “simple” strategy work ? Other examples: “does contain a cycle”, planarity**General condition for this Strategy**Theorem: Let Q be a (upward monotone) property such that any non-maximal non- Q graph G can be extended in at least two different ways to a non- Q graph: if there is an f G such that G {f} Q then there is also an f’ f , f’ G such that G {f’} Q Then Q is evasive . Strategy for Urgat: Say yes to all edges, unless adding the edge asked for produces a graph in Q .**Analysis**We denote a graph by its edge-set. Assume that Thorgrim has a winning strategy. By the end of the game the set of all edges is divided in three parts: E : edges given by Urgat F : edges refused by Urgat H : edges not yet asked for. By construction the graph E doens’t have the property. Also H . E H doesn’t have the property either since Thorgrim has won. Let x H . Then E H \ {x} is a non-maximal non-Qgraph so there exists an y x with E H \ {x} {y} Q . So also E {y} Q However y F , i.e. y was refused by Urgat which doesn’t conform to his strategy. Contradiction.**Examples**The graph contains a cycle... The non-maximal non-examples are disconnected collections of trees. Except for the trivial case of two nodes, there exist always multiple edges which can be added. Planarity: Maximal planar graphs embedded in a sphere have triangual faces only. Removing an edge (a,b) will create a face which is a quadrangle, whose other diagonal (c,d) can be added, unless it is already present, in which case either only 4 nodes are present and the property is trivial, or looking at the two faces adjacent to this edge (c,d) another edge which can be added will be found.**a**c d b e f Planarity After drawing (c,d) inside the quadrangle the edge (e,f) can be added...**A dual result**Theorem: Let Q be a (upward monotone) property such that any non-minimal Q graph G can be reduced in at least two different ways to a Q graph: if there is an f G such that G \ {f} Q then there is also an f’ f , f’ G such that G \ {f’} Q Then Q is evasive . Strategy for Urgat: Say “no” to all edges, unless refusing the edge asked for produces a graph which can’t be extended to a graph in Q .**Analysis**We denote a graph by its edge-set. Assume that Thorgrim has a winning strategy. The game will terminate with Urgat granting an edge x and producing a set of edges E such that the graph E has the property; otherwise Urgat has violated his strategy. To prove that this only happens when the last edge is asked for. So assume that there still exists an unprobed edge y. Since E {y} is a non-minimal graph with the property there exists an edge z y E such that E {y}\ {z} has the property. But then Urgat shouldn’t have granted edge z . (this argument applies regardless whether x = z or not.... Example: the graph is connected ; non-minimal connected graphs consist of a spanning tree and at least one more edge creating a cycle.**Algebra 101**Group: non empty set A with operation A x A - -> A written a.b , ab or a+b (additive notation) Properties: Associativity: (ab)c = a(bc) a+(b+c) = (a+b)+c Neutral element: ea = ae = a a + 0 = 0 + a = a Inverse: a-1 a = aa-1 = e a + (-a) = (-a) + a = 0 Potential Extra property Commutativity: ab = baa + b = b + a Additive notation for Commutative (Abelian) groups only.**Algebra 101**Properties: Uniqueness of neutral element: e = e.e’ = e’ Uniqueness of inverse a* = a*.(a.a#) = (a*.a).a# = a# Division: ac = bc implies a = b Inverse of product: (ab)-1 = b-1 a-1 Inverse of inverse: (a-1)-1 = a Typical examples: Groups from arithmetic: Z+ , Q+ , R+ , Z/nZ, Q*, R* Transformation groups, Automorphism groups, Permutation groups Sn**Algebra 101**Homomorphismf : A - -> B is a mapping preserving operations: f(ab) = f(a).f(b) and f(a-1) = f(a)-1 Isomorphism : bijective Homomorphism Automorphism: Isomorphism from group onto itself Conjugation: fx(a) = xax-1 ; inner Automorphism (trivial for Abelian groups) Caley Representation: a group is isomorph to a group of transformations on itself: a - -> [ ta : x - -> x.a ]**Algebra 101**SubgroupB A : non empty subset closed under operations (product & inverse): x,y B - -> x.y-1 B Coset relation: x ~B y iff x.y-1 B This is an equivalence relation: Reflexive: x.x-1 = e B Symmetry: x.y-1 B - -> (x.y-1)-1 = (y-1)-1.x-1 = y.x-1 B Transitivity: x.y-1 , y.z-1 B - -> x.y-1.y.z-1 = x.z-1 B The equivalence classes are called cosets Bx ; Bx = By <- -> x.y-1 B Right multiplication with x maps B bijectively on the coset Bx**Finite Groups**Order finite group: #A:=number of elements inA Index [A:B] :=number of cosets Bx in A Theorem [Lagrange]: #B . [A:B] = #A Corrolary: #B and [A:B] are divisors of #A Order element o(a) := order k cyclic subgroup <a> generated by a : {a, a2, a3, ... , ak = e } Hence o(a) divides #A ; moreover <a> is isomorph with Z/(o(a)Z) and in particular <a> is Abelian.**Groups working on structures**Group actionG on set X : map P: G x X - -> X Conditions: P(e,x) = x , P(a,p(b,x)) = P(ab, x) Preserving a set : Y X : {a G | P(a,y) Y iff y Y } Fixing a set Y X : {a G | P(a,y) = y for all y Y } Stabilizer of a pointx : Gx {a G | P(a,x) = x} Orbit of point x : G(x) {P(g,x) | g G } There is a 1-1 correspondence between points in the orbit of x and cosets relative Gx Size orbit #G(x) and order Gx both divide the order #G**Groups working on structures**Transitive Group action: Orbit of some (equivalently all points) is the entire set X. Consequence: all the subgroups fixing some point are conjugate: If fx = y then fGx f-1 is the subgroup fixing y. Moreover #X is a divisor of #G. The Caley representation is an example of a transitive group action.**Rings and Fields**Ring: set R with two operations + and . Properties: (R,+,0) is an Abelian group Multiplication . is associative a(bc) = (ab)c Distributivity laws: a(b+c) = ab + ac , (a+b)c = ab + ac Potential extra properties: neutral element1 : 1a = a1 = a Inverses for a 0 : a-1 a = aa-1 = 1 Unit: element having an inverse Commutativity of multiplication : ab = ba Field: Commutative Ring with 1 and inverses for alla 0**Rings and Fields**Examples: Z, Q, R, Z/nZ Polynomials over a commutative ring: R[X] R[X] := { r0 + r1X + r2X2 + .... + rkXk | k N , ri R } Addition: coefficientwise: ( riXi )+( smXm) = (ri+si)Xi Multiplication: ( riXi ) ( smXm) = k( i+m=krism)Xk Evaluation: R[X] x R - -> R : ( riXi ) (v) := rivi for fixed v this is a Ring homomorphism. Ring homomorphism f: R - -> R’ extend to polynomial rings f : R[X] - -> R’[X] by f(( riXi ) ) = ( f(ri)Xi ) Specific example : Z[X] - -> Z/pZ[X]**Finite Rings and Fields**The units of Z/nZ are the residue classes a with (a,n) = 1 grace to the solvability of ax + ny = 1, i.e. ax 1 (mod n) In the special case that n = p a prime number, all rfesidue classes a 0 satisfy the condition (a,p) = 1 Hence Z/pZ is a finite Field, denoted Fp . In Commutative rings of characteristicp like Fp and Fp[X] raising to the power p is a ring homomorphism (Frobenius) (xy)p = xp.yp grace to associativity and commutativity (x+y)p = Si=0...p (pi) xi y(p-i) (Binomium of Newton) Since (pi) is divisible by p for j = 1 ... p-1 only the first and last term remain : (x+y)p = xp + yp**Pairable sets**Two sets A,B X form a pair when X D Y := (X \ Y) (Y \ X) consists of a single point : Y is the result of adding to or removing from X a single point. A family of sets is pairable if it is the disjoint union of a collection of pairs A Graph property Q (regarded as a collection of sets of edges) is called Pairable when both the property and its complement are pairable**Pairable Sets**Theorem: Non evasive graph properties are Pairable. Proof: the property and its complement both are the disjoint union of the sets G(T,R) , which are pairable when there are unprobed edges... Moreover Urgat has a winning strategy for unpairable sets by always giving an answer such that the remaining part of the property (or its complement) remains unpairable.**Application**Let Q be an upward monotone property. Let m[i] be the number of graphs having the property Q with i edges. Let j be the number of edges in a minimal graph with the property. Theorem: Ifm[j] > m[j+1]then the property is evasive. Proof: Non-evasive - -> pairable. Now graphs with j edges can only be paired with graphs of j+1 edges, and there are not enough of those graphs.... Example: The graph contains at least m edges for m > n(n-1)/4**Intervals**Let A B be subsets of a set X with #(B \ A) = k Then the set <A:B> :={C | A C B } is a k-interval A k-interval contains 2k sets A k-interval is pairable Generalization of the previous necessary condition: Theorem: If for some propertyThorgrimhas a winning strategy where the game always terminates with at leastk unprobed edges remaining, then both the property and its complement are the disjoint union of a collection of k-intervals In this situation the number of graphs having the property is divisible by 2k**Strictly Pairable sets**• Inductive definition of a strictly pairable subset Y P(X) • (the powerset of X): • a) A k-interval with k > 0 is strictly pairable • b) If A and B are strictly pairable, and there exists an element • z X such that every set a A contains z and no set b B • contains z , then A B is strictly pairable. • c) That’s all folks...**Necessary and Sufficient Condition**Theorem: Property Q , regarded as a subset of P( E ) with E = set of edges in Kn is non-evasive iff both Q and its complement are strictly pairable. Proof: If Q is non-evasive then Thorgrim has a winning strategy represented by a decision tree. Leaves in this tree correspond to k-intervals for k > 0 and internal nodes are labeled with an edge being asked for which separates the subsets represented by the two successor nodes, thus satsifying the inductive clause of the definition.... Conversily: from a certificate for strictly pairability of Q a decision tree can be constructed which proves that Thorgrim has a winning strategy. (minor details omitted)**Generating Function**Property Q on graphs on n nodes ; m = n(n-1) ( m= n(n-1)/2 ) number of edges in complete (undirected) graph Generating function for this property : HQ(X) := SA Q X#A = Si=0..m qiXi where qi := #{ A | A Q and #A = i } This generating function is a polynomial of degree at most m If Kn has the property the degree is exactly m If En doen’t have the property the constant term vanishes.**Pairing and Generating function**The contribution to a pair (A , A {e}) to the generating function equals X#A ( 1+X ) Corollary : If the property Q is pairable then (1 + X) divides the Generating function HQ(X) Since non-evasive properties are pairable this yields yet another sufficient condition for evasiveness Theorem: if (1 + X)doesn’t divideHQ(X)thenQis evasive**Further consequences**Substituting arguments for X in theGenerating function HQ(X) yields additional necessary conditions for evasiveness: X = 1 : this yields the (already observed) consequence that the number of graphs with an evasive propery must be even X = -1 : the alternating sum condition: the number of graphs having the property with an even number of edges equals the number of graphs having the property with an odd number of edges: AQ :=HQ(-1) := SA Q (-1)#A = Si=0..m qi(-1)i Since divisibility of polynomials is preserved under taking the coefficients modpwe also obtain the conditions: (1 + X) |HQ(X) mod p and HQ(-1) = 0 mod p**Survey of conditions**Qis evasive<= => Qis strictly pairable = => Qand its complement are pairable= => Qis pairable = => (1 + X) |HQ(X) = => (1 + X) |HQ(X) mod p Except for the first one the converses of these implications are not true.**Counterexample**A property in P(0..3) such that both the property and its complement are pairable but which is not strictly pairable (monotone but not invariant under transitive permutation group)**Counterexample**Property on P(0..2) ; the complement is pairable, the property is not. The generating function 1 + X3 is divisible by 1 + X**Counting can be sufficient**Property: “the graph is starlike” : either it has no edges, or all edges share a vertex. Theorem: “the graph is starlike” is evasive forn > 2. Proof: all graphs with 0 or 1 edges are starlike. If 2 or more edges are present then the shared vertex is uniquely determined. Hence the alternating sum can be evaluated like: AQ = 1 – n(n-1)/2 + n. Si=2..n-1 (n-1i) (-1)i = = 1 – n(n-1)/2 + n( -1 + (n-1)) + n. Si=0..n-1 (n-1i) (-1)i = = 1 + n(n-3)/2= (n-1)(n-2)/2 which is positive for n > 2 .