Montreal Problem

Montreal Problem - # L <- NULL for (i in 1:n) {...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#Original Montreal Problem # # JB--1-Ch -2- D -3---- B # | | | # 6 7 4 # | | | # | M | # | | | # | 8 | # | | | # Cy --5- H ------/ # LifeLeft1<-function(n) { #Input the number of repeats.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: # L &lt;- NULL for (i in 1:n) { T &lt;- rexp(9,1/20) L1 &lt;- min(T[1],T[2],T[7]) L2 &lt;- min(T[1],T[5],T[6],T[8]) L3 &lt;- min(T[1],T[2],T[3],T[4],T[8]) L4 &lt;- min(T[1],T[6],T[5],T[4],T[3],T[7]) L5 &lt;- min(T[9],T[2],T[7]) L6 &lt;- min(T[9],T[5],T[6],T[8]) L7 &lt;- min(T[9],T[2],T[3],T[4],T[8]) L8 &lt;- min(T[9],T[6],T[5],T[4],T[3],T[7]) L[i] &lt;- max(L1,L2,L3,L4,L5,L6,L7,L8) } return(L) } data=LifeLeft1(10000) max(data) mean(data) min(data) sd(data)...
View Full Document

Page1 / 3

Montreal Problem - # L &amp;amp;lt;- NULL for (i in 1:n) {...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online