Particle swarm optimization (PSO) is a population based stochastic optimization technique, inspired by social behavior of swarms. In comparison with other heuristic methods, PSO is easier to implement and have fewer parameters to adjust. And the most important advantage of this technique is that it may have less computational complexity than others. This talk will give an introduction to PSO and its applications in two classical problems: the graph coloring problem and the optimal communication spanning tree problem. For each problem, a new PSO based algorithm is proposed. These algorithms can achieve results better than known heuristic algorithms do, as verified by extensive experiments.