An example of distribution of the data of average distribution and mobile overdue collection

Source: Internet
Author: User
Tags sort

Recently received a small project, is a dedicated mobile telecom overdue collection of law firms, to help them to do a system, the arrears of each batch of data distributed to the collection of reminders (requirements for each reminder of the number of records and the amount of money owed is fairer), and then mobile Telecom to the Commission report after the transfer to do Commission calculation on it. Think about the function is not much so 2K on the next.

The main difficulty with this small system is the fact that it is not difficult to achieve the data allocation to the collector. I think it can be used in a class or other system with similar needs.

There are many algorithms, such as snake algorithm, greedy algorithm and so on, which are distributed evenly.

1, the Serpentine algorithm is similar to the following sort

A B C D
92 91 90 89

If you take 1-100 of the number to allocate of course, the snake algorithm is best, but the mobile due to the cost of data is not the case, the amount of large tens of thousands of, small 0.01 have, so this algorithm can not be used. 2, Reverse greed (I call it reverse greed, do not know what to call)

The process is probably like this (assigning m data to n person's head)

1.1 The data to be allocated m from large to small sort;

1.2 Remove n parts from the data m to assign the initial value to n individuals;

1.3 The data of this n individual from small to large sort;

1.4 Add n data from the data m to sum up the N person's head

1.5 Repeat 1.3-1.4 until data distribution ends

But the result is also unqualified, because the amount of data produced by the difference is too large

3, random greed (I call it random greed, do not know what to call)

The process is probably like this (assigning m data to n person's head)

1.1 Randomly remove n from the data m as the initial value assigned to n individuals;

1.2 Put n personal data from small to large sort;

1.3 Randomly remove n data from data m and add it to n person's head

1.4 Repeat 1.2-1.3 until data distribution ends

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.