In
computer science, more specifically in
automata and
formal language theory, nested words are a concept proposed by
Alur and Madhusudan as a joint generalization of
words, as traditionally used for modelling
linearly ordered structures, and of ordered unranked
trees, as traditionally used for modelling hierarchical structures. Finite-state acceptors for nested words,
so-called nested word automata, then give a more expressive generalization of
finite automata on words. The linear encodings of languages accepted by finite nested word automata gives the class of visibly pushdown languages. The latter language class lies properly between the
regular languages and the
deterministic context-free languages. Since their introduction in 2004, these concepts have triggered much research in that area.
Formal definition
To define ''nested words'', first define ''matching relations''. For a
nonnegative integer
In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country").
Numbers used for counting are called ''cardinal n ...
, the notation