What does it mean for two binary trees to be isomorphic?

前端 未结 3 606
礼貌的吻别
礼貌的吻别 2020-12-25 14:47

What does it mean for two binary trees to be isomorphic? I\'ve been looking online and I can\'t seem to find a clear explanation.

As far as I understand, two trees

3条回答
  •  渐次进展
    2020-12-25 15:49

    Following conditions must fulfill to two trees to be isomorphic :
    1. Two Tree are isomorphic if and only if they preserve same no of levels and same no of vertices in each level .

    2.Two trees are isomorphic if and only if they have same degree spectrum .

    3.Two trees are isomorphic if and only if they have same degree of spectrum at each level.

    1. Total no of leaf descendant of a vertex and the level number of vertex are both tree tree isomorphic invariant .

    IN Simple words :
    Two trees are isomorphic if one tree can be obtained from other by performing any number of flips i.e swapping left childrens and right childrens of a number of node .

    Example of isomorphic trees: isomorphic trees

    Ref: 1.http://www14.in.tum.de/konferenzen/Jass03/presentations/eterevsky.pdf 2.http://www.geeksforgeeks.org/tree-isomorphism-problem/

提交回复
热议问题