Particle swarm optimization (PSO) uses a social topology for particles to share information among neighbors during optimization. A large number of existing literatures have shown that the topology affects the performance of PSO and an optimal topology is problem dependent, but currently there is a lack of study on this issue. In this paper, we first analyze a class of deterministic regular topologies with regard to what affect the optimality of algorithmic parameters (e.g., the number of particles and the topological degree), so as to provide a guide to topology selections for PSO. Both theoretical analysis and numerical experiments are performed and reported in detail. The theoretical analysis reveals that the optimality of algorithmic parameters is dependent on the computational budget available. In particular, the optimal number of particles increases unstrictly as the computational budget increases, while for any fixed number of particles the optimal degree decreases unstrictly as computational budget increases. The only condition is that the computational budget cannot exceed a constant measuring the hardness of the benchmark function set With a total of 198 regular topologies and 9 different numbers of particles tested on 90 benchmark functions using a recently reported data profiling technique, numerical experiments verify the theoretical derivations. Based on these results, two formulas are developed to help choose optimal topology parameters for increased ease and applicability of PSO to real-world problems. (C) 2016 Elsevier Inc. All rights reserved.