摘要
针对目前用计算机计算排列组合的算法复杂性高,智能性差的缺点,依据软件工程思 想,提出了一种利用哈希表对键进行排序,间接操作排列元素,求解全排列的方法.该方法在增加少 许时间和空间复杂度的情况下,大大增加了算法的逻辑清晰度和代码易维护性,在程序每步计算耦 合性均很低的情况下,增加程序的可扩展性,使计算大量元素的全排列和快速随机选择元素成 为可能.
By now, the algorithm, calculating the permutation and combination by computer, is of high complexity and bad intelligence. In order to overcome this drawback, one new algorithm that applies Hash table to permute the key and indirectly operates the element, is put forward. The method enhances the algorithm' s logical distinction and the code' s maintenance greatly, only expensing little time and space. As every step in the procedure has very low calculated coupling, enhancing the expansibility of the procedure makes it possible to permute massive elements and select elements randomly.
出处
《哈尔滨理工大学学报》
CAS
2005年第1期92-95,共4页
Journal of Harbin University of Science and Technology
关键词
完全排列
哈希表
GUID
组合数学
completely permutation
Hash table
GUID
combinatorics