文件名称:circular-linked-list-Josephus
介绍说明--下载内容均来自于网络,请自行研究使用
约瑟夫环问题
【问题描述】
Josephus排列问题定义如下:假设n个竞赛者排成一个环形。给定一个正整数m≤n,从第1人开始,沿环计数,第m人出列。这个过程一直进行到所有人都出列为止。最后出列者为优胜者。全部出列次序定义了1,2,…n的一个排列。称为(n,m)Josephus排列。例如,(7,3)Josephus排列为3,6,2,7,5,1,4。
【实验要求】
设计求解Josephus排列问题程序。
(1)采用顺序表、单链表或双向循环链表等数据结构。
(2)采用双向循环链表实现Josephus排列问题,且奇数次顺时针轮转,偶数次逆时针轮转。
(3)推荐采用静态链表实现Josephus排列问题
-Josephus Josephus problem [Problem Descr iption] permutation problem is defined as follows: Suppose the n contestants lined up a ring. Given a positive integer m 鈮?n, beginning from the first one, along the ring count, the first man out of the line m. This process continues until everyone is out of the line so far. Finally out of the line by the winner. All the columns defined sequence 1,2, ... n of an order. Called (n, m) Josephus order. For example, (7,3) Josephus arranged 3,6,2,7,5,1,4. Experimental Design [requirements] Josephus permutation problem solving process. (1) using the order form, single chain or two-way circular linked list data structure. (2) using two-way circular linked list implementation Josephus permutation problem, and the odd clockwise rotation, counterclockwise rotation even number of times. (3) recommend the use of a static list to achieve Josephus permutation problem
【问题描述】
Josephus排列问题定义如下:假设n个竞赛者排成一个环形。给定一个正整数m≤n,从第1人开始,沿环计数,第m人出列。这个过程一直进行到所有人都出列为止。最后出列者为优胜者。全部出列次序定义了1,2,…n的一个排列。称为(n,m)Josephus排列。例如,(7,3)Josephus排列为3,6,2,7,5,1,4。
【实验要求】
设计求解Josephus排列问题程序。
(1)采用顺序表、单链表或双向循环链表等数据结构。
(2)采用双向循环链表实现Josephus排列问题,且奇数次顺时针轮转,偶数次逆时针轮转。
(3)推荐采用静态链表实现Josephus排列问题
-Josephus Josephus problem [Problem Descr iption] permutation problem is defined as follows: Suppose the n contestants lined up a ring. Given a positive integer m 鈮?n, beginning from the first one, along the ring count, the first man out of the line m. This process continues until everyone is out of the line so far. Finally out of the line by the winner. All the columns defined sequence 1,2, ... n of an order. Called (n, m) Josephus order. For example, (7,3) Josephus arranged 3,6,2,7,5,1,4. Experimental Design [requirements] Josephus permutation problem solving process. (1) using the order form, single chain or two-way circular linked list data structure. (2) using two-way circular linked list implementation Josephus permutation problem, and the odd clockwise rotation, counterclockwise rotation even number of times. (3) recommend the use of a static list to achieve Josephus permutation problem
(系统自动生成,下载前可以参看下载内容)
下载文件列表
circular linked list Josephus.doc