Beruflich Dokumente
Kultur Dokumente
Heap
Group 8
B0
Structure(continue….)
• Then for B1, It is consist of two B1-1 or two B0, where one’s root is
another’s leftmost child. So it’ll be ……..
B0 B0
B0
B1
B0
Structure(continue….)
• So for B2 , there will be combine of two B1 .
B1 B1
B2
For B3 , there will be two B2
B3
So in the whole view, it shows the tree order increase
recursivley. B4 is combines of B0 , B1, B2, B3. They are
common in root
B4 :
B0
B1
B2
B3
Binomial Trees
Another way to look at binomial tree
B1 Bo
B2
Bk-2
Bk-1 Bk
Binomial Tree Properties
Bd has the following properties:
1. Has 2d nodes.
like for B2 :
1 there are 22 = 4 nodes
2
3
11
2. Has height d, and depth is i=0,1….. D.
Like in a B3 :
d
6 0
8 14 29
1
11 17 38 2
27
3
B1 B0
B2
Bd-2
Bd-1
13 =< 1, 1, 0, 1>2
Consists of B0, B2, B3 , where everyone is heap ordered.
head[H]
10 1 6
B0 12 25 8 14 29
18
B2 11 17 38
B3
27
Representation of Binomial Heaps
MAKE-BINOMIAL-HEAP ( )
allocate H RUNNING-TIME= Θ(1)
head [ H ] NIL
return H
end
Operations on Binomial Heaps
BINOMIAL-HEAP-MINIMUM (H)
x Head [H]
min key [x]
x sibling [x]
while x ≠ NIL do
if key [x] < min then
min key [x]
yx
endif
x sibling [x]
endwhile
return y
end
Operations on Binomial Heaps
RUNNING–TIME = O (lgn)
Application of Binomial tree & Heap
Binomial tree and binomial heaps tree mostly used in
mathematical algorithm , computer science and real
life platform, just like as:-
86.06 $ 116.18 $
t1
100 $
74.08$
134.9$
t2
63.76 $ 86.06 $
116.18 $ 156.83$
t3
54.88 $ 182.21 $
t4
74.08 $ 100 $ 134.9 $
Why Binomial Model ?
Binomial tree model is efficient for option
pricing because