master的AD选择:EE@Yale or EE@CMU# EE - 电子工程
f*i
1 楼
小弟在准备qualify考试,看到算法例卷上有三题,百思不得其解,希望高人能给一
点帮助。
1.You are given n items with weighs w[1..n] with w[1] to group the items into m groups (1<=m<=n) non-empty and disjoint classes C1
,C2....Cm, and assign each item in Cj a weight-label Lj, 1<=j<=m, such that
EE(w[i]-Lj)^2 is minimun (汗,连加号打不出来,只好用E代替,1<=j<=m, w[i]
are the elements in each group j)
1)Give a pseudocode of an efficient algorithm to determine the Cj and the
label Lj, take w=[2,3,5,6,7,8,9,10], m=2 show L1,L2 a
点帮助。
1.You are given n items with weighs w[1..n] with w[1]
,C2....Cm, and assign each item in Cj a weight-label Lj, 1<=j<=m, such that
EE(w[i]-Lj)^2 is minimun (汗,连加号打不出来,只好用E代替,1<=j<=m, w[i]
are the elements in each group j)
1)Give a pseudocode of an efficient algorithm to determine the Cj and the
label Lj, take w=[2,3,5,6,7,8,9,10], m=2 show L1,L2 a