HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Partitioning planar graph cycles based on chords

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
partitioninggraphchordsplanarbasedcycles

Problem

Given a cycle of length > 3 in a planar graph, I'm looking to partition it into 4 sublists of length 2 or more such that:

  • No sublist contains two vertices with a chord between them



  • The last element in each sublist is the first element in the next



  • Every element in each sublist is adjacent to its neighbors in the original cycle



  • The difference in size between the sublists is kept minimal, given constraints 1 to 3



Overall I'm not really sure if this is required to be solved using graph structures, or if it's possible to transform it into something more general.

Solution

If the original cycle has length $n$, there is a straightforward $O(n^5)$ time algorithm: simply guess which vertex each sublist should start at.

In other words, let the original cycle go through the vertices $v_1,v_2,\dots,v_n,v_1$. Then you can choose indices $i,j,k,l$ (such that $1 \le i < j < k < l \le n$), where the first sublist contains $v_i,v_{i+1},\dots,v_j$, the second sublist contains $v_j,v_{j+1},\dots,v_k$, and so on (assuming index arithmetic wraps around modulo $n$). There are only ${n \choose 4} \in O(n^4)$ possible choices for $i,j,k,l$, so you can exhaustively try them all and test each one to see whether it meets all your requirements, and then keep whichever one is best (according to your "difference-in-size" metric).

This proves that the problem can be solved in polynomial time.

Context

StackExchange Computer Science Q#41330, answer score: 2

Revisions (0)

No revisions yet.