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

Dr Amy Farrah Fowler is a biologist who is currently studying the sexual behavio

ID: 3706857 • Letter: D

Question

 Dr Amy Farrah Fowler is a biologist who is currently studying the sexual behavior of a rare species of bugs. She assumes that they feature two different genders and that they only interact with bugs of the opposite gender. In her experiment, individual bugs and their interactions were easy to identify, because numbers were printed on their backs.  As the data analyst in Amy's lab, you are given the experiment data which is a list of bug interactions, i.e., a list of pairs such as [(1, 9), (4, 5), (3, 5), (3, 4), ...]. Your job is to devise an algorithm that decides whether the experiment supports Amy's assumption of two genders with no same-sex interaction, or if it contains some bug interactions that falsify it.  In other words, in we find an evidence proving that Amy's assumption is false, return "AMY IS WRONG"; otherwise return "AMY MIGHT BE RIGHT".  Devise an algorithm for this and analyze its runtime. Let N be the number bugs and K be the number of interactions in the data.

Explanation / Answer

Logic: The logic would be that , if (3,5) is an interaction data then if there are cases where both 3 and 5 have interacted with a given same bug . For eg. if datasets like (3,9) and (5,9) both exists then "AMY IS WRONG" because of the following possible cases based on below dataset:

lets take an example dataset = [(3,5),(3,9),(5,9)]

1) if 3 is a female and 5 is male

A) 9 is female

a) (5,9) is present in dataset so a female(9) has interacted with male(5), which is alright but dataset also contains (3,9)

b) Also, (3,9) is present in dataset so a female(9) has interacted with female(3)

As per this example dataset "AMY IS WRONG"   

So , for AMY to be "MIGHT BE RIGHT" if a datapoint (a,b) is present in a dataset then datapoints (a,c) and (b,c) can not be in the same dataset at the same time . If it so, like in the above example dataset "AMY IS WRONG".

You can use language of your own comfort to program this.

Please feel free to reach out for further clarifications. Thanks.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote