For analyzing properties of complex systems, a mathematical model for these systems is useful. In this paper we describe how discrete complex systems call be modeled mathematically and we give a framework for the analysis of the system with respect to the properties autonomy and emergence, which are. two of the most important properties of self-organizing systems. The modeling is done by using a multigraph to describe the connections between objects and stochastic automatons for the behavior of the objects.