07.02.2014 Views

Slides (PDF)

Slides (PDF)

Slides (PDF)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Rooted trees (part 2)<br />

Lemma<br />

If there is O(n) algorithm for rooted trees isomorphism there is<br />

O(n) algorithm for ordinary trees isomorphism.<br />

Proof.<br />

1 Let A to be O(n) algorithm for rooted trees.<br />

2 Let T 1 and T 2 to be ordinary trees.<br />

3 Lets find centers of this trees. There are three possibilities:<br />

1 each tree has only one center (c 1 and c 2 respectively)<br />

return A(T 1 , c 1 , T 2 , c 2 )<br />

5 / 22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!