计算机工程与应用 ›› 2012, Vol. 48 ›› Issue (17): 72-75.

• 研发、设计、测试 • 上一篇    下一篇

基于Erlang的多核并行计算N-皇后问题

孙黎明1,2,桑  军1,向  宏1   

  1. 1.重庆大学 软件学院,重庆 400044
    2.铜仁学院 数学与计算机科学系,贵州 铜仁 554300
  • 出版日期:2012-06-11 发布日期:2012-06-20

Multi-core parallel computing for N-queens problem based on Erlang

SUN Liming1,2, SANG Jun1, XIANG Hong1   

  1. 1.School of Software Engineering, Chongqing University, Chongqing 400044, China
    2.Department of Mathematics and Computer Science, Tongren University, Tongren, Guizhou 554300, China
  • Online:2012-06-11 Published:2012-06-20

摘要: 为了充分利用多核CPU的资源,利用并行计算来处理问题已逐渐成为主流。利用Erlang中的并行机制计算N-皇后问题,设计并实现了并行计算N-皇后问题的算法。实验结果表明,该算法有效地提升了多核计算机资源的利用率,提高了求解问题的效率。此外,由于Erlang本身具有数据处理上限只受硬件处理能力限制的特性,算法可扩展性也比较强。

关键词: Erlang, 多核, 并行计算, N-皇后问题

Abstract: To fully take advantage of the multi-core CPU resources, using parallel computing to solve problems has become the mainstream. Parallel computing algorithm for N-queens problem based on Erlang is designed and implemented. Experimental results show that the algorithm effectively improves the utilization of the multi-core computer resources and increases the problem solving efficiency. In addition, because the data processing limit for Erlang is only restricted by the hardware processing power, the proposed algorithm can be extended effectively.

Key words: Erlang, multi-core, parallel computing, N-queens problem