Re: [NF] Looking for name of algorithm

2014-06-19 Thread Gene Wirchenko
At 10:09 2014-06-13, Malcolm Greene wrote: Looking for an algorthim for the following use case (highly simplified): 1. I have buckets (probably 3-5) 2. I have 1 million records with a quantity field containing values in the range 1 to 1000 I would like to optimally shuffle my 1 million recor

RE: [NF] Looking for name of algorithm

2014-06-19 Thread Dave Crozier
[mailto:profox-boun...@leafe.com] On Behalf Of Jerry Wolper Sent: 19 June 2014 00:06 To: ProFox Email List Subject: RE: [NF] Looking for name of algorithm > Malcolm, > It is very closely linked with something called the "Monte Carlo > Method" of sampling (even though you are distributi

RE: [NF] Looking for name of algorithm

2014-06-18 Thread Dan Covill
uns will be alike. Dan > From: jwol...@swanzoco.com > To: profoxt...@leafe.com > Date: Wed, 18 Jun 2014 19:06:15 -0400 > Subject: RE: [NF] Looking for name of algorithm > > > Malcolm, > > It is very closely linked with something called the "Monte Carlo > &g

RE: [NF] Looking for name of algorithm

2014-06-18 Thread Jerry Wolper
> Malcolm, > It is very closely linked with something called the "Monte Carlo > Method" of sampling (even though you are distributing no sampling) > but the concepts are the same. Now I'm confused. I thought Monte Carlo was estimating a distribution by running (or simulating) the function many ti

Re: [NF] Looking for name of algorithm

2014-06-16 Thread Malcolm Greene
Thank you all for you ideas, Paul for the executable pseudo code, and Dave for the algorithm name which is exactly what I was looking for. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-

RE: [NF] Looking for name of algorithm

2014-06-16 Thread Dave Crozier
it is a distant memory but it will hopefully point you in the right direction. Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Malcolm Greene Sent: 13 June 2014 18:10 To: profox@leafe.com Subject: [NF] Looking for name of algorithm Looking for an al

Re: [NF] Looking for name of algorithm

2014-06-13 Thread mbsoftwaresolutions
Did this years ago (1998?) and called it an "Nth" program. Wrote this in ASSEMBLER!!! Basically, you take your total count, divide by the number of buckets, and of that answer, the whole part we'll call Nth and the remainder we'll call LeftoverFraction. As I start to cycle through the data,

Re: [NF] Looking for name of algorithm

2014-06-13 Thread Paul McNett
Hi Malcolm, I would consider something like the following (pseudocode): from random import shuffle buckets = [] bucket_count = 3 class Bucket: tot_qty = 0 items = [] for i in range(bucket_count): buckets.append(Bucket()) # Sort the input_table by qty

Re: [NF] Looking for name of algorithm

2014-06-13 Thread Stephen Russell
On Fri, Jun 13, 2014 at 12:09 PM, Malcolm Greene wrote: > Looking for an algorthim for the following use case (highly > simplified): > > > > 1. I have buckets (probably 3-5) > > - Round Robin Distribution is the term you are looking for I believe. You sort the value column

Re: [NF] Looking for name of algorithm

2014-06-13 Thread M Jarvis
On Fri, Jun 13, 2014 at 10:45 AM, Malcolm Greene wrote: > Matt, > > Good questions. I don't care how many records are in each bucket as long > as the sum total of all quantity fields in each bucket are balanced as > much as possible. > On the phone so not giving this full CPU power so bear with m

Re: [NF] Looking for name of algorithm

2014-06-13 Thread Malcolm Greene
Matt, Good questions. I don't care how many records are in each bucket as long as the sum total of all quantity fields in each bucket are balanced as much as possible. Taking the extreme case, if I had 999,999 records with a quantity value of 1, one record with a quantity value of 1,000,000 and t

Re: [NF] Looking for name of algorithm

2014-06-13 Thread M Jarvis
> > I would like to optimally shuffle my 1 million records across my > buckets so that the total quantity (based on the sum of each record's > quantity field) in each bucket is balanced (as much as possible) across > buckets. > > > > This sounds like the type of problem that has been solved before

[NF] Looking for name of algorithm

2014-06-13 Thread Malcolm Greene
Looking for an algorthim for the following use case (highly simplified): 1. I have buckets (probably 3-5) 2. I have 1 million records with a quantity field containing values in the range 1 to 1000 I would like to optimally shuffle my 1 million records across my buckets so that the total