STACS 2007, RWTH Aachen University, Germany Testing Convexity Properties of Tree Colorings Eldar Fischer and Orly Yahalom Technion – IIT, Haifa, Israel
Convex colorings � A tree coloring is convex convex convex convex if it induces connected color components.
Application: Phylogenetic trees ��������������������������������� !���"���������������#���� � A Phylogenetic tree describes the �������������������������������������������� genetic relations between species. � Colorings represent characters.
Application: Phylogenetic trees ��������������������������������� !���"���������������#���� � A Phylogenetic tree describes the �������������������������������������������� genetic relations between species. � Colorings represent characters. � Normally, these colorings are convex.
Property testing – General setting � Given a domain D of inputs, a distance function and , two inputs are d D → ε > f f D ∈ 2 0 : [0,1] , ' ε called - -close - - close close if . close d f f ≤ ε ( , ')
Property testing – General setting � Given a domain D of inputs, a distance function and , two inputs are d D → ε > f f D ∈ 2 0 : [0,1] , ' ε called - - -close - close if . close close d f f ≤ ε ( , ') f f '
Property testing – General setting � Given a domain D of inputs, a distance function and , two inputs are d D → ε > f f D ∈ 2 0 : [0,1] , ' ε called - - - -close close if . close close d f f ≤ ε ( , ') � Given a property and , an input P ⊆ D ε > 0 is - - - -close close close to close if there exists which ε P f ∈ D f ∈ P ' ε is -close to . Otherwise, is -far from . ε f f P f f '
Property testers An - - - -test test test test for a property and T ε ε > P 0 is an algorithm such that for every input : f ∈ D � If then accepts with f f ∈ P T probability at least 2/3. � If is -far from , then rejects f f ε P T with probability at least 2/3.
Property testing in practice � Property testing vs. classical decision problems: � Relaxed requirements � Reading only part of the input
Property testing in practice � Property testing vs. classical decision problems: � Relaxed requirements � Reading only part of the input � Property testing is useful for large data sets. � Property testers are randomized algorithms which query query query query the input in some locations. � Normally, the query complexity query complexity query complexity query complexity is considered more crucial than the computational complexity.
Property testers (cont.) � A test is called 1 1 1 1- - -sided - sided sided if it accepts sided every input satisfying the property with probability 1. � A test is called non non- -adaptive adaptive if the non non - - adaptive adaptive choice of which locations to query does not depend on the answers for previous queries.
Our settings – Colored trees � The structure structure structure structure of the tree is T V E = ( , ) fully known and unchangeable. { } � The k k k k - - - -coloring coloring coloring coloring is c V k → : 1 ,..., unknown. � A query of a vertex u returns c(u).
Distance in our model � We are given a weight function ( ) u such that Σ � = V � → ( ) 1 : 0,1 u V ∈ (distribution function). � The distance between two colorings { } c c u c u c u and is . � ≠ ( ) | ( ) ( ) 1 2 1 2 � Options for : � � Given in advance � Distribution free testing
Our main results � A distribution free test for convexity on trees � A lower bound for convexity on trees � Tests for variants of convexity
Our main results � A distribution free test for convexity on trees � A lower bound for convexity on trees � Tests for variants of convexity � The query complexity of our tests depends only on k and ε - not on n . � All our tests are 1-sided.
Theorem: Testing convexity on trees For every there exists a 1-sided, ε > 0 non-adaptive, distribution free -test ε for convexity of tree colorings with: � Query complexity O k ε ( / ) � Computational complexity: , O n ( ) ɶ ( or with a preprocessing O k ε / ) stage of . O n ( )
Testing convexity – main idea � Forbidden subpath Forbidden subpath: 3 vertices of Forbidden subpath Forbidden subpath alternating colors on a path
Testing convexity – main idea � Forbidden subpath Forbidden subpath: 3 vertices of Forbidden subpath Forbidden subpath alternating colors on a path � Convex coloring ⇔ no forbidden subpath
Testing convexity – main idea � Forbidden subpath Forbidden subpath: 3 vertices of Forbidden subpath Forbidden subpath alternating colors on a path � Convex coloring ⇔ no forbidden subpaths � Detecting a forbidden subpath: Sampling a forbidden subpath
Testing convexity – main idea � Forbidden subpath Forbidden subpath: 3 vertices of Forbidden subpath Forbidden subpath alternating colors on a path � Convex coloring ⇔ no forbidden subpaths � Detecting a forbidden subpath: Critical vertex Sampling a forbidden Sampling two ends of subpath conflicting subpaths
The convexity tester � Query O(k/ ε ) vertices uniformly and independently according to � . � Search the sample for forbidden subpaths, either explicit or implicit (for a critical vertex).
The convexity tester � Query O(k/ ε ) vertices uniformly and independently according to � . � Search the sample for forbidden subpaths, either explicit or implicit (for a critical vertex).
The convexity tester � Query O(k/ ε ) vertices uniformly and independently according to � . � Search the sample for forbidden subpaths, either explicit or implicit (for a critical vertex). � Reject iff a forbidden subpath was detected or inferred.
Testing convexity - correctness � A convex coloring does not include a forbidden subpath – always accepted. � The bulk of the proof is to show that a coloring which is ε -far from convexity is rejected with probability ≥ 2/3.
i i i - i - - -balanced vertices balanced vertices balanced vertices balanced vertices � For a vertex u , u u - u u - - -trees trees trees trees are the connected components of V \ {u} . u
i i i i - - - -balanced vertices balanced vertices balanced vertices balanced vertices � For a vertex u , u u u u - - - -trees trees are the connected trees trees components of V \ {u} . � For a color i , a vertex u is i i - -balanced balanced if the i i - - balanced balanced u- trees can be u partitioned into two subsets, where each subset has i -vertices of weight ≥ ε /8k .
i i i i - - - -balanced vertices balanced vertices balanced vertices balanced vertices � For a vertex u , u u u u - - - -trees trees are the connected trees trees components of V \ {u} . � For a color i , a vertex u is i i - -balanced balanced if the i i - - balanced balanced u- trees can be u partitioned into two subsets, where each subset has i -vertices of weight ≥ ε /8k .
More definitions � A color i is abundant abundant if the total weight abundant abundant of i -vertices is at least . / 2 k ε � A vertex u is heavy heavy heavy if . heavy u k � ≥ ε ( ) / 8
The sets B i $����������%������������� � �� ���� � � %�����������&������� � '��������� ���� � '%������������������ Lemma: All the sets B i are non-empty and connected.
Examples
Examples B 1 B 2
Examples B 1 B 2
Examples B 1 B 1 B 2
Examples B 1 B 2 B 1 B 2
Proposition: If a coloring c is ε -far from being convex then the B i ’s are not disjoint.
Proof of the Proposition - sketch � Assume that the B i ’s (at least 2) are disjoint. B 1 B 3 B 2
Proof of the Proposition - sketch � Assume that the B i ’s (at least 2) are disjoint. � Define a coloring c’ : c’(u) = i where B i is the closest to u (choosing the minimal i in case of a tie). B 1 B 3 B 2
Proof of the Proposition - sketch � Assume that the B i ’s (at least 2) are disjoint. � Define a coloring c’ : c’(u) = i where B i is the closest to u (choosing the minimal i in case of a tie). B 1 B 3 B 2
Proof of the Proposition - sketch � Assume that the B i ’s (at least 2) are disjoint. � Define a coloring c’ : c’(u) = i where B i is the closest to u (choosing the minimal i in case of a tie). B 1 B 3 B 2
Recommend
More recommend