# What is a protocol for determining which of two numbers is larger, without sharing those numbers?

Situation: Alice has selected a positive integer $a$, and Bob has selected a positive integer $b$. Alice and Bob want to know whether $a > b$, $a = b$, or $a < b$, but neither wishes to reveal their chosen number to the other party.

How can Alice and Bob make this determination?

• Bidding? This smells of auctions. – John Dvorak Nov 14 '13 at 5:22
• Just a pointer to an answer at the moment, the problem is called "Yao's Millionaire's Problem" for which there is a protocol. – Luke Mathieson Nov 14 '13 at 5:40
• @LukeMathieson Ah, that's great, thanks! I'd seen this somewhere before and couldn't remember what the problem was called. – senshin Nov 14 '13 at 5:42
• @LukeMathieson expand it to an answer ? – Subhayan Nov 14 '13 at 14:44