+ Reply to Thread
Results 1 to 4 of 4

Evenly distribute numbers

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    Huntsville, AL
    MS-Off Ver
    Office 2010
    Posts
    2

    Evenly distribute numbers

    Ok so we use Median() on the array of numbers to get the mean and STDDEV() to get the standard deviation. I dont quite see how to do the second part programmaticly.

    Thanks,
    Captain


    Quote Originally Posted by shg View Post
    Okay ...

    Suppose you have N*M people having mean and deviation {A,S}, to be divided into N groups of M people each.

    Find the M-subset of N that gives {a,s} closest to {A,S}, make that a group, and remove them from the list.

    Repeat until done.
    Original thread here http://www.excelforum.com/excel-gene...f-numbers.html
    Last edited by arlu1201; 05-06-2013 at 02:25 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Evenly Distribute Groups of Numbers?

    Aside from wanting a result like B3 wanted, what is your reason for needing to do this?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    10-12-2012
    Location
    Huntsville, AL
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Evenly Distribute Groups of Numbers?

    I have 8 processors in my computer and I have some heavy computation to do. Sadly the process is not multithreaded. So I need to evenly distribute the 53 processes across all 8 processors. Each process has different processing time.

    I planned to do this by dividing the processes into 8 groups and writing 8 scripts that will run on one processor each.

    if you wanted a smaller example lets take 8 processes on 4 processors:


    Processing Time Process Name
    100 A
    20 B
    10 C
    9 D
    8 E
    60 F
    2 G
    1 H

    If this table was the values that I am working with and I had 4 processors then I would want these results:

    Processor Group Process Name Summed weight
    1 A 100
    2 F 60
    3 B,G,H 23
    4 C,D,E 27

    Do you see any way to do this?

    I have done some macro programming also but I'm having a hard time figuring out how to do it even in a macro.

    Thanks,
    Kirk









    Quote Originally Posted by shg View Post
    Aside from wanting a result like B3 wanted, what is your reason for needing to do this?
    Last edited by captain118; 05-05-2013 at 12:21 AM. Reason: I missed the E when figuring the results table.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Evenly Distribute Groups of Numbers?

    That's a totally different problem. B3 wanted groups that had a common average AND common SD. All you want is a more or less common total time, a massively simpler problem.

    Conceptually, sort the times from largest to smallest. Assign each process in turn to the least-loaded CPU.

    Please Login or Register  to view this content.
    The formula in D8 and copied down is

    =MATCH(MIN(F7:I7), F7:I7, 0)

    The formula in F8 and copied down and across is

    =SUMIF($D$7:$D8, F$7, $C$7:$C8)
    Last edited by shg; 05-05-2013 at 01:31 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1