Problem

Source:

Tags: number theory, Sets, maximum value, romania, Romanian TST



Let $p,q$ be positive integers. For any $a,b\in\mathbb{R}$ define the sets $$P(a)=\bigg\{a_n=a \ + \ n \ \cdot \ \frac{1}{p} : n\in\mathbb{N}\bigg\}\text{ and }Q(b)=\bigg\{b_n=b \ + \ n \ \cdot \ \frac{1}{q} : n\in\mathbb{N}\bigg\}.$$The distance between $P(a)$ and $Q(b)$ is the minimum value of $|x-y|$ as $x\in P(a), y\in Q(b)$. Find the maximum value of the distance between $P(a)$ and $Q(b)$ as $a,b\in\mathbb{R}$.