Multiparty millionaire problem where members only know if they are the richest one I'm looking for a generalisation of Yao's millionaire problem: $N$ parties want to know whether they are the richest one. If they are not, then they just know they are not the richest party - but do not know the identity of the richest one.

Ideally, in case of equality, all richest members would know they are the richest, but would not know if others are as rich.

Does such a protocol already exist?

Edit: obviously when there are only two users, then everyone knows who is the richest. I guess a formalization would be that not-richest people cannot guess who, amongst remaining users, is richest, with probability better than random.

There exist such constructions, for instance assume a FHE scheme which takes the encrypted values as input, and output for each party $p_i$ their result, encrypted with $p_i$'s key. While this should work (it may need some work for the encryption of the inputs but anyway), it is also extremely tedious.
Edit:

As the comment of Mikero correctly points out it is quite easy to make the outputs differ for most MPC protocols (for example in the 2PC case at YAO's protocol, you can tell the evaluator that output key X1 means 0 and output Y1 means 1 while you don't say anything about X2 and Y2 and make the evaluator send X2 and Y2 to the garbler, who knows the meanings of them).

In this case you just need to output 0 or 1 to every party if they are the richest or not.

Old answer:

My best idea to solve the problem is to use YAO's protocol (or any other common MPC protocol), make every party additionally input a random identifier and make the function output the identifier of the richest party. Then the richest party knows being the richest while the other parties don't know who is the richest party.

To avoid the problem that two parties input the same identifier I would think about the following (combining these ideas also makes sense):


Make the identifier large enough so that the likelyhood that two parties input the same identifier is negligible.
Expand the function such that the function outputs a fixed identifier 0 (which must not be chosen by any party) if two parties input the same identifier. If that happened, repeat the MPC computation with another random identifiers.