资源描述:
《simulation solutions 》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、STAT340/CS437PROBLEMSOLUTIONS.1.1.1Thefollowingdatagivesthearrivaltimesandtheservicetimesthateachcustomerwillrequireforthefirst13customersinasingleserverqueue.Onarrivalthecustomereitherentersserviceiftheserverisfreeorjoinsthewaitingline.Whentheservercompletesworkonac
2、ustomer,thenextoneinthequeue(i.e.theonethathasbeenwaitingthelongest)entersservice.ArrivalTimes1231639599154198221304346411455537ServiceTimes40325548185047182854407212(a)Determinethedeparturetimesofthe13customers(b)Repeat(a)whentherearetwoserversandacustomercanbeserv
3、edbyeitherone.(c)Repeat(a)underthenewassumptionthatwhentheservercompletesaser-vice,thenextcustomertoenterserviceisthelasttojointheline-i.e.theonewhohasbeenwaitingtheleasttime.Results:a)52,84,139,187,205,255,302,320,348,402,451,527,549.b)52,63,118,143,136,204,245,239
4、,332,400,451,527,549.c)52,84,139,157,207,254,272,320,348,402,451,527,549.MatlabCode%MatlabcodeforquestionONE%Dataarrival=[1231639599154198221304346411455537];service=[40325548185047182854407212];%%%%%%%%%%%%a)%%%%%%%%%%%%%%%%%%%%%%%departure(1)=arrival(1)+service(1)
5、;fori=2:13ifarrival(i)6、re2(i-1),departure2(i-2))departure2(i)=min(departure2(i-1),departure2(i-2))+service(i);elsedeparture2(i)=arrival(i)+service(i);1endend2.2.6ThecontinuousrandomvariableXhasprobabilitydensityfunctiongivenbyf(x)=cx,01/2].Sincefisaprobabilitydensityfunc
7、tionweneedtofindtheconstantcsothatR1R1f(x)dx=1orcxdx=1givingc=2.Then00Z1121P(X>)=f(x)dx=x
8、1/2=(1−1/4)=3/4.21/23.2.7IfXandYhavejointprobabilitydensityfunctiongivenbyf(x,y)=2exp{−(x+2y),09、