There has been an increasing number of companies moving towards cloud computing due to its economic model based on the so-called pay-as-you-go. The cloud is known as a dynamic and scalable environment. These characteristics make the management of this environment a complex task. Using autonomic management potentially helps to solve the complexity of managing large number of provisioned cloud resources. Since using one autonomic manager (AM) might result on inefficiency in the management of the system, we propose in this paper to use a decentralized approach for autonomic management. The problem that we are solving herein is to determine how many AMs to use in order to maximize the performance of the management and minimize the cost of the used AMs. We propose a mathematical model that allows to determine the optimal assignment of resources and AMs in different availability zones taking into account the different costs of the involved AMs as well as the communication overhead. We also give an overview of the implementation of the proposed mathematical model.