Linked polyamides bind in the minor groove of double-stranded DNA in a partially sequence-specific manner. This report analyzes the theoretical limits of DNA sequence discrimination by linked polyamides composed of two to four different types of heterocyclic rings, determining (i) the optimal choice of base-binding specificity for each ring and (ii) the optimal design for a polyamide composed of these rings to target a given DNA sequence and designed to maximize the fraction of the total polyamide binding to the specified target sequence relative to all other sequences. The results show that, fortuitously, polyamides composed of pyrrole, a naturally occurring G-excluding element, and imidazole, a rationally designed G-favoring element, have features similar to the theoretical optimum design for polyamides composed of two different rings. The results also show that, in polyamides composed of two or three types of heterocyclic rings, choosing a nonspecific ''placeholder'' ring, which binds equally strongly to each of the four bases, along with one or two base-specific rings will often enhance sequence specificity over a polyamide composed entirely of base-specific rings.