The aims of this paper are to helpunderstand the dendritic cells algorithm (DCA) and re- duce the potential incorrect applications and implementations, to clearly present the formal descrip- tion of the dendritic cells algorithm, and to theoretically deduce the algorithm' s runtime complexity and detection performance. The entire dendritic cells population of the algorithm is specified using quantitative measures at the functional level. Basic set theory and computational functions, such as addition, multiplication and recursion, are used for clarity and definition, and theoretical analysis is implemented via introduction of three runtime variables in terms of three phases of the algorithm. Consequently, the data structures, procedural operations and pseudocode description of the dendrit- ic cells algorithm are given. The standard DCA achieves a lower bound of ^(n) runtime complexity and an upper bound of O( n2) runtime complexity under the worst case. In addition, the algorithm' s runtime complexity can be improved to O (max( nN, nS)) by utilizing segmentation approach, where n is the number of input instances, N is the population size and 8 is the size of each segment.