Distributed Median,Alice has an array A, and Bob has an array B. All elements in A and B are distinct. Alice and Bob are interested in finding the median element of their combined arrays.
In this application note we will only refer to the FX1. The
same terminologies and concept is also used in the FX2. The
FX2 has identical FIFO architecture and the same number of
endpoints as the FX1
樣板 B 樹 ( B - tree )
規(guī)則 :
(1) 每個(gè)節(jié)點(diǎn)內(nèi)元素個(gè)數(shù)在 [MIN,2*MIN] 之間, 但根節(jié)點(diǎn)元素個(gè)數(shù)為 [1,2*MIN]
(2) 節(jié)點(diǎn)內(nèi)元素由小排到大, 元素不重複
(3) 每個(gè)節(jié)點(diǎn)內(nèi)的指標(biāo)個(gè)數(shù)為元素個(gè)數(shù)加一
(4) 第 i 個(gè)指標(biāo)所指向的子節(jié)點(diǎn)內(nèi)的所有元素值皆小於父節(jié)點(diǎn)的第 i 個(gè)元素
(5) B 樹內(nèi)的所有末端節(jié)點(diǎn)深度一樣