[ prog / sol / mona ]

prog


[challenge] Does P = NP?

31 2023-10-28 10:17 *

>>28

| No. Queens | Time (ms) |
|------------+-----------|
| 1k         |         1 |
| 5k         |         1 |
| 10k        |         2 |
| 50k        |         8 |
| 100k       |        22 |
| 500k       |        42 |
| 1m         |       122 |
| 5m         |      1492 |
| 10m        |      1904 |
| 50m        |      9923 |
| 100m       |     20649 |
| 200m       |   >300000 |
| 300m       |     86049 |
| 400m       |    148276 |
| 500m       |    203613 |
| 1b         |    247545 |
| 1.5b       |    550431 |
| 2b         |    Failed |
| 10b        |    Failed |

I ran your program with powers of ten up to 1 billion queens (./nq 1000000000) and then attempted 10 billion (./nq 10000000000), but the process simply hung after 30 seconds. After that I went back and tested some intermediate values, up to 2 billion, which failed. Additionally, 200m appears to get stuck forever. A linear regression on values on values from 100m to 1.5b reveals an r of 0.9656, which is fairly high.

32


VIP:

do not edit these