Solving Chip Stacking Problems with Lagrange Multipliers

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
cjSlominski
Messages
1
Reaction score
0
My math is a little rusty and I want someone to identify the category of problem (Lagrange Multipliers, Simplex method, ...) I have, so that I can read up on the topic and familiarize myself with the technique.

To make the problem simple, let's say I have some number of chips of varying thickness. I want to place these chips in some number of stacks so that the stacks are as close as possible to being the same height. How do I do that?

I'll define "close as possible" as the sum of the squares of the difference between actual stack heights and the nominal stack height is minimized. Note the nominal stack height is the total thickness of all chips divided by the number of stacks.

Thanks,
Chris
 
Physics news on Phys.org
Sounds awful.
Suppose M is the number of chips, and N the number of stacks you want.
Let [itex]S_{N,i}[/itex] be a set of disjoint subsets of your chips, so that each chip is member of one such subset. i indexes the S-sets.
To each [itex]S_{N,i}[/itex] you may assign a number [itex]L_{N,i}[/itex] which measures how close the stacks are in height.

Thus, you are to compare the [itex]L_{N,i}[/itex] from all [itex]S_{N,i}[/itex], and find the least one.

I'm not sure there will exist a simple formula for this.

Perhaps there exists some clever combinatorial technique to do this effectively regardless of chip thicknesses, but I don't know about it.
 
Last edited: