E
Eric J. Holtman
I have a list of stocks I've divided into groups (say, partitioning A).
I have another list of the same stocks, divided differently, (say,
partitioning B).
Is there a way to determine the least "swaps" so that I can turn
B into A?
I.E. given A: 1,2,3 4,5 6 7,8
B: 1,2,4, 3,5,6 7 8
tell me: swap 3 and 4
remove 6 from 4,5,6 into own group
meld 7 and 8.
(This isn't a homework assignment. I've been out of school
for 18 years. I've just been away from graph theory/set theory
for too long.... and was hoping someone would recognize this
problem and point me to a solution).
I have another list of the same stocks, divided differently, (say,
partitioning B).
Is there a way to determine the least "swaps" so that I can turn
B into A?
I.E. given A: 1,2,3 4,5 6 7,8
B: 1,2,4, 3,5,6 7 8
tell me: swap 3 and 4
remove 6 from 4,5,6 into own group
meld 7 and 8.
(This isn't a homework assignment. I've been out of school
for 18 years. I've just been away from graph theory/set theory
for too long.... and was hoping someone would recognize this
problem and point me to a solution).