Question

Suppose you’re consulting for a bank that’s concerned about fraud detection, and they come to you...

Suppose you’re consulting for a bank that’s concerned about fraud detection, and they come to you with the following problem. They have a collection of n bank cards that they’ve confiscated, suspecting them of being used in fraud. Each bank card is a small plastic object, containing a magnetic stripe with some encrypted data, and it corresponds to a unique account in the bank. Each account can have many bank cards Exercises 247 corresponding to it, and we’ll say that two bank cards are equivalent if they correspond to the same account. It’s very difficult to read the account number off a bank card directly, but the bank has a high-tech “equivalence tester” that takes two bank cards and, after performing some computations, determines whether they are equivalent. Their question is the following: among the collection of n cards, is there a set of more than n/2 of them that are all equivalent to one another? Assume that the only feasible operations you can do with the cards are to pick two of them and plug them in to the equivalence tester. Show how to decide the answer to their question with only O(n log n) invocations of the equivalence tester.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We have to use the divide and Conquer method to divide the n cards seq S into two groups of n/2 cards each say A & B For both A & B, see if a card is repeated n/4 times.

If no such element in both then no element in S, that repeats more than n/2 term (If S contain an element that occurs more than n/2 times either a must exist or b must exist).

If one of a, b exist, check whether that both occurs if both occurs > n/2 Times in S. If yes then that is the element otherwise answer is no. Time Complexity : T (n) = 2 T (n/2) + O (n) [ To check a, b occur more than n/w times, We require O (n) time} So T(n) = O (n logn).

Add a comment
Know the answer?
Add Answer to:
Suppose you’re consulting for a bank that’s concerned about fraud detection, and they come to you...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT