Skip to content

Transform [mp]

Micro pattern

Description

Express a complex operation as a sequence of simpler transformations.

Problems

Rotation from reversals

Reverse a complete array and its two partitions to rotate it.

Rotation from transpose and reversal

Transpose a square matrix before reversing its rows.

Transform an unprotected complement

Identify protected states, transform the rest, and restore protected markers where necessary.

Encode then expose a new state

Store a next state beside its original state before discarding the original representation.

Reduce to a familiar recurrence

Aggregate or reorder input so a known transition applies to transformed states.