I am studying Fibonacci heap alone, and I came across a question.
I know any nodes can be inserted into Fibonacci heap, but what if the rank(or value, or key) of that new node is equal to the sibling node?
1) For example,
(1) <-minimum root
/ \
(3) (5)
and what happens if node of (1) is inserted?
(1) --- (1)
/ \
(3) (5)
2) Or what happens in this kind of situation?
before:
(2)-----(4)-----(5)
| / \ / \
(1) (6) (7) (8) (9)
after:
(2)-----(4)-----(5) + (5)
| / \ / \
(1) (8) (9) (1) (2)
Where would the new node-tree belong?
3) How would you consolidate(or order) this kind of tree - that has a pair of equal nodes at the root?
(10) ---- (10) ----- (1) ----- (3) ----- (4)
I'd be grateful if anyone can help me solve this little confusion on Fibonacci heap. Thank you.