Gray code pattern in tournament chart?

2019-02-19 10:45发布

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条回答
闹够了就滚
2楼-- · 2019-02-19 11:15

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.

查看更多
登录 后发表回答