# Pairs of random numbers (x,y) are generated where the variables X and Y are integers between 0 to 5 inclusive. (i) How many different pairs are possible?

Oct 18, 2017

#### Explanation:

There are 6 possible integers from 0 to 5, so the n becomes 6. from these two we are supposed to make pair of 2 numbers do r becomes 2. By theory of permutation and combination, total number of ways in which we can draw combination of 2 integers from set of 6 integers is ${=}^{6} {C}_{2}$ given by-

${=}^{6} {C}_{2}$= (6!)/(2!(6-2)!= 15

Oct 18, 2017

i. $\textcolor{b l u e}{36}$ pairs are possible
ii. distribution of $w = \left\mid x - y \right\mid$
color(white)("XXX"){:(w=,0,1,2,3,4,5),("occurences:",6,10,8,6,4,2):}

#### Explanation:

Part i
There are $\textcolor{g r e e n}{6}$ possible values for $x$
and for each of these values there are $\textcolor{m a \ge n t a}{6}$ possible values for $y$

To be explicit:
{: (,," | ",y=,,,,,), (,,ul(color(white)("xxx")),ul(0),ul(1),ul(2),ul(3),ul(4),ul(5)), (x=,0," | ",(0,0),(0,1),(0,2),(0,3),(0,4),(0,5)), (,1," | ",(1,0),(1,1),(1,2),(1,3),(1,4),(1,5)), (,2," | ",(2,0),(2,1),(2,2),(2,3),(2,4),(2,5)), (,3," | ",(3,0),(3,1),(3,2),(3,3),(3,4),(3,5)), (,4," | ",(4,0),(4,1),(4,2),(4,3),(4,4),(4,5)), (,5," | ",(5,0),(5,1),(4,2),(5,3),(5,4),(5,5)) :}

Part ii
An examination of the table above should make the distribution of $w = \left\mid x - y \right\mid$ obvious
or you could redo the table to be explicit:
{: (w=abs(x-y),," | ",y,,,,,), (ul(color(white)(w=abs(x-y))),,ul(color(white)("xxx")),ul(0),ul(1),ul(2),ul(3),ul(4),ul(5)), (x=,0," | ",0,1,2,3,4,5), (,1," | ",1,0,1,2,3,4), (,2," | ",2,1,0,1,2,3), (,3," | ",3,2,1,0,1,2), (,4," | ",4,3,2,1,0,1), (,5," | ",5,4,3,2,1,0) :}