What does "$|i-j|$ is a square" means in graphs

76 Views Asked by At

I am reading a pastime from issue 6 of "Le Monde 2"

-a) What is the size of the largest set $S\subset\{0,...,x\}$ such that it does not contain two integers $i$, $j$ such that $|i-j|$ is a square?

-b) What is the size of the largest set $T\subset\{0,...,x\}$ such that given two integers $i$, $j$ of $T$, $|i-j|$ is a square?

What I understand by "$|i-j|$ is a square" is that from vertex $i$ to vertex $j$ it can be found a graph such as graph square but I am not really sure what it means by that

1

There are 1 best solutions below

0
On BEST ANSWER

Define a graph $G$ with nodes $\{0,1,\dots,x\}$ and an edge $(i,j)$ if $|i-j|=k^2$ for some integer $k$. Part (a) is asking you to find a maximum independent in $G$. Part (b) is asking you to find a maximum clique in $G$, equivalently, a maximum independent set in the complement of $G$.