Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 (electoral colleges) In this problem, we want to determine the set of states with the smallest total population that can provide the votes

image text in transcribed
Problem 2 (electoral colleges) In this problem, we want to determine the set of states with the smallest total population that can provide the votes to win the electoral college. Formally, the problem is the following: You are given a list of n states along with their population p;, and the number of electoral votes v;, for 1 sign. Also, you are given Z, the number of electoral votes needed to win. All electoral votes of a state go to a single candidate. Our goal is to find a set of states S with the smallest total population that has at least Z electoral votes in total. You only have to output the total population of the set S, you do not need to output the set itself. Example: if n = 5, populations are P = [200, 100, 30, 700, 250], electoral votes are V = [5, 1, 2, 7, 6] and Z = 12, then the solution is 480 since 480 = 200 + 30 + 250 and states 1, 3, 5 have 5 + 2+6 = 13 electoral votes. Note in this example: p2 > pa but v2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Differential Equations And Boundary Value Problems

Authors: William E Boyce, Richard C DiPrima

8th Edition

0470476389, 9780470476383

More Books

Students also viewed these Mathematics questions

Question

1. What will happen in the future

Answered: 1 week ago

Question

3. Avoid making mistakes when reaching our goals

Answered: 1 week ago