This is not homework; this is for part of a project I thought of starting... will not give details.

There are four groups ( sort of like jobs or colleges ): A, B, C, and D. In the project, there will be many more, but for now let's assume four. People can apply to any number those groups, and the groups can reject or admit them. Person 1 got in to A, B, C, D. Person 2 got into A, B, C, but not D. Person 3 got into A, B, but not C, D. Person 4 got into A, but not B, C, D, E. Obviously, A is **least** selective, followed by B, C, and lastly D. How does a computer figure this out when there are any number of groups, and any number of people who applied to any number of groups?

Thank you in advance.