Skip to main content
added 492 characters in body
Source Link
Seva
  • 23k
  • 2
  • 59
  • 141

I useIn a slightly different notation to restate, your question reads as follows:

Given positive integers $m,n$$m$ and $n$, and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-n)+\dotsb+r(n)=m^2$, and $r(-k)=r(k)$$r(-d)=r(d)$ for each $k\in[1,n]$, and $r(-n)+\dotsb+r(n)=m^2$$d\in[1,n]$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?

There are numerous necessary conditions one can give; for instance, letting $D:=\mathrm{supp}\,r$,

  • $m\le n+1$ and $r(d)\le m-1$ for each $d\in[1,n]$;
  • $|D|\ge m+\min\{2m-3,n\}$ (Freiman's $(3n-3)$-theorem for the difference set);
  • $m(2m-1)\le\sum_{d=-n}^n r^2(d)\le\frac13(2m^2+1)m$ (the additive energy of $A$ is somewhere between those of a Sidon set and of an arithmetic progression of size $m$).

For a necessaryslightly more elaborate condition, observe that if such a set $A$ exists, then $$ \Bigg| \sum_{a\in A} e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$ for any real $t\in[0,1]$. As; as a result, $$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$ I am not sure whether thisThis seems a rather strong condition is also sufficientto me, but my guess is that "in most cases it is"certainly is not sufficient: for any function $f\colon[0,n]\to\mathbb Z_{\ge 0}$, the "skew convolution" $r(d):=\sum_{x}f(x)f(x+d)$ satisfies this condition.

For the algorithmic aspect, you can just check all $m$-element subsets $A$ of the set $D:=\mathrm{supp}\, r$$A\subseteq D$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed, trying to add the next element.

I use a different notation to restate your question as follows:

Given positive integers $m,n$ and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-k)=r(k)$ for each $k\in[1,n]$, and $r(-n)+\dotsb+r(n)=m^2$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?

For a necessary condition, observe that if such a set $A$ exists, then $$ \Bigg| \sum_{a\in A} e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$ for any real $t\in[0,1]$. As a result, $$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$ I am not sure whether this condition is also sufficient, but my guess is that "in most cases it is".

For the algorithmic aspect, you can just check all $m$-element subsets $A$ of the set $D:=\mathrm{supp}\, r$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed trying to add the next element.

In a slightly different notation, your question reads as follows:

Given positive integers $m$ and $n$, and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-n)+\dotsb+r(n)=m^2$, and $r(-d)=r(d)$ for each $d\in[1,n]$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?

There are numerous necessary conditions one can give; for instance, letting $D:=\mathrm{supp}\,r$,

  • $m\le n+1$ and $r(d)\le m-1$ for each $d\in[1,n]$;
  • $|D|\ge m+\min\{2m-3,n\}$ (Freiman's $(3n-3)$-theorem for the difference set);
  • $m(2m-1)\le\sum_{d=-n}^n r^2(d)\le\frac13(2m^2+1)m$ (the additive energy of $A$ is somewhere between those of a Sidon set and of an arithmetic progression of size $m$).

For a slightly more elaborate condition, observe that $$ \Bigg| \sum_{a\in A} e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$ for any real $t\in[0,1]$; as a result, $$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$ This seems a rather strong condition to me, but it certainly is not sufficient: for any function $f\colon[0,n]\to\mathbb Z_{\ge 0}$, the "skew convolution" $r(d):=\sum_{x}f(x)f(x+d)$ satisfies this condition.

For the algorithmic aspect, you can just check all $m$-element subsets $A\subseteq D$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed, trying to add the next element.

deleted 2 characters in body
Source Link
Seva
  • 23k
  • 2
  • 59
  • 141

I use a different notation to restate your question as follows:

Given positive integers $m,n$ and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-k)=r(k)$ for each $k\in[1,n]$, and $r(-n)+\dotsb+r(n)=m^2$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?

For a necessary condition, observe that if such a set $A$ exists, then $$ \Bigg| \sum_{a\in A}^n e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$$$ \Bigg| \sum_{a\in A} e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$ for any real $t\in[0,1]$. As a result, $$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$ I am not sure whether this condition is also sufficient, but my guess is that "in most cases it is".

For the algorithmic aspect, you can just check all $m$-element subsets $A$ of the set $D:=\mathrm{supp}\, r$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed trying to add the next element.

I use a different notation to restate your question as follows:

Given positive integers $m,n$ and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-k)=r(k)$ for each $k\in[1,n]$, and $r(-n)+\dotsb+r(n)=m^2$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?

For a necessary condition, observe that if such a set $A$ exists, then $$ \Bigg| \sum_{a\in A}^n e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$ for any real $t\in[0,1]$. As a result, $$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$ I am not sure whether this condition is also sufficient, but my guess is that "in most cases it is".

For the algorithmic aspect, you can just check all $m$-element subsets $A$ of the set $D:=\mathrm{supp}\, r$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed trying to add the next element.

I use a different notation to restate your question as follows:

Given positive integers $m,n$ and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-k)=r(k)$ for each $k\in[1,n]$, and $r(-n)+\dotsb+r(n)=m^2$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?

For a necessary condition, observe that if such a set $A$ exists, then $$ \Bigg| \sum_{a\in A} e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$ for any real $t\in[0,1]$. As a result, $$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$ I am not sure whether this condition is also sufficient, but my guess is that "in most cases it is".

For the algorithmic aspect, you can just check all $m$-element subsets $A$ of the set $D:=\mathrm{supp}\, r$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed trying to add the next element.

Source Link
Seva
  • 23k
  • 2
  • 59
  • 141

I use a different notation to restate your question as follows:

Given positive integers $m,n$ and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-k)=r(k)$ for each $k\in[1,n]$, and $r(-n)+\dotsb+r(n)=m^2$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?

For a necessary condition, observe that if such a set $A$ exists, then $$ \Bigg| \sum_{a\in A}^n e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$ for any real $t\in[0,1]$. As a result, $$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$ I am not sure whether this condition is also sufficient, but my guess is that "in most cases it is".

For the algorithmic aspect, you can just check all $m$-element subsets $A$ of the set $D:=\mathrm{supp}\, r$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed trying to add the next element.