登录
首页 » 数据结构 » 求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下...

求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下...

于 2022-05-21 发布 文件大小:7.84 kB
0 233
下载积分: 2 下载次数: 1

代码说明:

求解约瑟夫问题。设有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.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 用C实现的基于O
    用C实现的基于O-tree的ic设计布图布线工具源代码,有相关文档-C realized based on O-tree-id wiring layout design tools source code, related documentation
    2022-05-31 07:35:33下载
    积分:1
  • 谷歌地球瓦片编码
    谷歌地图的编码方式,Google earth地图图片编码的qrst算法,包括坐标编号转QRST编码以及QRST编码反转坐标编码的程序
    2023-03-04 15:30:03下载
    积分:1
  • 中的顺序表操作。如插入,删除等!
    数据结构中的顺序表操作。如插入,删除等!-Data structure in the order table operation. Such as insert, delete and so on!
    2023-08-21 05:15:03下载
    积分:1
  • C语言版本的八皇后问题
    要求:在国际象棋的棋盘摆上8个皇后,使得任何两个皇后不在一行,不在一列,同时也不在同一条斜线上。要求找出所有解。 算法思想 利用回溯算法搜索解空间,解分量的值等于解空间的索引(行编号),求出一个解递归调用即可求出所有92种情况。 设计心得: 1、  请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2022-08-13 19:21:25下载
    积分:1
  • 课设:三个野人和三个传教士(C实现)
    三个修道士和三个野人过河,船一次最多只能载两个人,在任何时候修道士的人数不能少于野人人数,否则野人会吃掉修道士。找出六个人顺利过河的所有方案。 
    2022-08-13 05:53:10下载
    积分:1
  • balanced binary tree generating arbitrary input nodes as 2 6 8 0 to demonstrate...
    平衡二叉树生成 输入任意个节点 如 2 6 8 0为显示 可自动生成平衡二叉树 bf为平衡因子 h给深度 可插入删除 计算转动次数(wangliwei007也是我,质料没添全就换这个好号,请斑竹给我发个号好吗?我也想下载东西,急)-balanced binary tree generating arbitrary input nodes as 2 6 8 0 to demonstrate that automatically generates balanced binary tree bf for the balance factor to the depth h can be inserted delete calculated rotational frequency (wangliwei007 me, not Tim material on the whole good for this, please give me a 62-000, okay? I would also like to download something radical)
    2022-05-08 16:28:03下载
    积分:1
  • 中的一个试验程序,实现简单的校园导游图功能,提供查找最短路径功能。...
    数据结构中的一个试验程序,实现简单的校园导游图功能,提供查找最短路径功能。-data structure of a test procedures, a simple guide campus map function, providing the shortest path search function.
    2022-04-17 12:13:54下载
    积分:1
  • vb多媒体库例子
    vb多媒体数据库例子-vb examples of multimedia database
    2022-12-02 13:20:03下载
    积分:1
  • this is a code of data structure
    这是数据结构第四章中串的全部算法代码,实现了全部算法,对学习数据结构的同学很有帮助-this is a code of data structure
    2022-03-16 05:36:14下载
    积分:1
  • huffman树的基本实现. 利用读取TXT文件统计产生huffman树,从而对TXT文件进行压缩和解压....
    huffman树的基本实现. 利用读取TXT文件统计产生huffman树,从而对TXT文件进行压缩和解压.-huffman tree realize. the use of statistics to read TXT file generated huffman tree, thus TXT file compression and decompression.
    2022-08-24 08:55:48下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载