Consider a single-server queue with Poisson arrivals and exponential service times having the following variation: Whenever a service is completed a departure occurs only with probability $\alpha .$ With probability $1-\alpha$ the customer, instead of leaving, joins the end of the queue. Note that a customer may be serviced more than once.
(a) Set up the balance equations and solve for the steady-state probabilities, stating conditions for it to exist.
(b) Find the expected waiting time of a customer from the time he arrives until he enters service for the first time.
(c) What is the probability that a customer enters service exactly $n$ times, $n=$ $1,2, \ldots ?$
(d) What is the expected amount of time that a customer spends in service (which does not include the time he spends waiting in line)?
Hint: Use part (c).
(e) What is the distribution of the total length of time a customer spends being served?
Hint: Is it memoryless?