TCS 1993
On finding common subtrees
Abstract
Let T and R be two arbitrary ordered trees, |T| ⩾ |R|, whose nodes are labelled over an alphabet A. We devise a simple solution for detecting all the common subtrees in O(|T|) time and space if the size of A is finite, and O(|T| log min (|A|, |T|)) time otherwise. We solve the problem of finding in T and R all occurrences (if any) of any given tree B in either O(|T|⧸|B|) or O(|B|+|T|⧸|B|) time. This requires to set up a simple data structure in O(|T|) time that allows to find all maximal subtrees of B in O (|B|) time and to solve other related problems.
Authors
Keywords
No keywords are indexed for this paper.
Context
- Venue
- Theoretical Computer Science
- Archive span
- 1975-2026
- Indexed papers
- 16261
- Paper id
- 135215077837508173