Ultraviolet A 1456-cellular network (Greedy + probability + dp)

Source: Internet
Author: User

From http://blog.csdn.net/shuangde800

Question Source: Click to open the link

Question

(From lrj Training Guide)

Mobile Phone Positioning in the cellular network is a basic problem. Assume that the cell network has learned that the mobile phone is in C1, C2 ,..., One of the regions of CN is the easiest way to search for mobile phones in these regions at the same time. However, this is a waste of bandwidth. Because the probability of the mobile phone in different regions can be known in the cellular network, one way to fold is to divide these areas into W groups and then access them in turn. For example, if you know that a mobile phone may be in five regions with a probability of 0.3, 0.05, 0.1, 0.3, and 0.25 respectively, W = 2, you can first access {C1, c2, C3}, and then access {C4, C5} at the same time. The mathematical expectation for the number of accessed regions is 3*(0.3 + 0.05 + 0.1) + (3 + 2) * (0.3 + 0.25) = 4.1. Another method is to access {C1, C4} at the same time and then {C2, C3, C5}. The mathematical expectation of the number of accessed regions is 2 × (0.3 + 0.3) + (3 + 2) × (0.05 + 0.1 + 0.25) = 3.2.

Ideas

It can be found from the formula that, in order to minimize the total expected value, the area with a higher probability should be placed in front of the access.

So first, sort all probabilities from large to small. When grouping, you can divide consecutive segments into one group.


F [I] [J] indicates the minimum expected value of the first I, which is divided into J groups.
F [I] [J] = min {f [k-1] [J] + I * sum [K ~ I], 1 <= k <= I}

Code

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.