Question: subscripts and ordering

Wondering if anyone can help me with this long winded problem...

 

So... What I have to do is randomly select 6 numbers from the interval [0,1], not hugely important how many decimal places there are but I've used 10.

Ive written some stuff to do this

T := rand(0..1000000000000):

t := proc()
  evalf(T()/1000000000000)
end proc:

C := proc(n)
local S,i:
S := NULL:
  for i from 1 to n do
    S := S, t(i)
  end do
end proc:
 

Then C(6) will select 6 randoms from [0,1].

However, now I have to order then from lowest to highest and assign each one to be one of t1 ... t6 depending on their order in the list (t1 being the lowest value).

 

Then I have to put these ordered t's into the formula max( abs(i/n - ti), abs((i-1)/n - ti) ) and store each of these values in a list.

Then the whole process has to be repeated a set number of times, say 10, so that I have every value obtained in this list.

 

Im not very sure about the subscript bits (i.e. the ti's) and how to label each random variable as a ti.

 

any help on this would be much appreciated.


 

 

Please Wait...