I am excited to share some recent progress on a long-term project of mine.
Let c(n) be the number of simple paths in an undirected n \times n rectangular grid graph connecting the bottom-left node to the top-right node. For context, c(2) = 2 and c(3) = 12.
About a year ago, I reached c(13) using my ZDD library in SWI-Prolog but hit a wall. Recently, after implementing a very simple modification to the code, I managed to calculate c(14) and c(15).
Results
- c(14) = 6,945,066,476,152,136,166,427,470,154,890,735,896,648,8
- c(15) = 227,449,714,676,812,739,631,826,459,327,989,863,387,613,323,440
Benchmarks
c(14) [2026-02-23]
- Hardware: M4 MacBook Pro (48 GB RAM)
- OS/Env: macOS Tahoe 26.3 | SWI-Prolog 10.1.3 (arm64-darwin)
- Performance: 601,379,081,724 inferences
- Time: 35,600.805s CPU / 85,676.193s Wall (42% CPU)
- Memory: 21.58 GB used
c(15) [2026-02-25]
- Hardware: iMac (Intel 2020, 128 GB RAM)
- OS/Env: macOS Tahoe 26.3 | SWI-Prolog 10.1.3
- Performance: 2,422,258,053,335 inferences
- Time: 288,955.899s CPU / 327,655.109s Wall (88% CPU)
- Memory: 85.89 GB used
I have heard that the current world record stands at c(29). To me, that is incredible. I am curious what kind of āmagicā (or advanced frontier-based pruning) is required to reach such heights!