  We consider a model where agents differ in their `types' which determines
their voluntary contribution towards a public good. We analyze what the
equilibrium composition of groups are under centralized and centralized choice.
We show that there exists a top-down sorting equilibrium i.e. an equilibrium
where there exists a set of prices which leads to groups that can be ordered by
level of types, with the first k types in the group with the highest price and
so on. This exists both under decentralized and centralized choosing. We also
analyze the model with endogenous group size and examine under what conditions
is top-down sorting socially efficient. We illustrate when integration (i.e.
mixing types so that each group's average type if the same) is socially better
than top-down sorting. Finally, we show that top down sorting is efficient even
when groups compete among themselves.
