Re: [理工] 100&101台大電機丙-DS

作者: w781204 (小咪)   2014-03-01 15:21:25
不好意思想請問一下100年的第11題
我爬文看了很久,對於選項C還有E有疑惑
選項C:
tree是不是也有可能是directed?
我查維基他好像是有提到一般在圖論中是undirected的,
但是在資料結構中通常就是directed
假如真是這樣的話,那麼在C選項中假如是directed tree
那麼是不是有可能沒有Y到Z的路徑?
選項E:
我看很多人都討論覺得不要選,
我在我們老師的講義找了很久subtree的定義,
都沒找到很明確的說tree T的subtree,
是只有T的root的child所代表的tree才是他的subtree
後來去維基百科找了Tree(data structure)
在術語介紹的部分有這段話:
A subtree of a tree T is a tree consisting of a node in T and all of its
descendants in T.
我英文不是很好,請大家幫忙看看我的理解是不是有誤,
我看他的意思好像是只要是屬於tree T中的點所組成的tree,都是他的subtree
作者: w781204 (小咪)   2014-03-01 15:35:00
第11題我也不要選E好了@@ 看了好多覺得也許在這裡是定義成跟root連著的@@因為找到這段話:There is a specially designated node called the root.The remaining nodes are partitioned into n>=0 disjointsets T1, ..., Tn, where each of these sets is a tree.We call T1, ..., Tn the subtrees of the root.

Links booklink

Contact Us: admin [ a t ] ucptt.com