Authors:
Tomoya Miyazaki
and
Kouich Hirata
Affiliation:
Kyushu Institute of Technology, Kawazu 680-4, Iizuka 820-8502, Japan
Keyword(s):
Subcaterpillar Isomorphism Between Caterpillars, Subcaterpillar Isomorphism, Subtree Isomorphism, Rooted Labeled Caterpillar, Rooted Labeled Unordered Tree, Caterpillar Inclusion.
Abstract:
In this paper, as a pattern matching for rooted labeled caterpillars (caterpillars, for short), we discuss a
subcaterpillar isomorphism between caterpillars whether or not a pattern caterpillar is a subcaterpillar of a
text caterpillar. Then, we design the algorithms to solve it by simplifying the algorithms for subcaterpillar
isomorphism (between a caterpillar and a tree) when a pattern caterpillar is a subcaterpillar of a text tree
designed by Miyazaki and Hirata (2022). These algorithms run in O(hHσ) time and O(h) space, where
h is the height of a pattern caterpillar, H is the height of a text caterpillar and σ is the number of labels
in the caterpillars. Finally, we give experimental results of computing these algorithms by comparing with
subcaterpillar isomorphism and caterpillar inclusion.