In this study, a gait optimization routine is developed to generate walking patterns which demand the lowest friction forces for implementation. The aim of this research is to fully address the question “which walking pattern demands the lowest coefficient of friction amongst all feasible patterns?”. To this end, first, the kinematic structure of the considered 31 DOF (Degrees of Freedom) humanoid robot is investigated and a closed-form dynamics model for its lower-body is developed. Then, the medium through which the walking pattern generation is conducted is presented. In this medium, after designing trajectories for the feet and the pelvis, the joint space variables are obtained, using the inverse kinematics. Finally, by employing a genetic algorithm (GA), an optimization process is conducted to generate walking patterns with the minimum Required Coefficient Of Friction (RCOF). Six parameters are adopted to parameterize the pelvis trajectory and are exploited as the design variables in this optimization procedure. Also, a parametrical study is accomplished to address the effects of some other variables on RCOF. For comparison purposes, a tip-over Stability Margin (SM) is defined, and an optimization procedure is conducted to maximize this margin. Finally, the proposed gait planning procedure is implemented on SURENA III, a humanoid robot designed and fabricated in CAST, to validate the developed simulation procedure. The obtained results reveal merits of the proposed optimal gait planning procedure in terms of RCOF.