After solving the Basic Gcd Problem, ZYB gives you a more difficult one: Given an integer n{n}n, find two subsetA{A}A andB{B}B of{1,2,…,n} such that: ∣A∣=∣B∣=m{|A|=|B|=m}∣A∣=∣B∣=mandA∩B=A cap B = emptysetA∩B= LetA={a1,a2,…,qmsuch that for each 1≤i≤m1 le i le m1≤i≤m, gcd>1gcd > 1gcd>1. Please find two subsets with maximum value of m{m}m.
After solving the Basic Gcd Problem, ZYB gives you a more difficult one: Given an integer n{n}n, find two subset A{A}A and B{B}B of {1,2,…,n}{1,2,dots,n}{1,2,…,n} such that: ∣A∣=∣B∣=m{|A|=|B|=m}∣A∣=∣B∣=m and A∩B=∅A cap B = emptysetA∩B=∅ Let A={a1,a2,…,am}A={a_1,a_2,dots,a_{m}}A={a1,a2,…,am} and B={b1,b2,…,bm}B={b_1,b_2,dots,b_m}B={b1,b2,…,bm}, there exists two permutations p1,p2,…,pmp_1,p_2,dots,p_mp1,p2,…,pm and q1,q2,…,qmq_1,q_2,dots,q_mq1,q2,…,qm such that for each 1≤i≤m1 le i le m1≤i≤m, gcd(api,bqi)>1gcd(a_{p_i}, b_{q_i}) > 1gcd(api,bqi)>1. Please find two subsets with maximum value of m{m}m.