Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

there are N piles of stones arranged in a row, stones[i], K is merging stone, and cost is equal to the total number of stones

there are N piles of stones arranged in a row, stones[i], K is merging stone, and cost is equal to the total number of stones in these K piles. find the best minimum but is the maximum cost in piles possible p_i value

input: stone (S) = [3,2,4,1], k= 3

Explanation:

piles=<2,3,4>=>

p1 piles=2, p1 to p2 stone [3,2] , cost 5

p2 piles=3, p3 to p3, stone [4], cost 4

p3 piles=4, p4 to p4, stone [1], cost 1

maxmum cost at this one is 5, but maybe is not minimum cost at all possible solutions

Question:

  1. What is the objective function for this problem? Be precise and mathematical (ideally it should be a single formula).(A function that takes the inputs values (the s_i values and k) and a solution (the p_i) values, and computes how good that solution is.)
  2. For an input with n stones and k piles, how many feasible solutions are there?

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

Q.1. Taxonomic classification of peafowl, Tiger and cow ?

Answered: 1 week ago

Question

Q .1. Different ways of testing the present adulterants ?

Answered: 1 week ago

Question

Q.1. Health issues caused by adulteration data ?

Answered: 1 week ago