Manas Satish Bedmutha
Last Activity: 12 Years ago
Consider p<q and
Case I: q-p=3
For p=1,2,3,...,6,7 no. of values of q satisfying resp. values are in order, 7,6,5,,...,2,1.
Thus for p<q there are 21 options.
Now as |p-q|=3, we have other 21 pairs. In all, 42 for |p-q|=3.
Case II : diff.=2
There are 28+28=56 pairs as done by method in case I.
Case II : diff.=1
There are 36+36=72 pairs as done by method in case I.
Thus in all, no. of ways = 72+56+42 = 172.