Back to the Problem of the Month
Problem of the Month, rung 06 Preview
Preview. This is December's Problem of the Month, open early so you can try it. The preview runs for one month, on its own graphs and its own board. On the 1st the board and every clock start empty, and nothing carries over. December starts with new graphs and an empty board.
- Vertices: 1000000, numbered 0 to 999999.
- Each pair of vertices is joined with probability p = 1/2, each pair on its own.
The rule. Your graph is given by a key K of 64 hex digits. Vertices i and j, with i < j, are joined when the first bit of SHA-256(K, i, j) is 1. Here K counts as its 32 bytes, and i and j as 8-byte big-endian numbers. The file holds the key on the line k.
The rule in code, free to use (CC0): C, C++, JavaScript. You may write your program before you show your key. The clock starts only then.
Your answer. All n vertices in cycle order, each exactly once, separated by spaces or new lines. Each vertex must be joined to the next, and the last to the first. Any such cycle is accepted. Type it, or upload a text file, or a .gz or .tar.gz of that one file.