We study the exact counting problem for all lattice rectangles contained in the square $[0,n)\times[0,n)$, including non-axis-parallel ones. Starting from the standard parametrization by a primitive direction $(u,v)$ and two side lengths, we derive a sequence of exact algorithms of complexity $O(n^2)$, $O(n^{3/2}\log n)$, $O(n^{4/3}\log n)$, and finally $O(n\log^3 n)$. The main idea behind the near-linear algorithm is to reduce the geometric summation to a constant-size family of weighted floor sums closed under Euclidean-style affine and reciprocal transformations, and hence evaluable in $O(\log n)$ time per query. Besides the exact algorithmic result, we also derive a two-term asymptotic expansion, $F(n)=\frac{4\log 2-1}{π^2}n^4\log n+B\,n^4+o(n^4)$ with the explicit formula for $B$, which provides an independent consistency check for the large-$n$ numerical data produced by the algorithms.


翻译:我们研究包含在正方形 $[0,n)\times[0,n)$ 内所有格点矩形(包括非轴平行矩形)的精确计数问题。从原始方向 $(u,v)$ 和两个边长的标准参数化出发,我们推导出一系列精确算法,其复杂度分别为 $O(n^2)$、$O(n^{3/2}\log n)$、$O(n^{4/3}\log n)$ 以及最终的 $O(n\log^3 n)$。近线性算法背后的核心思想是将几何求和问题约化为一族在欧几里得型仿射变换和倒数变换下封闭的加权底函数求和常系数族,从而每次查询可在 $O(\log n)$ 时间内求值。除精确算法结果外,我们还推导出两项渐近展开式 $F(n)=\frac{4\log 2-1}{π^2}n^4\log n+B\,n^4+o(n^4)$,其中 $B$ 的显式公式可作为算法生成的大 $n$ 数值数据的独立一致性检验依据。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
【中科大】数值计算方法扩充课程,116页pdf
专知会员服务
84+阅读 · 2022年1月7日
专知会员服务
42+阅读 · 2021年4月2日
【经典书】线性代数,Linear Algebra,525页pdf
专知会员服务
79+阅读 · 2021年1月29日
【硬核书】矩阵代数基础,248页pdf
专知
16+阅读 · 2021年12月9日
【泡泡点云时空】基于分割方法的物体六维姿态估计
泡泡机器人SLAM
18+阅读 · 2019年9月15日
【干货】​深度学习中的线性代数
专知
21+阅读 · 2018年3月30日
【干货】理解深度学习中的矩阵运算
机器学习研究会
18+阅读 · 2018年2月12日
干货|掌握机器学习数学基础之优化[1](重点知识)
机器学习研究会
10+阅读 · 2017年11月19日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
8+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
【中科大】数值计算方法扩充课程,116页pdf
专知会员服务
84+阅读 · 2022年1月7日
专知会员服务
42+阅读 · 2021年4月2日
【经典书】线性代数,Linear Algebra,525页pdf
专知会员服务
79+阅读 · 2021年1月29日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员