We propose a genetic algorithm to solve the pairing optimization problem for subway crew scheduling. Our genetic algorithm employs new crossover and mutation operators specially designed to work with the chromosomes of set-oriented representation. To enhance the efficiency of the search with the newly designed genetic operators, we let a chromosome consist of an expressed part and an unexpressed part. While the genes in both parts evolve, only the genes in the expressed part are used when an individual is evaluated. The purpose of the unexpressed part is to preserve information susceptible to be lost by the application of genetic operators, and thus to maintain the diversity of the search. Experiments with real-world data have shown that our genetic algorithm outperforms other local search methods such as simulated annealing and tabu search.