Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Give an algorithm with running time O(m+n) that determines whether m judgements are consistent Inspired by the example of that great Cornellian, Vladimir Nabokov, some

Give an algorithm with running time O(m+n) that determines whether m judgements are consistent image text in transcribed
Inspired by the example of that great Cornellian, Vladimir Nabokov, some of your friends have become amateur lepidopterists (they study butterflies). Often when they return from a trip with specimens of butterflies, it is very difficult for them to tell how many distinct species they've caught-thanks to the fact that many species look very similar to one another One day they return with n butterflies, and they believe that each belongs to one of two different species, which we'll call A and B for purposes of this discussion. They'd like to divide the n specimens into two groups-those that belong to A and those that belong to B-but it's very hard for them to directly label any one specimen. So they decide to adopt the following approach. For each pair of specimens i and j, they study them carefully side by side. If they're confident enough in their judgment, then they label the pair (i. ) either "same" (meaning they believe them both to come from the same species) or "different" (meaning they believe them to come from different species). They also have the option of rendering no judgment on a given pair, in which case we'll call the pair ambiguous. So now theyhave the collection of n specimens, as well as a collection of m judgments (either same" or "different") for the pairs that were not declared to be ambiguous. They'd like to know if this data is consistent with the idea that each butterfly is from one of species A or B. So more concretely, we'll declare the m judgments to be consistent if it is possible to label each specimen either A or B in such a way that for each pair (i. /) labeled "same," it is the case that i and j have the same label; and for each pair (i, /) labeled "different," it is the case that i and j have different labels. They're in the middle of tediously working out whether their judgments are consistent when one of them realizes that you probably have an algorithm that would answer this question right away Give an algorithm with running time O(m + n) that determines whether the m judgments are consistent

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

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

=+ 4. Why should policymakers think about incentives?

Answered: 1 week ago

Question

=+ 2. What is the opportunity cost of seeing a movie?

Answered: 1 week ago

Question

=+ what roles should government play in them ?

Answered: 1 week ago