This is a dissertation presented to the faculty of department of mathematics, Brandeis University, in partial fulfillment of the requirements for the degree Doctor of Philosophy. In this thesis, we apply the stack sorting operator to r-permutations and construct the functional equation for the generating function of two-stack-sortable permutations counted by descents by using a factorization similar to Zeilberger's. We solve the functional equation and give explicit formulas for the number of two-stack-sortable permutations.