Gray code pattern in tournament chart?

人走茶凉 提交于 2019-12-19 10:15:51

问题


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.



来源:https://stackoverflow.com/questions/7960920/gray-code-pattern-in-tournament-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!