View Single Post
Old 05-01-2007, 11:53 PM   #4 (permalink)
Michael12
Recruit
 
Join Date: May 2007
Posts: 2
Michael12 is on a distinguished road
Well, I have this problem. I want to generate a pseudo-random array. The array consist of digits {2,3,5,6}. The probability apperance of digit 2 in this array is 0.25=25%. The probability apperance of digit 3 in this array is 0.25=25%, the probability apperance of digit 5 in this array is 0.25=25%,and probability of aopperance digit 6 in this array is 0.25=25%. When I created this random array, I want to know a score of digits 2 in this array, a score of digits 3 in this array, a score of digits 5 in this array, a score of digits 6 in this array. Also, in this pseudo-random array, I want to know score of apperance two digits 2 jointly. Also, I want to know a score of apperance two digits 3 jointly. Also,I want to know a score of apperance two digits 5 jointly. Also,I want to know a score of apperance two digits 6 jointly.

For example: I have a pseudo random array like this:

2 3 2 5 5 5 5 5 5 6 3 3 5 3 3 3 6 2 2 5 6 3 3....

The score of two digits 2 jointly in this array is:1.
The score of two digits 3 jointly in this array is:3.
The score of two digits 5 jointly in this array is: 3.
The score of two digits 6 jointly in this array is:0.

When I finished this,I want to know a score apperance a three digits 2 jointly, a three digits 3 jointly, a thre digits 5 jointly and a three digits 6 jointly in this rendom array.

In my example:
- score of three digits 2 jointly is 0.
- score of three digits 3 jointly is 1.
-score of three digits 5 jointly is 2.
-score of three digits 6 jointly is 0.


Best regards.
__________________
Michael12 is offline   Reply With Quote