Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please i need correct answer and hurry up please Q2: Election Billboards A This is a hypothetical application. Nothing mentioned in this assignment is true.

image text in transcribed
image text in transcribed
image text in transcribed
please i need correct answer
and hurry up please
Q2: Election Billboards A This is a hypothetical application. Nothing mentioned in this assignment is true. Overview The Independent Election Commission (IEC) has approved the latest rules governing postering on highway billboards by candidates for the upcoming elections for the house of representatives. The IEC announced that it will provide billboards for election posters on major highways in the country and that no candidate will be allowed to post on billboards that are less than or equal to 4 kilometers from each other. The IEC also announced the locations of these billboards on the highways. Given the locations of the billboards, a candidate in Amman, who is also a computer science graduate, decided to collect statistics on how many cars pass by each billboard. Given these statistics he would like to pick a subset of billboards to post on that maximizes the exposure to his campaign material. Problem Description Consider a highway with n billboards. You are given the following: A sequence of n non-negative strictly-increasing integers {d, da...., dn} representing the distances of the billboards from the beginning of the highway they are placed on, A sequence of n non-negative integers {c1.02.....cn} representing the number of cars that pass per day (on average) by each billboard. Your task is to implement a dynamic programming algorithm to find which billboards the candidate should pick in order to maximize exposure to his campaign posters, where exposure is measured by summing the number of cars that see the picked billboards. The only constraint is that no two picked billboards can be

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_2

Step: 3

blur-text-image_3

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

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions