To find the number of distinct elements in the set X∪Y, we can use the Principle of Inclusion-Exclusion:
n(X∪Y)=n(X)+n(Y)−n(X∩Y)
Step 1: Analyze set X
Set X consists of the first 2018 terms of the arithmetic progression with:
- First term, a1=1
- Common difference, d1=6−1=5
- Total number of elements, n(X)=2018
The general term of this AP is given by:
xk=1+(k−1)⋅5=5k−4,for k=1,2,…,2018
The maximum element in set X is:
xmax=1+(2018−1)⋅5=1+2017⋅5=10086
Step 2: Analyze set Y
Set Y consists of the first 2018 terms of the arithmetic progression with:
- First term, a2=9
- Common difference, d2=16−9=7
- Total number of elements, n(Y)=2018
The general term of this AP is given by:
ym=9+(m−1)⋅7=7m+2,for m=1,2,…,2018
The maximum element in set Y is:
ymax=9+(2018−1)⋅7=9+2017⋅7=14128
Step 3: Find the number of common elements, n(X∩Y)
The elements in X∩Y form a new arithmetic progression:
- The first common term is 16 (since x4=5(4)−4=16 and y2=7(2)+2=16).
- The common difference of the common terms is D=lcm(d1,d2)=lcm(5,7)=35.
Thus, the common elements are of the form:
zt=16+35t,for t=0,1,2,…
Since the maximum possible value for a common element cannot exceed the smaller maximum of the two sets:
max(X∩Y)≤min(xmax,ymax)=10086
Setting up the inequality:
16+35t≤10086
35t≤10070
t≤3510070=287.714…
Since t must be a non-negative integer, t can take values from 0 to 287.
The total number of common elements is:
n(X∩Y)=287−0+1=288
Step 4: Calculate n(X∪Y)
Using the Inclusion-Exclusion formula:
n(X∪Y)=2018+2018−288=3748