Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Glitter Store Thief Inputs: - V[1..n], an array of floating point numbers (not necessarily non-negative), where the ith entry in the array corresponds to the

Glitter Store Thief Inputs: - V[1..n], an array of floating point numbers (not necessarily non-negative), where the ith entry in the array corresponds to the total value of the ith type of glitter in the store. - Q[1..n], an array of non-negative integers, where the Q[i] equals the number of quarts of the ith type of glitter in the store. - k, the number of quart ziplock bags that our thief has Return: X[1..n], an array of integers where the ith entry in the array indicates the amount of a type of glitter that is stolen, such that X that maximizes the profit for the thief. The thiefs profit is given by the following quantity: image text in transcribed Subject to the constraints: For all image text in transcribed , image text in transcribed ? image text in transcribed a) Provide a greedy algorithm that correctly solves this problem. Your solution must be written as an algorithm (not computer code). You must provide sufficient detail to clearly show how your algorithm works AND to analyze the running time of your algorithm b) Express the worst case running time of your algorithm in part 1 using big O notation. Make your bounds as tight as possible. c) Provide a proof by contradiction to argue for the partial correctness of your algorithm.

V i Qlil

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago