Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Making an Unpaid Intern Sort Things (12 points) An unpaid intern named Carl is tasked with placing a number of Important Chemicals in their

image text in transcribed

1. Making an Unpaid Intern Sort Things (12 points) An unpaid intern named Carl is tasked with placing a number of Important Chemicals in their appropriate containers. The Chemicals are as follows, with abbreviations in parentheses (): \{Slurm (S), Chemical X (X), Kryptonite (K), Bone Hurting Juice (B), Ethereal Tears (E), Mana (M), Catsup of Schrodinger (C), Apple Tea (A), Red Pills (R), Death Soup (D) Being a kindly, yet bumbling and hapless intern, Carl accidentally placed the Important Chemicals in the wrong containers! D'Oh! - The Slurm Can has Mana - The Chemical X Beaker has Ethereal Tears - The Kryptonite Jar has Bone Hurting Juice - The Bone Hurting Juice Bottle has Slurm - The Ethereal Tears Flask has Red Pills - The Mana Vial has Kryptonite - The Catsup of Schrodinger Box has Apple Tea - The Apple Tea Cup has Death Soup - The Red Pill Case has Chemical X - The Death Soup Bowl has Catsup of Schrodinger 1 (Note: Can, Beaker, Jar, Bottle, Flask, Vial, Box, Cup, Case, and Bowl are all types of Containers and are able to contain any of the chemicals, but we still want the chemicals in their correct containers) For every container to safely contain the appropriate Inportant Chemical, Carl must use the Switchinator Machine. The Switchinator Machine can only hold two Containers at a time, and safely switch the contents of each Container one pair at a time. (a) (2 points) What is the minimum number of switches necessary to put all the Important Chemicals in their correct Container if for each use of the Switchinator Machine, Carl can only do one swapping of Important Chemicals between two Containers? (You do not need to show work for this part, as the explanation for this part is in part (b)). (b) (5 points) What is the sequence of switches that would accomplish this? You may use the letter abbreviations provided, and refer to the respective Containers by their specific names (Jar, Flask, Bottle, etc). (c) (5 points) Suppose Carl does a great job and is then tasked with making sure N other Important Chemicals are in their correct Containers, with the Chemicals being assigned to their N Containers randomly. In the worst case scenario, if Carl still had to use the Switchinator Machine, how many switches must Carl perform to guarantee that all N chemicals will be in their correct Containers? Explain your reasoning. (You may assume that each switch Carl places at least one Important Checmical in its correct container)

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions