由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 请教一道算法题
相关主题
一道巨常见的题这题应该用bucket sort还是counting sort
再问一道题histogram一个题
问一道算法题Another DP Problem: Balanced Partition
A家面试题求教一道面试题
问一道题目median of N^2 numbers across N machines
求问一道MS面试题问道关于快速找bucket的面试题
小弟求问LinkedIn那道Deep Iterator的题请教最优算法:最多装满水的桶?
一道大数据题web count 设计
相关话题的讨论汇总
话题: bucket话题: task话题: buckets话题: 整数话题: problem
进入JobHunting版参与讨论
1 (共1页)
J*******i
发帖数: 2162
1
有N个整数,M个bucket,每个bucket都可以装至少N个整数
一个bucket的value等于放入它的所有整数的和
现求解一种分配方法,使之 minimize(the max value of all buckets)
看起来像bin packing问题,但好像又不是~
J*******i
发帖数: 2162
2
就是你往一个bucket可以装从0个到N个数,都可以
g*********s
发帖数: 1782
3
unsigned int or int?

【在 J*******i 的大作中提到】
: 有N个整数,M个bucket,每个bucket都可以装至少N个整数
: 一个bucket的value等于放入它的所有整数的和
: 现求解一种分配方法,使之 minimize(the max value of all buckets)
: 看起来像bin packing问题,但好像又不是~

J*******i
发帖数: 2162
4
unsigned int is fine

【在 g*********s 的大作中提到】
: unsigned int or int?
g*********s
发帖数: 1782
5
then actually we can assume positive int, as zero doesn't matter.
sounds like a job assignment/scheduling problem:
given n task with different execution time and m workers, assign the task
to workers such that the task can be finished at the earliest time.
Job shop scheduling
http://en.wikipedia.org/wiki/Job_shop_scheduling

【在 J*******i 的大作中提到】
: unsigned int is fine
i********s
发帖数: 133
6
This is NP complete. Suppose we have only 2 buckets, and a set of numbers.
Then the multiset partitioning problem (NPC) can be reduced to this problem.
J*******i
发帖数: 2162
7
Thanks a lot for the reference!

task

【在 g*********s 的大作中提到】
: then actually we can assume positive int, as zero doesn't matter.
: sounds like a job assignment/scheduling problem:
: given n task with different execution time and m workers, assign the task
: to workers such that the task can be finished at the earliest time.
: Job shop scheduling
: http://en.wikipedia.org/wiki/Job_shop_scheduling

c******n
发帖数: 4965
8
就是binpacking 啊。
这题的decision 形式就是
given bins of bucket size X , N integers . X < sum(N)
and given bucket count M, is it possible to pack all N integers into
buckets?
decision---optimization 转换是search X,
original bin packing 的转换是search M

【在 J*******i 的大作中提到】
: 有N个整数,M个bucket,每个bucket都可以装至少N个整数
: 一个bucket的value等于放入它的所有整数的和
: 现求解一种分配方法,使之 minimize(the max value of all buckets)
: 看起来像bin packing问题,但好像又不是~

1 (共1页)
进入JobHunting版参与讨论
相关主题
web count 设计问一道题目
another MIT dp problem without answer on their website.求问一道MS面试题
子集和问题和0-1背包问题的疑惑小弟求问LinkedIn那道Deep Iterator的题
问道大数据的题一道大数据题
一道巨常见的题这题应该用bucket sort还是counting sort
再问一道题histogram一个题
问一道算法题Another DP Problem: Balanced Partition
A家面试题求教一道面试题
相关话题的讨论汇总
话题: bucket话题: task话题: buckets话题: 整数话题: problem