Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please provide complete answer of each part and follow every step please This question can be attempted in groups. There are n samples that need
Please provide complete answer of each part and follow every step please
This question can be attempted in groups. There are n samples that need to be tested for coronavirus. The testing process (known as PCR) involves using a special machine, testing one sample at a time, which is both time- consuming and expensive. Thus, we would like to have a method that is better than the trivial method of testing each sample one by one sequentially. Fortunately this is possible because we expect most samples to return a negative result (not containing the virus), and so we can 'combine multiple samples to be tested together. For example, we can take one drop from each of the samples 1, 2, 3 to form a new sample, and test this mixed sample. If it returns a negative result, then all samples 1, 2, 3 are negative. But if it returns a positive result, we only know some of them contain the virus and not which one(s), or indeed how many of them, contain the virus, and further tests are needed. Assume each individual sample contains sufficient contents so many drops can be taken from each of them, and that if a sample contains the virus, any drop taken from it will contain the virus. (a) Suppose we know that eractly one of the n samples contains the virus. Design an algorithm for identifying it that takes O(log n) tests. [20 marks] (b) Suppose instead we know that at most one of the n samples contains the virus. Design an algorithm for identifying the positive sample (or determine that there are none) using as few tests as you can. [20 marks (C) Suppose instead we know that at most two of the n samples contain the virus. Repeat (b). [25 marks] In each part, you should: (D). 25 marks In each part, you should: state the algorithm in pseudocode; explain (in words) some intuition behind your algorithm, and/or why it correctly identifies the positive samples: explain mathematically (eg. via solving a recurrence formula) the number of tests taken by your algorithm; explain whether you think your algorithm is optimal by proving as good a lower bound as you can. You can assume n is some "nice" number such as powers of 2; state your assumptions. (You can have different assumptions in each part if you want.) This question can be attempted in groups. There are n samples that need to be tested for coronavirus. The testing process (known as PCR) involves using a special machine, testing one sample at a time, which is both time- consuming and expensive. Thus, we would like to have a method that is better than the trivial method of testing each sample one by one sequentially. Fortunately this is possible because we expect most samples to return a negative result (not containing the virus), and so we can 'combine multiple samples to be tested together. For example, we can take one drop from each of the samples 1, 2, 3 to form a new sample, and test this mixed sample. If it returns a negative result, then all samples 1, 2, 3 are negative. But if it returns a positive result, we only know some of them contain the virus and not which one(s), or indeed how many of them, contain the virus, and further tests are needed. Assume each individual sample contains sufficient contents so many drops can be taken from each of them, and that if a sample contains the virus, any drop taken from it will contain the virus. (a) Suppose we know that eractly one of the n samples contains the virus. Design an algorithm for identifying it that takes O(log n) tests. [20 marks] (b) Suppose instead we know that at most one of the n samples contains the virus. Design an algorithm for identifying the positive sample (or determine that there are none) using as few tests as you can. [20 marks (C) Suppose instead we know that at most two of the n samples contain the virus. Repeat (b). [25 marks] In each part, you should: (D). 25 marks In each part, you should: state the algorithm in pseudocode; explain (in words) some intuition behind your algorithm, and/or why it correctly identifies the positive samples: explain mathematically (eg. via solving a recurrence formula) the number of tests taken by your algorithm; explain whether you think your algorithm is optimal by proving as good a lower bound as you can. You can assume n is some "nice" number such as powers of 2; state your assumptions. (You can have different assumptions in each part if you want.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started