计算机工程与应用 ›› 2007, Vol. 43 ›› Issue (1): 61-61.

• 学术探讨 • 上一篇    下一篇

Josephus问题的算法设计与应用研究

陈海山,钱 锋,田 英,雷 鸣   

  1. 厦门大学软件学院
  • 收稿日期:2006-01-09 修回日期:1900-01-01 出版日期:2007-01-01 发布日期:2007-01-01
  • 通讯作者: 陈海山 hschen

Algorithm Design and Application Research of Josephus Problem

HaiShan Chen,,,   

  1. 厦门大学软件学院
  • Received:2006-01-09 Revised:1900-01-01 Online:2007-01-01 Published:2007-01-01
  • Contact: HaiShan Chen

摘要: Josephus问题是组合数学的发展源头之一。关于Josephus问题的描述形式甚多。文章通过实验和分析,总结了一个通用性的描述形式,并给出了基于循环链表的算法设计。算法的数据源从文本文件中获取,增强了算法的实用性;根据数据元素值的递增顺序建立循环链表,能够有效地分类数据,使Josephus数据序列均匀分布且不重复。文章还给出了Josephus问题的若干个应用实例,包括将Josephus问题应用于通用试题库的组卷算法和找出一组数据中某个指定范围的数据序列等。

关键词: 算法设计, 动态循环链表, 文本文件, Josephus问题

Abstract: Josephus problem is one of the headstreams of combinatorics. There are so many methods to descript the Josephus problem now. In this paper, after so many experiments and analysis, a common method is summarized and an algorithm is designed, which is based on circular linked list. The data source of the algorithm is from text file, so the practicability is enhanced. And since the circular linked list is created based on the ascendant sequence of the data list, so the data can be classified effectively to make the Josephus data list to be distributed symmetrically and no duplicate. Some applications of Josephus problem is offered, which include the test paper combination algorithm in common test questions database, and finding a list of data, which belongs to certain range, from a set of data, etc.

Key words: Josephus Problem, Algorithm Design, Dynamic Circular Linked List, Text File