The second algorithm is admittedly loosely worded. k(j-1)' refers to the complement of the set containing just k(j-1), so it gives the state that wasn't realized in the (j-1)th period. This works because in this simple framework we're only considering two states.
Though, yes, 1-k(j-1) is the more elegant way of putting it!
I think there's a typo in your second algorithm - the bottom half should read 1-k(j-1) with probability 1-p, right?
Nevertheless, still a fun perspective on selection. I enjoyed it. Thanks.
I'm glad you enjoyed it! Thanks for the comment.
The second algorithm is admittedly loosely worded. k(j-1)' refers to the complement of the set containing just k(j-1), so it gives the state that wasn't realized in the (j-1)th period. This works because in this simple framework we're only considering two states.
Though, yes, 1-k(j-1) is the more elegant way of putting it!
Aha! I didn’t see the complement sign. All good.
Ha. I just looked again. I thought it was a comma for the line above. D’oh!