资 源 简 介
求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下一个人从1开始报数,再报数m的人便是第二个出列的人如此重复下去,直到最后一个人出列为止,于是便得到一个出列的顺序,这称之为约瑟夫(Josephu)问题。-solving problems. N individuals have formed a circle to sit down, all right Wai from the start from a position of No. 1, 2, 3, ..., n, for a number of people reported a few, according to several newspaper pay, the newspaper n ie the out, the next person was from the beginning a few , and reported m is the second out of this series continue to repeat until the final out in a series, then get a series out of order, which called Joseph (Josephu) problem.