Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Being an editor of a newspaper, your job is to put such news articles ( NA ) on the front page of the newspaper which

Being an editor of a newspaper, your job is to put such news articles (NA) on the front
page of the newspaper which attracts maximum readers. To accommodate maximum NA on the front page, it
is usual practice to break the NA into parts and print one part/partition (P1) at the front page and second part/
partition (P2) at other page. However, the breaking of the NA may reduce the attraction of the readers. Instead
of random size of partitions, let us fix the size of the partitions for each of the NA as follows:
(i)Pl=100% and P2=0%
(ii)Pl=75% and P2=25%
(iii)Pl=50% and P2=50%
(iv)Pl=25% and P2=75%
As an example, Table 1 present the details like, NA id, count of characters in NA, count of attracted readers if
P1=100%,75%,50%, and 25%.
Considering that maximum C characters can be placed at the front page of the newspaper, propose an efficient
greedy based algorithm (Need to write pseudo-code) to place/ print the NAs on the front page which attracts
maximum number of readers. Also, analyze the running time required by your proposed algorithm.
image text in transcribed

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

More Books

Students also viewed these Databases questions

Question

Question Can a self-employed person adopt a profit sharing plan?

Answered: 1 week ago