Forming a clustered network structure has been proposed as a solution to increase network performance, scalability, stability and manageability in an ad hoc network. A good clustering algorithm aims to select cluster heads among available nodes so that a number of specific constraints are satisfied; thus the cluster head selection problem is a multiobjective optimization problem. This paper proposes an algorithm on the basis of ant colony optimization (ACO) to be used to solve this problem. The proposed algorithm is a simple, one hop cluster formation algorithm, to form a clustered structure with the minimum number of clusters. The centralized ACO-based clustering algorithm is evaluated and compared with other clustering algorithms in ad hoc networks in terms of cluster density.