Many queues can be modeled as discrete-time Markov chains. Here, the state is the length of the queue, and fluctuations in arrivals and service give the random evolution from one time period to the next. Here is a diagram of a queue.

Figure: arrivals occur from the left and are stored in a buffer. Jobs or customers are represented as rectangles. A server is represented by a circle, which processes the jobs, and they then depart on the right-hand side.
Here is a simple discrete-time model. Suppose that at each time step there is probability of one arrival and no departure, and, if the queue is not empty, probability
of one departure and no arrival. Otherwise, the queue remains unchanged at the next time step.
The transition probabilities of this Markov chain are as follows:
Another way to represent the Markov chain is as follows.

Figure: the different states are drawn as circles, and arrows connect the non-trivial transitions.
Here are a couple of simple questions that we will answer:
- Will the queue always empty?
- Does the queue stay bounded?
- If it does, how long does it spend in each state?
You can probably guess part of the answer: clearly, if , then the queue is more likely to increase than decrease. So we do not expect the queue to stay bounded. However, if
, we should expect the queue to empty frequently. We now work towards formalizing this, although for brevity we will not provide many proofs.