The study of any population of large size and high diversity is limited by the lack of data and associated insights. For a pool of individuals, each associated with a unique characteristic feature, as the pool size grows, the possible interactions increase exponentially, quickly beyond the scope of computation, not to mention experimental manipulation and analysis. Herein, we report a facile RT-PCR-based method, to correlate the amplification curves with various DNA libraries of defined diversity, and perform operations with groups of quaternary numbers as input and diversity as output. An attractive feature of this approach is the possibility of realizing parallel computation with an eventually unlimited number of variables. We demonstrate that DNA libraries can be used to model heterogeneous populations, exhibiting functions such as self-protection, subjected to biased expansion, and to evolve into complex structures. Moreover, the method can be applied to drug discovery using DNA-encoded chemical library (DECL) technology, to optimize selection conditions for identifying potent and specific bio-molecular interactions.