<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="m10819">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The M/G/1 Queue</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.3</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2002/08/19</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2002/11/04</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="bs">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Bart</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Sinclair</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">bs@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="charlet">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Charlet</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Reedstrom</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">charlet@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="bs">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Bart</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Sinclair</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">bs@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">FCFS scheduling</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Little's theorem</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">M/G/1 queue</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">M/G/1 queue with vacations</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Pollaczek-Khinchin mean value formulae</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">residual service time</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">server vacations</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">(Blank Abstract)</md:abstract>
</metadata>


  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="queue">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The M/G/1 Queue</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para1">
	The M/G/1 queue has exponentially distributed interarrival
	times and an arbitrary distribution for service times.  The
	increase in generality compared to the M/M/1 queue comes with
	a price: the M/G/1 queue does not have a general, closed form
	distribution for the number of jobs in the queue in steady
	state.  It does, however, admit a general solution for the
	<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">average</emphasis> number of jobs in the queue, and
	application of Little's Theorem provides the corresponding
	result for the average time spent in the queue.  Collectively,
	these results are known as the <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Pollaczek-Khinchin</term>
	mean value formulae.
      </para>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para2">
	The following derivation of the Pollaczek-Khinchin mean value
	formulae for the M/G/1 queue assumes FCFS scheduling, to
	simplify the analysis.  However, the formulae are valid for
	any scheduling discipline in which
	<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="paralist">
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    the server is busy if the queue is non-empty,
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    no job departs the queue before completing service, and
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    the order of service is not dependent on knowledge about
	    job service times.
	  </item>
	</list>
      </para>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para3">
	We begin by recalling or defining the following notation.  Job
	<m:math><m:ci>i</m:ci></m:math> refers to the
	<m:math><m:ci>i</m:ci></m:math>th job to arrive at the queue.
	As usual, we assume that a steady state solution exists; i.e.,
	the arrival rate is less than the service rate.
	<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para2list">
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>X</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    - r.v. for service time of job
              <m:math><m:ci>i</m:ci></m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci>X</m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:apply>
		    <m:power/>
		    <m:ci>X</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:apply>
		    <m:power/>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    - r.v. for time job <m:math><m:ci>i</m:ci></m:math> spends
              waiting in queue before beginning service
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:ci><m:msub>
		      <m:mi>W</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci>W</m:ci>
		<m:apply>
		  <m:limit/>
		  <m:bvar><m:ci>i</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:infinity/>
		  </m:lowlimit>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>W</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>N</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    - r.v. for number of jobs in the queue when job 
              <m:math><m:ci>i</m:ci></m:math> arrives
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>N</m:mi>
		      <m:mi>i</m:mi>
		</m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:ci><m:msub>
		      <m:mi>N</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci><m:msub>
		    <m:mi>N</m:mi>
		    <m:mi>Q</m:mi>
		  </m:msub></m:ci>
		<m:apply>
		  <m:limit/>
		  <m:bvar><m:ci>i</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:infinity/>
		  </m:lowlimit>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>N</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>R</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    - r.v. for residual service time seen by job 
              <m:math><m:ci>i</m:ci></m:math> (the amount of time job
              <m:math><m:ci>i</m:ci></m:math> must wait until a job in
              service when <m:math><m:ci>i</m:ci></m:math> arrives is
              completed)
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>R</m:mi>
		      <m:mi>i</m:mi>
		</m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:ci><m:msub>
		      <m:mi>R</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci>R</m:ci>
		<m:apply>
		  <m:limit/>
		  <m:bvar><m:ci>i</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:infinity/>
		  </m:lowlimit>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math><m:ci>λ</m:ci></m:math> - job arrival rate
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci>ρ</m:ci>
		<m:apply>
		  <m:times/>
		  <m:ci>λ</m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:ci>X</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math> - server utilization
	  </item>
	</list>
	When a job arrives at the queue, it must wait for the job in
	service (if there is one) to complete.  Since we are assuming
	FCFS scheduling, it must also wait for all of the jobs which
	arrived before it but which have not begun service to
	complete.
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci><m:msub>
		<m:mi>W</m:mi>
		<m:mi>i</m:mi>
	      </m:msub></m:ci>
	    <m:apply>
	      <m:plus/>
	      <m:ci><m:msub>
		  <m:mi>R</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>j</m:ci></m:bvar>
		<m:lowlimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>i</m:ci>
		    <m:ci><m:msub>
			<m:mi>N</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:lowlimit>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		      <m:ci>i</m:ci>
		      <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:ci><m:msub>
		    <m:mi>X</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>

	<m:math>
	  <m:ci><m:msub> 
	      <m:mi>R</m:mi> 
	      <m:mi>i</m:mi>
	    </m:msub></m:ci> 
	</m:math> will be 0 if the job arrives
	      when the queue is empty.  Taking expectations,

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:ci><m:msub>
		  <m:mi>W</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>R</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>j</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:apply>
		      <m:minus/>
		      <m:ci>i</m:ci>
		      <m:ci><m:msub>
			  <m:mi>N</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:lowlimit>
		  <m:uplimit>
		    <m:apply>
		      <m:minus/>
			<m:ci>i</m:ci>
			<m:cn>1</m:cn>
		    </m:apply>
		  </m:uplimit>
		  <m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		    <m:condition>
		      <m:ci><m:msub>
			  <m:mi>N</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		    </m:condition>
		    <m:ci><m:msub>
			<m:mi>X</m:mi>
			<m:mi>j</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:mean/>
		<m:ci><m:msub>
		    <m:mi>R</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:mean/>
		  <m:ci>X</m:ci>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>N</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	This last step is valid because the number of jobs that are in
	the queue at an arrival instant must be independent of the
	service times of jobs that have not been serviced yet.  We can
	take 
	<m:math>
	  <m:ci><m:munder>
	      <m:mi>lim</m:mi>
	      <m:mrow>
		<m:mi>i</m:mi>
		<m:mo>→</m:mo>
		<m:mi>∞</m:mi>
	      </m:mrow>
	    </m:munder></m:ci>
	</m:math> of both sides of this equation to obtain

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>W</m:ci>
	    <m:apply>
	      <m:plus/>
	      <m:ci>R</m:ci>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:mean/>
		  <m:ci>X</m:ci>
		</m:apply>
		<m:ci><m:msub>
		    <m:mi>N</m:mi>
		    <m:mi>Q</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	From Little's Theorem,
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci><m:msub>
		<m:mi>N</m:mi>
		<m:mi>Q</m:mi>
	      </m:msub></m:ci>
	    <m:apply>
	      <m:times/>
	      <m:ci>λ</m:ci>
	      <m:ci>W</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	Substituting this into the expression for
	<m:math><m:ci>W</m:ci></m:math> gives

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>W</m:ci>
	    <m:apply>
	      <m:plus/>
	      <m:ci>R</m:ci>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:mean/>
		  <m:ci>X</m:ci>
		</m:apply>
		<m:ci>λ</m:ci>
		<m:ci>W</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:plus/>
	      <m:ci>R</m:ci>
	      <m:apply>
		<m:times/>
		<m:ci>ρ</m:ci>
		<m:ci>W</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:divide/>
	      <m:ci>R</m:ci>
	      <m:apply>
		<m:minus/>
		<m:cn>1</m:cn>
		<m:ci>ρ</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	To determine <m:math><m:ci>R</m:ci></m:math>, we could make
	use of a well-known result which relates the principal moments
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:apply>
		<m:power/>
		<m:ci><m:msub>
		    <m:mi>R</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
	      <m:apply>
		<m:power/>
		<m:ci><m:msub>
		    <m:mi>R</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math> of the residual time r.v. to the moments
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:apply>
		<m:power/>
		<m:ci><m:msub>
		    <m:mi>X</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
	      <m:apply>
		<m:power/>
		<m:ci><m:msub>
		    <m:mi>X</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math> of the service time r.v.:
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:mean/>
	      <m:apply>
		<m:power/>
		<m:ci><m:msub>
		    <m:mi>R</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:mean/>
		<m:apply>
		  <m:power/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		  <m:apply>
		    <m:plus/>
		    <m:ci>n</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:plus/>
		  <m:ci>n</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>X</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para4">
	However, we can also find <m:math><m:ci>R</m:ci></m:math>
	directly by looking at a plot of the residual service time
	r.v. as a function of <m:math><m:ci>t</m:ci></m:math>.  Define
	the following functions:
	<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fnlist">
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:ci type="fn">r</m:ci>
		<m:ci>τ</m:ci>
	      </m:apply>
	    </m:math> - the residual service time of the customer in
	    service at time <m:math><m:ci>τ</m:ci></m:math> (this
	    will be 0 if no customer is in service)
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:ci type="fn">M</m:ci>
		<m:ci>t</m:ci>
	      </m:apply>
	    </m:math> - the number of service completions in the
	    interval
	    <m:math>
	      <m:interval>
		<m:cn>0</m:cn>
		<m:ci>t</m:ci>
	      </m:interval>
	    </m:math>; we are interested only in
	    <m:math><m:ci>t</m:ci></m:math> such that
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:ci type="fn">r</m:ci>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:cn>0</m:cn>
	      </m:apply>
	    </m:math>.
	  </item>
	</list>
	The <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig1" strength="5">figure below</cnxn>
	illustrates how the residual service time changes over time.
	When a job <m:math><m:ci>i</m:ci></m:math> begins service, its
	residual service time starts at
	<m:math>
	  <m:ci><m:msub>
	      <m:mi>X</m:mi>
	      <m:mi>i</m:mi>
	    </m:msub></m:ci>
	</m:math>
	and falls linearly (with slope -1) to 0.
      </para>

      <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fig1">
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="MG1_queue1.png"/>
      </figure>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para5">
	The time average of
	<m:math>
	  <m:apply>
	    <m:ci type="fn">r</m:ci>
	    <m:ci>τ</m:ci>
	  </m:apply>
	</m:math> in the interval
	<m:math>
	  <m:interval>
	    <m:cn>0</m:cn>
	    <m:ci>t</m:ci>
	  </m:interval>
	</m:math> is given by

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eqn1">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:apply>
		  <m:int/>
		  <m:bvar><m:ci>τ</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:uplimit><m:ci>t</m:ci></m:uplimit>
		  <m:apply>
		    <m:ci type="fn">r</m:ci>
		    <m:ci>τ</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:apply>
		  <m:sum/>
		  <m:bvar><m:ci>i</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:cn>1</m:cn>
		  </m:lowlimit>
		  <m:uplimit>
		    <m:apply>
		      <m:ci type="fn">M</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		  </m:uplimit>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:power/>
		      <m:ci><m:msub>
			  <m:mi>X</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:ci type="fn">M</m:ci>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>i</m:ci></m:bvar>
		    <m:lowlimit>
		      <m:cn>1</m:cn>
		    </m:lowlimit>
		    <m:uplimit>
		      <m:apply>
			<m:ci type="fn">M</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		    </m:uplimit>
		    <m:apply>
		      <m:power/>
		      <m:ci><m:msub>
			  <m:mi>X</m:mi>
			  <m:mi>i</m:mi>
			</m:msub></m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:ci type="fn">M</m:ci>
		    <m:ci>t</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>

	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eqn2">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:limit/>
		<m:bvar><m:ci>t</m:ci></m:bvar>
		<m:lowlimit>
		  <m:infinity/>
		</m:lowlimit>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:int/>
		    <m:bvar><m:ci>τ</m:ci></m:bvar>
		    <m:lowlimit>
		      <m:cn>0</m:cn>
		    </m:lowlimit>
		    <m:uplimit><m:ci>t</m:ci></m:uplimit>
		    <m:apply>
		      <m:ci type="fn">r</m:ci>
		      <m:ci>τ</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:cn>2</m:cn>
		</m:apply>
		<m:apply>
		  <m:limit/>
		  <m:bvar><m:ci>t</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:infinity/>
		  </m:lowlimit>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:ci type="fn">M</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>t</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:limit/>
		  <m:bvar><m:ci>t</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:infinity/>
		  </m:lowlimit>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:sum/>
		      <m:bvar><m:ci>i</m:ci></m:bvar>
		      <m:lowlimit>
			<m:cn>1</m:cn>
		      </m:lowlimit>
		      <m:uplimit>
			<m:apply>
			  <m:ci type="fn">M</m:ci>
			  <m:ci>t</m:ci>
			</m:apply>
		      </m:uplimit>
		      <m:apply>
			<m:power/>
			<m:ci><m:msub>
			    <m:mi>X</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn">M</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
	These are time averages; however, the ensemble averages (means
	of the steady state distributions) and time averages are
	equal, giving us
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>R</m:ci>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:times/>
		<m:ci>λ</m:ci>
		<m:apply>
		  <m:mean/>
		  <m:apply>
		    <m:power/>
		    <m:ci>X</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:cn>2</m:cn>
	    </m:apply>
	  </m:apply>
	</m:math>
	Consequently,
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>W</m:ci>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:times/>
		<m:ci>λ</m:ci>
		<m:apply>
		  <m:mean/>
		  <m:apply>
		    <m:power/>
		    <m:ci>X</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:times/>
		<m:cn>2</m:cn>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci>ρ</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
    </section>

    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="vacations">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The M/G/1 Queue with Vacations</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="vacpara1">
	One important variation on the M/G/1 queue is to allow the
	server to take <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">vacations</term> - i.e., to be idle when
	there is work to be done.  The server goes idle at the end of
	each busy period (when the queue becomes empty), and remains
	idle for some random amount of time.  If the queue is still
	empty at the end of a vacation time, the server immediately
	starts another vacation; otherwise, the server begins a job
	service time.
      </para>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="vacpara2">
	The analysis proceeds as for the M/G/1 queue, up to the point
	at which we find an expression for the average waiting time:
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>W</m:ci>
	    <m:apply>
	      <m:divide/>
	      <m:ci>R</m:ci>
	      <m:apply>
		<m:minus/>
		<m:cn>1</m:cn>
		<m:ci>ρ</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	except that we must define <m:math><m:ci>R</m:ci></m:math> to
	be the mean residual service or vacation time, since a job
	might arrive during another job's service time or during a
	server vacation, and it will be delayed until the completion
	of either.  Define
	<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="vacationlist">
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:ci><m:msub>
		  <m:mi>V</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	    </m:math>
	    - r.v. for the length of vacation
              <m:math><m:ci>i</m:ci></m:math>  
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:apply>
		  <m:mean/>
		  <m:ci><m:msub>
		      <m:mi>V</m:mi>
		      <m:mi>i</m:mi>
		</m:msub></m:ci>
		</m:apply>
		<m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:ci><m:msub>
		      <m:mi>V</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci>V</m:ci>
		<m:apply>
		  <m:limit/>
		  <m:bvar><m:ci>i</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:infinity/>
		  </m:lowlimit>
		  <m:apply>
		    <m:mean/>
		    <m:ci><m:msub>
			<m:mi>V</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <m:math>
	      <m:apply>
		<m:ci type="fn">L</m:ci>
		<m:ci>t</m:ci>
	      </m:apply>
	    </m:math> - the number of vacations completed in the
	    interval 
	    <m:math>
	      <m:interval>
		<m:cn>0</m:cn>
		<m:ci>t</m:ci>
	      </m:interval>
	    </m:math>
	  </item>
	</list>
	Assume that vacation times are independent and identically
	distributed, and are independent of job interarrival and
	service times.
      </para>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="vacpara3">
	We will be interested in looking at the system only at some
	time <m:math><m:ci>t</m:ci></m:math> corresponding to the
	completion of a service or a vacation.  In the <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig2" strength="5">figure below</cnxn>, darker
	triangles are service times and lighter ones are vacations.
      </para>

      <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fig2">
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="MG1_queue2.png"/>
      </figure>

      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="vacpara4">
	Proceeding as before:
	<equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eqn4">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:divide/>
		  <m:cn>1</m:cn>
		  <m:ci>t</m:ci>
		</m:apply>
		<m:apply>
		  <m:int/>
		  <m:bvar><m:ci>τ</m:ci></m:bvar>
		  <m:lowlimit>
		    <m:cn>0</m:cn>
		  </m:lowlimit>
		  <m:uplimit><m:ci>t</m:ci></m:uplimit>
		  <m:apply>
		    <m:ci type="fn">r</m:ci>
		    <m:ci>τ</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>i</m:ci></m:bvar>
		    <m:lowlimit>
		      <m:cn>1</m:cn>
		    </m:lowlimit>
		    <m:uplimit>
		      <m:apply>
			<m:ci type="fn">M</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		    </m:uplimit>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:power/>
			<m:ci><m:msub>
			    <m:mi>X</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:sum/>
		    <m:bvar><m:ci>i</m:ci></m:bvar>
		    <m:lowlimit>
		      <m:cn>1</m:cn>
		    </m:lowlimit>
		    <m:uplimit>
		      <m:apply>
			<m:ci type="fn">L</m:ci>
			<m:ci>t</m:ci>
		      </m:apply>
		    </m:uplimit>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:power/>
			<m:ci><m:msub>
			    <m:mi>V</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>

	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>1</m:cn>
		    <m:cn>2</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:ci type="fn">M</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:sum/>
		      <m:bvar><m:ci>i</m:ci></m:bvar>
		      <m:lowlimit>
			<m:cn>1</m:cn>
		      </m:lowlimit>
		      <m:uplimit>
			<m:apply>
			  <m:ci type="fn">M</m:ci>
			  <m:ci>t</m:ci>
			</m:apply>
		      </m:uplimit>
		      <m:apply>
			<m:power/>
			<m:ci><m:msub>
			    <m:mi>X</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn">M</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:divide/>
		    <m:cn>1</m:cn>
		    <m:cn>2</m:cn>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:ci type="fn">L</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		    <m:ci>t</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:divide/>
		    <m:apply>
		      <m:sum/>
		      <m:bvar><m:ci>i</m:ci></m:bvar>
		      <m:lowlimit>
			<m:cn>1</m:cn>
		      </m:lowlimit>
		      <m:uplimit>
			<m:apply>
			  <m:ci type="fn">L</m:ci>
			  <m:ci>t</m:ci>
			</m:apply>
		      </m:uplimit>
		      <m:apply>
			<m:power/>
			<m:ci><m:msub>
			    <m:mi>V</m:mi>
			    <m:mi>i</m:mi>
			  </m:msub></m:ci>
			<m:cn>2</m:cn>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:ci type="fn">L</m:ci>
		      <m:ci>t</m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</equation>
	Since
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:divide/>
	      <m:apply>
		<m:times/>
		<m:ci>t</m:ci>
		<m:apply>
		  <m:minus/>
		  <m:cn>1</m:cn>
		  <m:ci>ρ</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">L</m:ci>
		<m:ci>t</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:apply>
	      <m:mean/>
	      <m:ci>V</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	we can take the limit as <m:math><m:ci>t</m:ci></m:math>
	approaches <m:math><m:infinity/></m:math> of the average
	residual service time and use the equality of time and
	ensemble averages to obtain
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>R</m:ci>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:ci>λ</m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:apply>
		      <m:power/>
		      <m:ci>X</m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:cn>2</m:cn>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci>ρ</m:ci>
		  </m:apply>
		  <m:apply>
		    <m:mean/>
		    <m:apply>
		      <m:power/>
		      <m:ci>V</m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:apply>
		    <m:mean/>
		    <m:ci>V</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	Substituting this into the expression for the average waiting
	time gives us

	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>W</m:ci>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:times/>
		  <m:ci>λ</m:ci>
		  <m:apply>
		    <m:mean/>
		    <m:apply>
		      <m:power/>
		      <m:ci>X</m:ci>
		      <m:cn>2</m:cn>
		    </m:apply>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:apply>
		    <m:minus/>
		    <m:cn>1</m:cn>
		    <m:ci>ρ</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:divide/>
		<m:apply>
		  <m:mean/>
		  <m:apply>
		    <m:power/>
		    <m:ci>V</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:apply>
		    <m:mean/>
		    <m:ci>V</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
      </para>
    </section>
  </content>
  
</document>
