In this paper we generalize the LCE problem to trees and suggest a few applications of LCE in trees to tries and XML databases. Given a labeled and rooted tree T of size n, the goal is to preprocess T into a compact data structure that support the following LCE queries between subpaths and subtrees in T . Let 0729X&_mathId=si1.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=fc97eaab3f9740b81839f8efa395fc13" title="Click to view the MathML source">v1, 0729X&_mathId=si2.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=a2c86b6d4ef6211ffb252846fd194321" title="Click to view the MathML source">v2, 0729X&_mathId=si3.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=6dd59e588f299db7c7cd6125f3ccea2d" title="Click to view the MathML source">w1, and 0729X&_mathId=si4.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=8675e556e8c3241a554d3f181617e283" title="Click to view the MathML source">w2 be nodes of T such that 0729X&_mathId=si3.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=6dd59e588f299db7c7cd6125f3ccea2d" title="Click to view the MathML source">w1 and 0729X&_mathId=si4.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=8675e556e8c3241a554d3f181617e283" title="Click to view the MathML source">w2 are descendants of 0729X&_mathId=si1.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=fc97eaab3f9740b81839f8efa395fc13" title="Click to view the MathML source">v1 and 0729X&_mathId=si2.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=a2c86b6d4ef6211ffb252846fd194321" title="Click to view the MathML source">v2 respectively.
0729X&_mathId=si28.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=1b2b6d85822ed995789e4c6572bd0896" title="Click to view the MathML source">LCEPP(v1,w1,v2,w2): (path–path LCE) return the longest common prefix of the paths 0729X&_mathId=si6.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=60d7f9fead5f3b3565325a7b388414d6" title="Click to view the MathML source">v1↝w1 and 0729X&_mathId=si26.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=379f13981acfe9de125a9aed525c53ec" title="Click to view the MathML source">v2↝w2.
0729X&_mathId=si29.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=994f783883c43a43e753b0dfc9e6c2a2" title="Click to view the MathML source">LCEPT(v1,w1,v2): (path–tree LCE) return maximal path–path LCE of the path 0729X&_mathId=si6.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=60d7f9fead5f3b3565325a7b388414d6" title="Click to view the MathML source">v1↝w1 and any path from 0729X&_mathId=si2.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=a2c86b6d4ef6211ffb252846fd194321" title="Click to view the MathML source">v2 to a descendant leaf.
0729X&_mathId=si10.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=b84b2af051f16c8e4ea2c929523a2592" title="Click to view the MathML source">LCETT(v1,v2): (tree–tree LCE) return a maximal path–path LCE of any pair of paths from 0729X&_mathId=si1.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=fc97eaab3f9740b81839f8efa395fc13" title="Click to view the MathML source">v1 and 0729X&_mathId=si2.gif&_user=111111111&_pii=S030439751500729X&_rdoc=1&_issn=03043975&md5=a2c86b6d4ef6211ffb252846fd194321" title="Click to view the MathML source">v2 to descendant leaves.