kzoacn/sum4cubes
收藏Hugging Face2026-01-14 更新2026-03-29 收录
下载链接:
https://hf-mirror.com/datasets/kzoacn/sum4cubes
下载链接
链接失效反馈官方服务:
资源简介:
---
license: mit
---
# A Heuristic Algorithm for the Sum of Four Cubes Problem
This repository contains the implementation code and dataset for the paper **"A Heuristic Algorithm for the Sum of Four Cubes Problem"** by Kaiyi Zhang, Zhuo Huang, Anyu Wang, and Xiaoyun Wang.
The project provides an efficient heuristic algorithm that transforms the Diophantine equation into a series of generalized Pell's equations to find integer solutions.
## Code
**File:** `sum4cubes.sage`
This script contains the SageMath implementation of the algorithm described in the paper. It includes the `solve(n)` function which attempts to find integers for a given .
### Important Requirement
**Please use the latest version of SageMath (Version 10.4 or higher).**
The algorithm relies on the `BinaryQF` solver. Older versions of SageMath have a significantly slower implementation of the integer solver, which will drastically impact performance.
### Usage
```python
# Example usage within SageMath
load("sum4cubes.sage")
# Solve for a specific integer (e.g., n = 254)
print(solve(254))
# Output: (-12, 13, 1, -6)
```
## Data
**Files:** `cubes-00.txt` — `cubes-99.txt`
These text files contain the pre-computed solutions for the sum of four cubes problem.
* The dataset covers instances up to 10^9.
* The data is split into 100 parts (`00` to `99`) for easier handling.
## Reference
If you use this code or data, please cite the original paper:
> Kaiyi Zhang, Zhuo Huang, Anyu Wang, and Xiaoyun Wang. "A Heuristic Algorithm for the Sum of Four Cubes Problem."
提供机构:
kzoacn



