lec05 - Tournament Trees Winner trees. Loser Trees. Winner...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Tournament Trees Winner trees. Loser Trees.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Winner Tree – Definition Complete binary tree with n external nodes and n – 1 internal nodes. External nodes represent tournament players. Each internal node represents a match played between its two children; the winner of the match is stored at the internal node. Root has overall winner.
Background image of page 2
Winner Tree For 16 Players player match node
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Winner Tree For 16 Players 4 3 6 8 1 5 7 3 2 6 9 4 5 2 5 8 Smaller element wins => min winner tree . 3 6 1 3 2 4 2 5 1 2 1
Background image of page 4
Winner Tree For 16 Players 4 3 6 8 1 5 7 3 2 6 9 4 5 2 5 8 3 6 1 3 2 4 2 5 1 2 1
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Complexity Of Initialize O(1) time to play match at each match node. n – 1 match nodes. O(n) time to initialize n -player winner tree.
Background image of page 6
Winner Tree Operations Initialize O(n) time Get winner O(1) time Replace winner and replay O(log n) time More precisely Theta(log n) Tie breaker (player on left wins in case of a tie).
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Replace Winner And Replay 4 3 6 8 1 5 7 3 2 6 9 4 5 2 5 8 3 6 1 3 2 4 2 5 1 2 1 Replace winner with 6 .
Background image of page 8
Replace Winner And Replay 4 3 6 8 6 5 7 3 2 6 9 4 5 2 5 8 3 6 1 3 2 4 2 5 1 2 1 Replay matches on path to root.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Replace Winner And Replay 4 3 6 8 6 5 7 3 2 6 9 4 5 2 5 8 3 6 1 3 2 4 2 5 1 2 1 Replay matches on path to root.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/09/2011 for the course CSE 3101 taught by Professor Shani during the Fall '10 term at University of Florida.

Page1 / 35

lec05 - Tournament Trees Winner trees. Loser Trees. Winner...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online