a,b∈{1,2,3,…,10}
Let Ai={(a,b):|a−b|=i for i=0,1,2,…,5}
A0={(i,i) for i=0,1,2,…,10}
n(A0)=10
A1={(i,i+1) for i=1,2,…,9}
We can swap a and b to get two distinct ordered pairs.
∴n(A1)=2×9=18
A2={(i,i+2) for i=1,2,…,8}
∴n(A2)=2×8=16
A3={(i,i+3) for i=1,2,…,7}
∴n(A3)=2×7=14
A4={(i,i+4) for i=1,2,…,6}
∴n(A4)=2×6=12
A5={(i,i+5) for i=1,2,…,5}
∴n(A5)=2×5=10
∴ Required number of pairs
=n(5⋃i=0Ai)
=5∑i=0n(Ai)
=10+18+16+14+12+10
=80
Alternate :
Total ordered pairs without restriction =10×10=100
Let b−a≥6
Now, if 1≤a<b≤10,
then 1≤a<b−5≤5
So, we have to choose a and b−5 with 1≤a<b−5≤5
This can be done in 5C2=10 ways.
Similarly, for a−b≥6, there are 10 ways.
Required number =100−10−10=80