In order to distribute dilute gas into a room with the proper concentration, the gas generator must be controlled appropriately. We determined the optimal source position and generation rate by inverse analysis. The optimization was performed using the SR (Source-Receptor) method, which assumes the linear relationship between the source intensity and the concentration and inversely estimates the source conditions to achieve the objective concentration at target points. In this study, indoor concentration in a classroom was numerically controlled with CFD calculations. The SR method could estimate the optimal location and generation rate of gas generators to approach objective concentration distribution. Optimal source conditions for the class room with a steady flow field was successfully determined. Compared to CFD-only calculations, the SR method significantly reduced the computational cost.