Abstract
In mammals, the immune system recognizes and combats pathogens while retaining a memory of prior encounters. In the thymus, naïve T cells capable of recognizing specific antigens are generated through random gene rearrangement, ensuring a diverse immune repertoire. However, the production rate of naïve T cells declines with age, typically following an exponential or power-law function-a phenomenon known as thymic involution, which is often regarded as a deterioration of biological function (immunosenescence). In this paper, we propose a novel theory suggesting that thymic involution may represent an adaptive strategy. As individuals age, repeated exposure to diverse pathogens leads to the accumulation of memory T cells, thereby reducing the need for newly generated naïve T cells to combat infections. Moreover, naïve T cells can persist in the periphery and retain the capacity to initiate immune responses against novel antigens. Using Pontryagin's Maximum Principle, we calculate the optimal schedule of naïve T cell production. The results show that the production rate peaks during a brief period shortly after birth, followed by an exponential decline throughout life, eventually reaching a phase in which naïve T cell production ceases. If peripheral naïve T cells decay very slowly, the optimal strategy may consist of producing all cohorts at birth, with no subsequent production.