  An RNA molecule is structured on several layers. The primary and most obvious
structure is its sequence of bases, i.e. a word over the alphabet {A,C,G,U}.
The higher structure is a set of one-to-one base-pairings resulting in a
two-dimensional folding of the one-dimensional sequence. One speaks of a
secondary structure if these pairings do not cross and of a tertiary structure
otherwise.
  Since the folding of the molecule is important for its function, the search
for related RNA molecules should not only be restricted to the primary
structure. It seems sensible to incorporate the higher structures in the
search. Based on this assumption and certain edit-operations a distance between
two arbitrary structures can be defined. It is known that the general
calculation of this measure is NP-complete \cite{zhang02similarity}. But for
some special cases polynomial algorithms are known. Using a new formal
description of secondary and tertiary structures, we extend the class of
structures for which the distance can be calculated in polynomial time. In
addition the presented algorithm may be used to approximate the edit-distance
between two arbitrary structures with a constant ratio.
