基于比较的排序算法算法

2023-09-10 23:12:12 作者:8.余生

我想排名或排序的项目集合(与大小可能大于100,000),其中集合中的项目有没有内在的(可比)的价值,而不是所有我已经是任何两个项目之间的比较已在主观的方式提供了深受用户欢迎。

I would like to rank or sort a collection of items (with size potentially greater than 100,000) where items in the collection have no intrinsic (comparable) value, instead all I have is the comparisons between any two items which have been provided by users in a subjective manner.

例:考虑一个元素集合 [A,B,C,D] 键,用户比较 B>一个 A> ð D> ç。该集合的正确顺序应该为 [B,A,D,C]

Example: Consider a collection with elements [a, b, c, d] and comparisons by users b > a, a > d, d > c. The correct order of this collection would be [b, a, d, c].

这个例子很简单,但还有比这更复杂的情况:

This example is simple, however there could be more complicated cases:

由于比较是主观的,用户也可以说 C> b 。在这种情况下,将导致与排序冲突的上方。 你也可能没有比较的连接中的所有项目,即 B>一个 D> ç。在这种情况下,顺序是不明确的。这可能是 [B,A,D,C] [D,C,B,A] 。在这种情况下,任一顺序是可以接受的。 Since the comparisons are subjective, a user could also say that c > b. In which case that would cause a conflict with the ordering above. Also you may not have comparisons that "connects" all the items, i.e. b > a, d > c. In which case the ordering is ambiguous. It could be [b, a, d, c] or [d, c, b, a]. In this case either ordering is acceptable.

如果可能的话将是很好某种程度上考虑到相同的比较多实例,给那些有较高的出现更多的重量。但是,如果没有这样的条件的溶液仍然是可以接受的。

If possible it would be nice to somehow take into account multiple instances of the same comparison and give those with higher occurrences more weight. But a solution without this condition would still be acceptable.

该算法的一个类似的应用是用扎克伯格的FaceMash应用中他排名基于比较的人(如果我理解正确的话),但我一直没能找到什么算法实际上是。

A similar application of this algorithm was used by Zuckerberg's FaceMash application where he ranked people based on comparisons (if I understood it correctly), but I have not been able to find what that algorithm actually was.

是否有一个算法,该算法已经存在,可以解决上述问题呢?我不想花力气试图拿出一个,如果是这样的话。如果没有具体的算法,有没有可能是某些类型的算法或技术,你可以指向我?

Is there an algorithm which already exists that can solve the problem above? I would not like to spend effort trying to come up with one if that is the case. If there is no specific algorithm, is there perhaps certain types of algorithms or techniques which you can point me to?

推荐答案

这是已经发生在另一个舞台上的一个问题:有竞争力的游戏!在这里,我们的目标是给每个游戏者的一系列的1对1进行比较的基础上的全球性的等级。当然,困难的是,比较是不可传递(我以主观的意思是在你的问题提供一个人)。卡斯帕罗夫击败菲舍尔次(不知道还有棋手!)鲍勃击败卡斯帕罗夫,潜在的。

This is a problem that has already occurred in another arena: competitive games! Here, too, the goal is to assign each player a global "rank" on the basis of a series of 1 vs. 1 comparisons. The difficulty, of course, is that the comparisons are not transitive (I take "subjective" to mean "provided by a human being" in your question). Kasparov beats Fischer beats (don't know another chess player!) Bob beats Kasparov, potentially.

这使得依赖于传递无用的算法(即 A> B和B> C =>在&以及c )当你结束了(可能)高度循环图。

This renders useless algorithms that rely on transitivity (i.e. a > b and b > c => a > c) as you end up with (likely) a highly cyclic graph.

若干等级系统已设计来解决这个问题。

Several rating systems have been devised to tackle this problem.

最知名的系统可能是的Elo算法/得分有竞争力的棋手。它的后代(例如, Glicko评级系统)更复杂,并考虑到输/赢创纪录的帐户统计特性---换句话说,如何可靠是一个等级?这类似于你有更多的游戏权重更重记录的想法发挥。 Glicko也构成了基础使用在Xbox Live上的多人视频游戏 Trueskill为系统。

The most well-known system is probably the Elo algorithm/score for competitive chess players. Its descendants (for instance, the Glicko rating system) are more sophisticated and take into account statistical properties of the win/loss record---in other words, how reliable is a rating? This is similar to your idea of weighting more heavily records with more "games" played. Glicko also forms the basis for the TrueSkill system used on Xbox Live for multiplayer video games.

 
精彩推荐
图片推荐