質問

In a tournament chart from the bottom to the top where there is a winner I've been told that it is somehow connected with the gray-code. I know that the grey code is an alternative code, it's recursive and is useful to find the best solution in various games, space-filling-curves, error correction codes, harddisk positioning and is a shorthand for the piano player but how is this code is related with a tournament chart?

役に立ちましたか?

解決

Parsed the following from here:

A tournament is really a node in a binary tree. The value in each node contains the ranking of the best ranking team contained in the tournament tree. It turns out that the gray code of the ranking-1 has a bit pattern that conveniently helps us descend the binary tree to the appropriate place at which to put the team. When descending the three, the bits in the gray code of the ranking from least-significant to most-significant indicate which branch to take.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top