作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

›› 2004, Vol. 30 ›› Issue (22): 81-83.

• 论文 • 上一篇    下一篇

任意N重循环的设计方法与应用

肖建华,欧阳浩,何宏   

  1. 湖南工程学院计算机系,湘潭大学,湖南工程学院计算机系 湘潭 411101,湘潭 411101 湘潭大学,湘潭 411105
  • 发布日期:2004-11-25

Design Method and Application of Arbitrary N Multiple Circulation

XIAO Jianhua1, OUYANG Hao2, HE Hong1,2   

  1. (1.Dept.of Computer. Hunan College of Engineering, Xiangtan 411101; 2. Xiangtan University, Xiangtan 411105)
  • Published:2004-11-25

摘要: 提出了任意n重循环设计的一般方法,给出了设计n重循环的递归和非递归程序框架,研究如何控制循环变量的变化以使程序达到最优。最后通过子集和问题、数的全排列和n皇后问题来说明上述方法的应用。

关键词: 任意n重循环, 程序设计, 算法

Abstract: This paper introduces a common method of arbitrary n multiple circulation, gives the frame of recursive and non-recursive algorithm for arbitrary n multiple circulation, studies how to control circulation variable to optimize program. At last, the application of this method is explained by the problem of subset-sum, the problem of all sequence permutation and the problem of N-queen.

中图分类号: