The synthesis problem for optimal control systems in the class of discrete controls is under consideration. The problem is investigated by reducing to a linear programming (LP) problem with consequent use of a dynamic version of the adaptive method of LP. Both perfect and imperfect information on behavior of control system cases are studied. Algorithms for the optimal controller, optimal estimators are described. Results are illustrated by examples.