  Dynamic allocation of resources to the \emph{best} link in large multiuser
networks offers considerable improvement in spectral efficiency. This gain,
often referred to as \emph{multiuser diversity gain}, can be cast as
double-logarithmic growth of the network throughput with the number of users.
In this paper we consider large cognitive networks granted concurrent spectrum
access with license-holding users. The primary network affords to share its
under-utilized spectrum bands with the secondary users. We assess the optimal
multiuser diversity gain in the cognitive networks by quantifying how the
sum-rate throughput of the network scales with the number of secondary users.
For this purpose we look at the optimal pairing of spectrum bands and secondary
users, which is supervised by a central entity fully aware of the instantaneous
channel conditions, and show that the throughput of the cognitive network
scales double-logarithmically with the number of secondary users ($N$) and
linearly with the number of available spectrum bands ($M$), i.e., $M\log\log
N$. We then propose a \emph{distributed} spectrum allocation scheme, which does
not necessitate a central controller or any information exchange between
different secondary users and still obeys the optimal throughput scaling law.
This scheme requires that \emph{some} secondary transmitter-receiver pairs
exchange $\log M$ information bits among themselves. We also show that the
aggregate amount of information exchange between secondary transmitter-receiver
pairs is {\em asymptotically} equal to $M\log M$. Finally, we show that our
distributed scheme guarantees fairness among the secondary users, meaning that
they are equally likely to get access to an available spectrum band.
