MHB Forming groups as nearly equal in sums as possible

  • Thread starter Thread starter treesloth
  • Start date Start date
  • Tags Tags
    Groups Sums
treesloth
Messages
2
Reaction score
0
Hello. I'm not sure what type of problem this is that I'm trying to solve. Any pointers would be greatly appreciated.

Suppose you have a list of numbers and you want to form them into, say, 4 groups such that the sum of each group is, as nearly as possible, equal to the sums of each of the other groups; basically, making groups with equal sums without regard to the number of elements in each. Is there a way to do that with certainty that the groups are as close as possible given the elements available? If not, is there a way to iteratively approach an optimal grouping? I'm just using a made-up dataset in R generated via:

Code:
x <- as.integer(runif(100, 250, 500))

Thanks in advance.
 
Physics news on Phys.org
After some more research, this is a subset sum problem, or, in some cases, partitioning. It can be addressed using iterations of the R subsetsum function in the adagio library.
 
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Thread 'Detail of Diagonalization Lemma'
The following is more or less taken from page 6 of C. Smorynski's "Self-Reference and Modal Logic". (Springer, 1985) (I couldn't get raised brackets to indicate codification (Gödel numbering), so I use a box. The overline is assigning a name. The detail I would like clarification on is in the second step in the last line, where we have an m-overlined, and we substitute the expression for m. Are we saying that the name of a coded term is the same as the coded term? Thanks in advance.
Back
Top