Describe efficient algorithm determines maximum total value

Assignment Help Computer Engineering
Reference no: EM133816581

Assignment: Efficient Algorithm to Solve the Question using Dynamic Programming

Prof. Blocki plans to help Theory students by donating some of his books. He decides to put those books in the LWSN commons, and arranges them in a row. You notice the books and immediately jump towards them with your backpack. You are very excited to see all the books, however, unfortunately you also see Jane standing close to you with her backpack, equally excited to grab those books. There is no other person around the books area, so you both come up with few rules to pick the books. Before we discuss the rules, here are few things to keep in mind:

A. There are "n" number of books and you can assume that $n$ is even.

B. Each book "i" has a value "v_i" and a space "s_i" (positive integer) associated with it.

C. The total space of your backpack is "S" (positive integer). Unfortunately for you, Jane brought a "magical" Austen backpack, which doesn't have any space constraint.

D. Jane aced 381 last semester, so you can assume that she will play optimally.

Here are the rules for picking the books:

A. The objective for both of you is to maximize the value of books you pick, given the ones you choose fit in your backpack.

B. Both of you will be alternating turns to choose to pick a book.

C. By some luck, you get to start first.

D. A book can only be picked from either ends of the row. Get the instant assignment help.

E. In the situation where you lack sufficient space to fit the book at either end into your backpack, the remaining books are given to Jane.

For this problem,

A. Describe an efficient algorithm that determines the maximum total value of the books that you can achieve with optimal play. Analyze the time and space complexity of your algorithm (You may assume that $S \leq n^2$). \\

Hint 1: Notice that this is a zero-sum game since Jane gets to keep every book that you don't take.

Hint 2: It may be helpful to review the "cakes in a line" problem from PSO. Can you find a way to extend the core ideas by adding more sub-problems? How will you incorporate information about remaining space?

B. Consider a modification of the problem such that the players are allowed to skip their turn as long as we never have two skips in a row (i.e., if you skip a turn then Jane must select a book and vice versa). If you must select a book but lack space then all remaining books are given to Jane. How would you modify your algorithm to accommodate this? Analyze the time and space complexity of your newly modified algorithm.

Reference no: EM133816581

Questions Cloud

Total parenteral nutrition therapy : A client is receiving total parenteral nutrition (TPN) therapy. Which finding should the nurse report to the health care provider?
Discuss the strategies that kodak employed to adapt : Discuss the strategies that Kodak employed to adapt to the changing industry environment, and how effective were these strategies?
Admitted to emergency department with abdominal pain : A client is admitted to the emergency department with abdominal pain. The client's caregiver states the pain began about 12 hours ago.
Shortness of breath and chest pain : A client is hospitalized following a report of dizziness, shortness of breath, and chest pain.
Describe efficient algorithm determines maximum total value : Describe an efficient algorithm that determines the maximum total value of the books that you can achieve with optimal play.
Anatomical parts-diseases and disorders : Consider all of the categories of medical terms you must learn such as anatomical parts, diseases and disorders, diagnostic and therapeutic terms
Lab coat while she performs wound care for patient : Tammy a certified medical assistant is in a rush and doesn't wear gloves or a lab coat while she performs wound care for a patient
Create an essay and project that takes into account research : Create an essay and/or project that takes into account the research you've done into the UCSD student newspapers and your own experiences as a UCSD student.
Does not include additional coursework : Does not include additional coursework Is the same across states.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd