### Abstract

The main goal of this paper is to give an efficient algorithm for the Tree Pattern Matching problem. We also introduce and give an efficient algorithm for the Subset Matching problem. The Subset Matching problem is to find all occurrences of a pattern string p of length m in a text string t of length n, where each pattern and text location is a set of characters drawn from some alphabet. The pattern is said to occur at text position i if the set p[j] is a subset of the set t[i+j-1], for all j, 1≤j≤m. We give an O((s+n)log^{2} m log(s+n)) randomized algorithm for this problem, where s denotes the sum of the sizes of all the sets. Then we reduce the Tree Pattern Matching problem to a number of instances of the Subset Matching problem. This reduction takes linear time and the sum of the sizes of the Subset Matching problems obtained is also linear. Coupled with our first result, this implies an O(n log^{2} m log n) time randomized algorithm for the Tree Pattern Matching problem.

Original language | English (US) |
---|---|

Title of host publication | Conference Proceedings of the Annual ACM Symposium on Theory of Computing |

Editors | Anon |

Publisher | ACM |

Pages | 66-75 |

Number of pages | 10 |

State | Published - 1997 |

Event | Proceedings of the 1997 29th Annual ACM Symposium on Theory of Computing - El Paso, TX, USA Duration: May 4 1997 → May 6 1997 |

### Other

Other | Proceedings of the 1997 29th Annual ACM Symposium on Theory of Computing |
---|---|

City | El Paso, TX, USA |

Period | 5/4/97 → 5/6/97 |

### Fingerprint

### ASJC Scopus subject areas

- Software

### Cite this

*Conference Proceedings of the Annual ACM Symposium on Theory of Computing*(pp. 66-75). ACM.

**Tree Pattern Matching and Subset Matching in randomized O(nlog3 m) time.** / Cole, Richard; Hariharan, Ramash.

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution

*Conference Proceedings of the Annual ACM Symposium on Theory of Computing.*ACM, pp. 66-75, Proceedings of the 1997 29th Annual ACM Symposium on Theory of Computing, El Paso, TX, USA, 5/4/97.

}

TY - GEN

T1 - Tree Pattern Matching and Subset Matching in randomized O(nlog3 m) time

AU - Cole, Richard

AU - Hariharan, Ramash

PY - 1997

Y1 - 1997

N2 - The main goal of this paper is to give an efficient algorithm for the Tree Pattern Matching problem. We also introduce and give an efficient algorithm for the Subset Matching problem. The Subset Matching problem is to find all occurrences of a pattern string p of length m in a text string t of length n, where each pattern and text location is a set of characters drawn from some alphabet. The pattern is said to occur at text position i if the set p[j] is a subset of the set t[i+j-1], for all j, 1≤j≤m. We give an O((s+n)log2 m log(s+n)) randomized algorithm for this problem, where s denotes the sum of the sizes of all the sets. Then we reduce the Tree Pattern Matching problem to a number of instances of the Subset Matching problem. This reduction takes linear time and the sum of the sizes of the Subset Matching problems obtained is also linear. Coupled with our first result, this implies an O(n log2 m log n) time randomized algorithm for the Tree Pattern Matching problem.

AB - The main goal of this paper is to give an efficient algorithm for the Tree Pattern Matching problem. We also introduce and give an efficient algorithm for the Subset Matching problem. The Subset Matching problem is to find all occurrences of a pattern string p of length m in a text string t of length n, where each pattern and text location is a set of characters drawn from some alphabet. The pattern is said to occur at text position i if the set p[j] is a subset of the set t[i+j-1], for all j, 1≤j≤m. We give an O((s+n)log2 m log(s+n)) randomized algorithm for this problem, where s denotes the sum of the sizes of all the sets. Then we reduce the Tree Pattern Matching problem to a number of instances of the Subset Matching problem. This reduction takes linear time and the sum of the sizes of the Subset Matching problems obtained is also linear. Coupled with our first result, this implies an O(n log2 m log n) time randomized algorithm for the Tree Pattern Matching problem.

UR - http://www.scopus.com/inward/record.url?scp=0030643387&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0030643387&partnerID=8YFLogxK

M3 - Conference contribution

AN - SCOPUS:0030643387

SP - 66

EP - 75

BT - Conference Proceedings of the Annual ACM Symposium on Theory of Computing

A2 - Anon, null

PB - ACM

ER -