130 likes | 268 Views
Combinatorics of colouring 3-regular trees. Paul Sant 1 and Alan Gibbons 2 1 Department of Computing and Information Systems, University of Luton 2 Department of Computer Science, King’s College, London. Overview. Introduction – What is Colouring Pairs of Binary Trees ( CPBT ) ?
E N D
Combinatorics of colouring 3-regular trees Paul Sant1 and Alan Gibbons2 1 Department of Computing and Information Systems, University of Luton 2 Department of Computer Science, King’s College, London
Overview • Introduction – What is Colouring Pairs of Binary Trees (CPBT) ? • Rotations and Colour constraining edges • Optimal Linear-time algorithmics ? • Conclusions
T2 T1 y6 x6 y5 x1 y1 x5 x2 y4 x3 x4 y2 y3 CPBT – Problem Definition Given any pair of same-sized 3-regular trees, T1 and T2, 3-edge colour T1 and T2 in such a way that edges adjacent to leaves (from left to right) are similarly coloured in T1 and T2
How to solve CPBT ? • We have approached this in two ways (several papers:TCS, Texts in Algorithmics, LNCS):- • Rotations coupled with colour-constrained edges • A colouring topology approach • This talk is concerned with the first of these approaches.
Rotations in binary trees • Well known technique used for rebalancing Binary (particularly AVL) trees :- • Any binary tree is transformable into any other using a sequence of rotations.
Colouring constrained edges • The rotated edge is constrained to be the same colour as its grandparent :- • It is easy to show that this condition is necessary to obtain a solution to CPBT.
A solution to CPBT • An example of a sequence with no clashes (colouring requires O(n) time) • As we will see, changing the rotational path slightly may cause a clash.
Shortest clashing path • Example of a (shortest) clashing path :- • The rotational space of binary tree is large • finding a non-clashing path is still an open • problem
Non-clashing paths • The number of trees with n leaves is given by n-1th Catalan number – this is factorial in n. • Therefore, finding non-clashing paths by exhaustive search is not an option for polynomial time algorithmics.
{ { { k-1 k-1 k-1 Shortest clashing paths • For each n > 5 there is at least one pair of trees for which a shortest rotational path will lead to a clashing path :- 5 steps k-2 steps
{ { k-1 k-1 { k-1 Longer paths • However, we can solve all the problematic pairs previously discussed :- • And we only require one extra rotation k-2 steps 6 steps
Open problems • How to find non-clashing paths ? • Can we find such non-clashing paths quickly ? • Conversely, can we prove that the problem is hard ?
Conclusions • We postulate that the rotational approach can solve CPBT. • A linear-time solution to finding non-clashing paths would lead to a linear-time solution to 4CP for planar graphs. • Work on the problem continues…