All cells must detect and respond to changes in their environment, often through changes in gene expression. The yeast pheromone pathway has been extensively characterized and is an ideal system for studying transcriptional regulation. Here we combine computational and experimental approaches to study transcriptional regulation mediated by Ste12, the key transcription factor in the pheromone response. Our mathematical model is able to explain multiple counter-intuitive experimental results and led to several novel findings. For example, we found that the transcriptional repressors Dig1 and Dig2 positively affect transcription by stabilizing Ste12 and that this allows the transcriptional response to act on a different time scale than upstream pathway activity. We further test transcriptional regulation by exposing cells to pheromone concentrations that vary periodically in time and sweeping the frequency of the signal. Such a strategy is often used in engineering to characterize electric circuits. Using this tool we found that transcription persisted for ~40min after the pheromone was off. To investigate the sources of memory, I developed an Euler solver that made use of the parallel nature of graphics processer units (GPU) to speed up model simulations by 3-4 orders of magnitude. This speedup made it possible to systematically search the parameter space of competing models of memory, fully characterizing their behavior. Using this tool we learned that the observed memory was due to both positive feedback and a slow deactivation step. We also validate our model by making specific predictions and testing them experimentally.