  Natural protein sequences that self-assemble to form globular structures are
compact with high packing densities in the folded states. It is known that
proteins unfold upon addition of denaturants, adopting random coil structures.
The dependence of the radii of gyration on protein size in the folded and
unfolded states obeys the same scaling laws as synthetic polymers. Thus, one
might surmise that the mechanism of collapse in proteins and polymers ought to
be similar. However, because the number of amino acids in single domain
proteins is not significantly greater than about two hundred, it has not been
resolved if the unfolded states of proteins are compact under conditions that
favor the folded states - a problem at the heart of how proteins fold. By
adopting a theory used to derive polymer-scaling laws, we find that the
propensity for the unfolded state of a protein to be compact is universal and
is encoded in the contact map of the folded state. Remarkably, analysis of over
2000 proteins shows that proteins rich in $\beta$-sheets have greater tendency
to be compact than $\alpha$-helical proteins. The theory provides insights into
the reasons for the small size of single domain proteins and the physical basis
for the origin of multi-domain proteins. Application to non-coding RNA
molecules show that they have evolved to collapse sharing similarities to
$\beta$-sheet proteins. An implication of our theory is that the evolution of
natural foldable sequences is guided by the requirement that for efficient
folding they should populate minimum energy compact states under folding
conditions. This concept also supports the compaction selection hypothesis used
to rationalize the unusually condensed states of viral RNA molecules.
