A treatment of direct simulation Monte Carlo method as a Markov process with a master equation is given and the corresponding master equation is derived. A hierarchy of equations for the reduced probability distributions is derived from the master equation. An equation similar to the Boltzmann equation for single particle probability distribution is derived using assumption of molecular chaos. It is shown that starting from an uncorrelated state, the system remains uncorrelated always in the limit N -> az, where N is the number of particles. Simple applications of the formalism to direct simulation money games are given as examples to the formalism. The formalism is applied to the direct simulation of homogenous gases. It is shown that appropriately normalized single particle probability distribution satisfies the Boltzmann equation for simple gases and Wang Chang-Uhlenbeck equation for a mixture of molecular gases. As a consequence of this development we derive Birds no time counter algorithm. We extend the analysis to the inhomogeneous gases and define a new direct simulation algorithm for this case. We show that single particle probability distribution satisfies the Boltzmann equation in our algorithm in the limit N -> az, V (k) -> 0, Delta t -> 0 where V (k) is the volume of kth cell. We also show that our algorithm and Bird's algorithm approach each other in the limit N (k) -> az where N (k) is the number of particles in the volume V (k) .