由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - An algorithm question.
相关主题
C++ questionsort algorithm
Efficient algorithms for finding number, help pleaseAlgorithms and Data Structures那本比较好呢?
an interview questionIntroduction to Algorithms | The MIT Press
怎样记数多次递归调用种某项操作的次数?真心求助 .net c# 算法,数据结构书,网站
openMP or boost::thread (pthread) for multithreading ?question about google algorithm/architecture (转载)
Google Java coding standard (转载)functional programming?
请教一个microarray问题Computer music
请问有什么c++ algorithm and data structure 好的书吗?关于c++的效率再给个例子
相关话题的讨论汇总
话题: algorithm话题: constant话题: time话题: question话题: find
进入Programming版参与讨论
1 (共1页)
k******r
发帖数: 2300
1
Suppose there is 100 game players. What is the number of games that will be
played to find out the final winner? Require time complexity should be
CONSTANT.
b********n
发帖数: 609
2
你说你这题的主要精神是什么吧,2人对决,100人比2场,1万人比5场。有这好算法你能
得诺贝尔数学奖了。



【在 k******r 的大作中提到】
: Suppose there is 100 game players. What is the number of games that will be
: played to find out the final winner? Require time complexity should be
: CONSTANT.

N********n
发帖数: 8363
3
Is it possible?

【在 k******r 的大作中提到】
: Suppose there is 100 game players. What is the number of games that will be
: played to find out the final winner? Require time complexity should be
: CONSTANT.

t*******l
发帖数: 3662
4
那简单啊,把把每场比赛时间用(n-1)normalize 一下不就行了。





【在 k******r 的大作中提到】
: Suppose there is 100 game players. What is the number of games that will be
: played to find out the final winner? Require time complexity should be
: CONSTANT.

g****c
发帖数: 299
5
只有一个比赛场地吗?问题没法给具体的答案,只能给个idea。
一对一淘汰的话,就建个blance binary tree,log(2)100=7 log(2)10000=14
也就是你要的数量级,不知道这道题是出至何处,哪门课?要你想多深。

【在 k******r 的大作中提到】
: Suppose there is 100 game players. What is the number of games that will be
: played to find out the final winner? Require time complexity should be
: CONSTANT.

p*u
发帖数: 2454
6
I finally think OP was asking for a parallel algorithm.
c*****t
发帖数: 1879
7
Constant time to find the result? It would just be an formula to calculate
the # of comparisons to find the result. It's just like you can use
Fib math formula to directly calculate the N-th number in constant time, or
use linear algorithm to find the result.
Algorithm wise, the problem can be solved in linear time using N-1
comparisons. If using parallelism, if I remember correctly, ln(N) time is
required, but overhead is large. You can think it as merge sort to
distribute the comparison ta
c**r
发帖数: 10001
8
if it's constant time, is it doable?

【在 c*****t 的大作中提到】
: Constant time to find the result? It would just be an formula to calculate
: the # of comparisons to find the result. It's just like you can use
: Fib math formula to directly calculate the N-th number in constant time, or
: use linear algorithm to find the result.
: Algorithm wise, the problem can be solved in linear time using N-1
: comparisons. If using parallelism, if I remember correctly, ln(N) time is
: required, but overhead is large. You can think it as merge sort to
: distribute the comparison ta

1 (共1页)
进入Programming版参与讨论
相关主题
关于c++的效率再给个例子openMP or boost::thread (pthread) for multithreading ?
军版悬案求助:万能的军版求问个数学问题Google Java coding standard (转载)
CNN 能对输入的image做patch normalization么?请教一个microarray问题
Comparison Re: 组合的枚举算法?请问有什么c++ algorithm and data structure 好的书吗?
C++ questionsort algorithm
Efficient algorithms for finding number, help pleaseAlgorithms and Data Structures那本比较好呢?
an interview questionIntroduction to Algorithms | The MIT Press
怎样记数多次递归调用种某项操作的次数?真心求助 .net c# 算法,数据结构书,网站
相关话题的讨论汇总
话题: algorithm话题: constant话题: time话题: question话题: find