Experimental data have shown that synapses are heterogeneous: different syn
apses respond with different sequences of amplitudes of postsynaptic respon
ses to the same spike train. Neither the role of synaptic dynamics itself n
or the role of the heterogeneity of synaptic dynamics for computations in n
eural circuits is well understood. We present in this article two computati
onal methods that make it feasible to compute for a given synapse with know
n synaptic parameters the spike train that is optimally fitted to the synap
se in a certain sense. With the help of these methods, one can compute, for
example, the temporal pattern of a spike train (with a given number of spi
kes) that produces the largest sum of postsynaptic responses for a specific
synapse. Several other applications are also discussed. To our surprise, w
e find that most of these optimally fitted spike trains match common firing
patterns of specific types of neurons that are discussed in the literature
. Hence, our analysis provides a possible functional explanation for the ex
perimentally observed regularity in the combination of specific types of sy
napses with specific types of neurons in neural circuits.