Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. (30 pts) Professor Snape has n magical widgets that are supposedly both ident

ID: 3891074 • Letter: 1

Question

1. (30 pts) Professor Snape has n magical widgets that are supposedly both identical and capable of testing each other's correctness. Snape's test apparatus can hold two widgets at a time. When it is loaded, each widget tests the other and reports whether it is good or bad. A good widget always reports accurately whether the other widget is good or bad, but the answer of a bad widget cannot be trusted. Thus, the four possible outcomes of a test are as follows: Widget A says Widget B says Conclusion B is good B is goodA is bad B is bad B is bad both are good, or both are bad at least one is bad at least one is bad at least one is bad A is good A is bad (a) Prove that if n/2 or more widgets are bad, Snape cannot necessarily determine which widgets are good using any strategy based on this kind of pairwise test. Assume a worst-case scenario in which the bad widgets are intelligent and conspire to fool Snape. b) (Divide) Consider the problem of finding a single good widget from among the n widgets, assuming that more than n/2 of the widgets are good. Prove that [n/2] pairwise tests are sufficient to reduce the problem to one of nearly half the size. (c) (And Conquer) Prove that the good widgets can be identified with (n) pairwise tests, assuming that more than n/2 of the widgets are good. Give and solve the recurrence that describes the number of tests.

Explanation / Answer

Answer:-

Don't overlook there are n chips which have functionality to check the other chip. The professor's jig can take an appearance at best 2 chips at a time. A great chip repeatedly pays for the correct result while the horrific chip end result isn't continuously trustable.

• Accept, there are all right excellent chips which repeatedly offer the exact result. As a result, there are n-k bad chips which provide the incorrect result.

• Since it additionally provided that wide variability of terrible chips are added than variability of correct chips (n-ok)>ok.

• Even though horrific chips are loaded with excellent chips in jig, then the bad chips entitlement themselves as excellent chips and say different chips are dreadful. In addition, the coolest chips assert themselves as desirable souls and say other chips are dreadful.

• The realization will always nation that at-least one is dreadful and for that reason the professor won't conclude which chip is right and which chip is bad.

Consequently no method based totally on pairwise test is helpful to decide which chip is correct, if the set of chips consists of horrific chips greater than half of length.