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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.