A thorough discussion of an optimal implementation of the Hoshen-Kopelman (Hoshen and Kopelman, 1976) cluster identification algorithm is presented below. Particular emphasis is given to the input datasets, programming data structures, the cluster neighborhood rule, and the use of a finite-state-machine (FSM). The FSM discussion focuses on the three major implementation components: the temporary label assignment, the search path compression, and the formal finite state machine.