Re: [理工] [DS] Subtree

看板Grad-ProbAsk作者 (湯姆熊)時間14年前 (2012/01/10 00:40), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《r596twy (湯姆熊)》之銘言: : [T or F] : A是B的subtree 且 B是C的subtree : 所以A是C的subtree : 答案是False : 為什麼阿 : subtree的定義不是只要能從這棵樹中找到one-to-one mapping function : 就算是subtree嗎?? : 還是說有其他限制條件?? : 還是我整個定義都搞錯了... 這裡有從wiki以及他相關連出去的地方找到的定義: (General)A subtree of a tree T is a tree consisting of a node in T and all of its descendants in T. (This is different from the formal definition of subtree used in graph theory.[2]) The subtree corresponding to the root node is the entire tree; the subtree corresponding to any other node is called a proper subtree (in analogy to the term proper subset). (Graph theory)A tree G' whose graph vertices and graph edges form subsets of the graph vertices and graph edges of a given tree G . 按照各位的意思 應該是以Root的兒子為Root而產生subtree 可是看這兩個定義 感覺不出有這種意思呢... 比較像是G=(V,E)中 E' = E交集(V'xV') 也就是induced subgraph by V' 怎會這樣呢...還是我誤解這兩段定義的意思?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.36.12.20

01/12 16:34, , 1F
在圖論裡 T的subtree的root 可以是任意T中的node
01/12 16:34, 1F

01/12 16:35, , 2F
不見得要是root[T]的鄰居
01/12 16:35, 2F
文章代碼(AID): #1F2nXzHV (Grad-ProbAsk)
討論串 (同標題文章)
本文引述了以下文章的的內容:
理工
5
27
完整討論串 (本文為第 2 之 2 篇):
理工
5
27
文章代碼(AID): #1F2nXzHV (Grad-ProbAsk)