Problem Statement: A famous product photographer Xavier is in high demand and is being approached by various companies to get their products photographed. Xavier does all of this product shoots at his studio and wants to make sure that he maximizes his returns by covering as many photoshoots in a day as possible. For a product shoot to be conducted, the product first has to be staged and then photographed. He has a team who stages the products and he does the photoshoots. Depending on the product, it takes different amounts of time to stage and varied time to complete the shoot. His team can stage another product in another part of the studio while Xavier is busy with a photoshoot of a previously staged product. Assuming that his team can work on only one product at a time before they move to staging another and Xavier also finishes one product photoshoot before moving to the next, you are expected to help Xavier make best use of his team and his time by deciding the order in which the products gets staged and photographed such that they finish the photoshoot of all products as quickly as possible. Requirements: 1. Formulate and effective algorithm using Greedy Method to arrange the product staging and photoshoot in such a way that total time taken for all products is minimized. 2. Analyse the time complexity of your algorithm. 3. Implement the above problem statement using Python 3.7. Sample Input: For example, if there are 6 different products in total the time (in minutes) for staging and photoshoot are mentioned as below: Products: A/B/C/D/E/ F Staging: 20/30/45/60 / 20 / 10 Photo: 30/ 30 / 15 / 20 / 40 / 60 Input should be taken in through a file called "input.txt" which has the fixed format mentioned above using the "/" as a field separator. Sample Output: Product Sequence: F, A, E, B, C, D Total time to complete photoshoot: 205 minutes Idle time for Xavier: 10 minutes. Display the output in output.txt.|

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

8

Problem Statement:
A famous product photographer Xavier is in high demand and is being approached by various
companies to get their products photographed. Xavier does all of this product shoots at his studio and
wants to make sure that he maximizes his returns by covering as many photoshoots in a day as
possible. For a product shoot to be conducted, the product first has to be staged and then
photographed. He has a team who stages the products and he does the photoshoots. Depending on
the product, it takes different amounts of time to stage and varied time to complete the shoot. His team
can stage another product in another part of the studio while Xavier is busy with a photoshoot of a
previously staged product. Assuming that his team can work on only one product at a time before they
move to staging another and Xavier also finishes one product photoshoot before moving to the next,
you are expected to help Xavier make best use of his team and his time by deciding the order in which
the products gets staged and photographed such that they finish the photoshoot of all products as
quickly as possible.
Requirements:
1. Formulate and effective algorithm using Greedy Method to arrange the product staging and
photoshoot in such a way that total time taken for all products is minimized.
2. Analyse the time complexity of your algorithm.
3. Implement the above problem statement using Python 3.7.
Sample Input:
For example, if there are 6 different products in total the time (in minutes) for staging and
photoshoot are mentioned as below:
Products: A / B / C / D / E / F
Staging: 20/30/ 45 / 60 / 20 / 10
Photo: 30/ 30 / 15 / 20 / 40 / 60
Input should be taken in through a file called "input.txt" which has the fixed format mentioned
above using the "/" as a field separator.
Sample Output:
Product Sequence: F, A, E, B, C, D
Total time to complete photoshoot: 205 minutes
Idle time for Xavier: 10 minutes
Display the output in output.txt.|
Transcribed Image Text:Problem Statement: A famous product photographer Xavier is in high demand and is being approached by various companies to get their products photographed. Xavier does all of this product shoots at his studio and wants to make sure that he maximizes his returns by covering as many photoshoots in a day as possible. For a product shoot to be conducted, the product first has to be staged and then photographed. He has a team who stages the products and he does the photoshoots. Depending on the product, it takes different amounts of time to stage and varied time to complete the shoot. His team can stage another product in another part of the studio while Xavier is busy with a photoshoot of a previously staged product. Assuming that his team can work on only one product at a time before they move to staging another and Xavier also finishes one product photoshoot before moving to the next, you are expected to help Xavier make best use of his team and his time by deciding the order in which the products gets staged and photographed such that they finish the photoshoot of all products as quickly as possible. Requirements: 1. Formulate and effective algorithm using Greedy Method to arrange the product staging and photoshoot in such a way that total time taken for all products is minimized. 2. Analyse the time complexity of your algorithm. 3. Implement the above problem statement using Python 3.7. Sample Input: For example, if there are 6 different products in total the time (in minutes) for staging and photoshoot are mentioned as below: Products: A / B / C / D / E / F Staging: 20/30/ 45 / 60 / 20 / 10 Photo: 30/ 30 / 15 / 20 / 40 / 60 Input should be taken in through a file called "input.txt" which has the fixed format mentioned above using the "/" as a field separator. Sample Output: Product Sequence: F, A, E, B, C, D Total time to complete photoshoot: 205 minutes Idle time for Xavier: 10 minutes Display the output in output.txt.|
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Data Modeling Concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education