# Understanding sequential solution for the TAOCP 3 Million Men problem

The problem and solution of interest is described here: What does > mean in this TAOCP solution?

Can anyone explain following points in that solution:

1. How exactly we can build (x[i], x[i+2]) for 1 <= i <= N-2 ?
2. What exactly means "merge G with it"? Provide exact algorithm for merging these two files.
3. How steps 1-4 are executed? Is it:

if (condition 1) {
....
}
if (condition 2) {
....
}
if (condition 3) {
....
}
if (condition 4) {
....
}


or

if (condition 1) {
....
}
else if (condition 2) {
....
}
else if (condition 3) {
....
}
else if (condition 4) {
....
}


?

• The title you have chosen is not well suited to representing your question. Please take some time to improve it; we have collected some advice here. Thank you! – Raphael Jan 24 '17 at 18:44

1. With a for loop that steps through the array and creates a new pair from the $i$th and $(i+2)$th elements, for each $i$.
3. There are no "otherwise"s in the statement in English, so there should be no else statements.