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. (do not need to write the code for this problem. see questions below )

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

Questions:

  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 Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago

Question

How can we visually describe our goals?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago