We address the problem of finding sets of integers of a given size with a maximum number of pairs summing to powers of $2$. By fixing particular pairs, this problem reduces to finding a labeling of the vertices of a given graph with pairwise distinct integers such that the endpoint labels for each edge sum up to a power of $2$. We propose an efficient algorithm for this problem, which at its core relies on another algorithm that, given two sets of linear homogeneous polynomials with integer coefficients, computes all variable assignments to powers of $2$ that nullify polynomials from the first set but not from the second. With the proposed algorithms, we determine the maximum size of graphs of order $n$ that admit such a labeling for all $n\leq 21$, and construct the maximum admissible graphs for $n\leq 20$. We also identify the minimal forbidden subgraphs of order $\leq 11$, whose presence prevents the graphs from having such a labeling.
翻译:本文研究在给定大小的整数集合中寻找具有最多对数和为2的幂的问题。通过固定特定整数对,该问题可转化为对给定图的顶点进行标记,使得顶点标记为两两不同的整数,且每条边的两个端点标记之和为2的幂。我们提出一种高效算法解决此问题,其核心依赖于另一算法:给定两组具有整数系数的线性齐次多项式,该算法计算所有变量赋值为2的幂的赋值,使得第一组多项式为零而第二组多项式非零。利用所提算法,我们确定了所有n≤21阶图中允许此类标记的最大图规模,并构造了n≤20阶的最大容许图。同时,我们识别了阶数≤11的最小禁止子图,这些子图的存在会阻碍图具有此类标记。