Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tree isomorphism by Antonina Kogut FCS-2, group 3, October 2011.

Similar presentations


Presentation on theme: "Tree isomorphism by Antonina Kogut FCS-2, group 3, October 2011."— Presentation transcript:

1 Tree isomorphism by Antonina Kogut FCS-2, group 3, October 2011

2 Attribute tree Coherent graph without any cycles is called the tree. Isomorphism Isomorphism – logical and mathematical concept, that expresses similarity of system’s structure. isomorphic Two trees are isomorphic if it is possible to reflect one tree into another with precision of renaming his sons.

3 Observation isomorphic Two trees are isomorphic only in case they have the same number of levels and tops on these levels.

4 Example Here we can see that these trees have the same structure but different construction. Confrontation of tops are: 1-1, 2-3, 3-2, 4-4

5 Confrontation For every top we have some numbers {x,y,{a 1,…,a n }}, where х – level of a top for a height; у – “parent’s” level; a – line of father’s levels of sons. For the first tree we have 1 - {2, 2, {0, 1}}, 2 - {1, 0, {0}}, 3 - {1, 1, {0}}, 4 - {0, 0, {0}} For second we have 1 - {2, 2, {1, 0}}, 2 - {1, 1, {0}}, 3 - {1, 0, {0}}, 4 - {0, 0, {0}}.

6 We have 2 groups of records now. So we can say that if we can set up a reflection between 2 trees thеn they’re isomorphic. We should take into the consideration: 1.While comparing groups we mustn’t take care of ordinal number of an element; 2.Do not care about order of elements in line of father’s levels of sons.

7 How to define whether two trees are isomorphic 1: procedure isomorphic (T1,T2) 2: define number of nodes in trees; 3: assign 0 for all leaves of a tree; 4:let L1 –quantity of leaves of the first tree on 0-level; 5:let L2 – quantity of leaves of the second tree on 0-level; 6:for all level beginning with the first 7: construct the sequence of cabins 8: If trees have the same number of elements(and they can be replaced) then 9: T1 і T2 are isomorphic 10: else 11: T1 і T2 aren’t isomorphic 12: end Time assessment О(n)

8 This picture illustrates the process of investigation of tree isomorphism.

9 The result So we have defined that two trees are isomorphic. Now we get this tree and we are able to work with this one not with the previuos both trees.

10 The usage Tree isomorphism is the basis of natural explanation of more general problems of subtrees and the huge amount of similar trees.

11 Something more… Sometimes trees are used to draw the genealogical tree of a person. Here we can see the Biblian geneological tree.

12 Список літератури 1.http://distedu.ukma.kiev.ua/mod/resource /view.php?id=639 (із матеріалів Глибовця М.М.);http://distedu.ukma.kiev.ua/mod/resource /view.php?id=639 2.http://www.lsi.upc.edu/~valiente/graph- 00-01-c.pdfhttp://www.lsi.upc.edu/~valiente/graph- 00-01-c.pdf 3.http://www.informatics.ru/?page=lib_view article&article_id=29


Download ppt "Tree isomorphism by Antonina Kogut FCS-2, group 3, October 2011."

Similar presentations


Ads by Google