We employ tools of complexity theory to examine the effect of cognitive variables, such as working-memory capacity, degree of field dependence-independence, developmental level and the mobility-fixity dimension. The nonlinear method correlates the subjects' rank-order achievement scores with each cognitive variable. From the achievement scores in organic-synthesis problems of various mental demands, rank-order sequences of the subjects, according to their scores, were generated, and in the place of each subject, his/her score was replaced by the value of the corresponding cognitive variable. Then each sequence was mapped onto a one-dimensional random walk, and when treated as a dynamic flow, was found to possess fractal geometry, with characteristics depending on the complexity of the problem. The findings were interpreted using concepts from complexity theory, such as order, correlation exponents, and entropy. The method provides meaningful results and adds to the understanding of information processing and the role of cognitive variables within the frame of predictive models in problem solving. Although the method is applied to a particular kind of problems (chemical, organic-synthesis problems), it can be generalized to other problems, not only in chemistry, but also in other sciences and in mathematics. Finally, the educational implications are discussed.