Maintaining the cycle structure of dynamic permutations

06/07/2023
∙
by   Zsuzsanna Lipták, et al.
∙
0
∙

We present a new data structure for maintaining dynamic permutations, which we call a forest of splay trees (FST). The FST allows one to efficiently maintain the cycle structure of a permutation π when the allowed updates are transpositions. The structure stores one conceptual splay tree for each cycle of π, using the position within the cycle as the key. Updating π to τ·π, for a transposition τ, takes 𝒪(log n) amortized time, where n is the size of π. The FST computes any π(i), π^-1(i), π^k(i) and π^-k(i), in 𝒪(log n) amortized time. Further, it supports cycle-specific queries such as determining whether two elements belong to the same cycle, flip a segment of a cycle, and others, again within 𝒪(log n) amortized time.

READ FULL TEXT

Please sign up or login with your details

Continue with:
Or login with email
Enter Password
Re-enter Password

Forgot password? Click here to reset
Success!
Error Icon An error occurred

Sign in with Google

×

Use your Google Account to sign in to DeepAI

×
Pro

Consider DeepAI Pro

Subscribe to DeepAI Pro
DeepAI Pro
Provides a limited generation allowance each month. When exceeded, you are charged overage rates available at deepai.org/pricing. Also includes an ad-free experience and API access. Renews automatically until canceled. Non-refundable.
Subtotal
Total due today

Payment

Add DeepAI credits
DeepAI credits
One-time purchase. Credits are added to your wallet after payment.
Subtotal
Total due today

Payment