This document presents a particle swarm optimization (PSO) algorithm for minimizing the total cost of executing applications on cloud computing resources. It describes cloud manufacturing as a model that provides hardware and software resources over computer networks as services. The paper focuses on using PSO to map application tasks to distributed cloud resources in a way that minimizes total computation costs. It provides details on how PSO works, representing potential solutions as "particles" that are updated iteratively based on personal and group experiences to approach an optimal low-cost mapping of tasks to resources.