Josephus排列问题定义如下:假设n个竞赛者排成一个环形。给定一个正整数m,从某个指定的第一个人开始,沿环计数,每遇到第m个人就让其出列,且计数继续进行下去。这个过程一直到所有的人都出列为止。最后出列都优胜者。每个人出列的次序定义了整数1,2,...,n的一个排列。这个排列称为一个(n,m)Josephus排列。例如,(7,3)Josephus排列为3,6,2,7,5,1,4.对于给定的1,2,...n中的k个数,Josephus想知道是否存在一个正整数m(n,m)Josephus排列的最后k个数为事先指定的这k个数。
上传时间: 2015-09-20
上传用户:zycidjl
一杯沸水冷却,圆柱体模型,底面半径0.05m,高0.1m,周围温度20度,初始水温100度 方程是四维输运方程(常数a^2=k/(c*p),k是热传导系数0.6006焦/(米*秒*度)) 初始条件:t=0时水等于100度 边界条件:1.上下壁都是自由冷却,第三类边界条件,周围温度保持在20度(H=k/h,h取1) 2.杯壁绝热,第二类边界条件
标签: 冷却
上传时间: 2015-09-23
上传用户:stampede
用得最多的是最近邻,此处上传的是K-近邻,即k=1。matlab环境下的代码。附有实例。
标签:
上传时间: 2015-09-23
上传用户:1966640071
C# BigInteger class. BigInteger.cs is a csharp program. It is the BIgInteger class. It has methods: abs() , FermatLittleTest(int confidence) ,gcd(BigInteger bi) , genCoPrime(int bits, Random rand) , genPseudoPrime(int bits, int confidence, Random rand) , genRandomBits(int bits, Random rand) , isProbablePrime(int confidence) , isProbablePrime() , Jacobi(BigInteger a, BigInteger b) , LucasSequence(BigInteger P, BigInteger Q, BigInteger k, BigInteger n) ,max(BigInteger bi) , min(BigInteger bi) , modInverse(BigInteger modulus) , RabinMillerTest(int confidence) ,
标签: BigInteger class BIgInteger program
上传时间: 2013-12-23
上传用户:ynzfm
Embest S3C44B0X Evaluation Board RTC Test Example RTC Check(Y/N)? y Set Default Time at 2004-12-31 FRI 23:59:59 Set Alarm Time at 2005-01-01 00:00:01 ... RTC Alarm Interrupt O.K. ... Current Time is 2005-01-01 SAT 00:00:01 RTC Working now. To set date(Y/N)? y Current date is (2005,01,01, SAT). input new date (yy-mm-dd w): 5-2-23 3 Current date is: 2005-02-23 WED RTC Working now. To set time(Y/N)? y Current time is (00:00:21). To set time(hh:mm:ss): 19:32:5 Current Time is 2005-02-23 WED 19:32:
标签: Evaluation RTC S3C44B0X Default
上传时间: 2014-01-03
上传用户:baiom
邻接矩阵类的根是A d j a c e n c y W D i g r a p h,因此从这个类开始。程序1 2 - 1给出了类的描述。程 序中,先用程序1 - 1 3中函数Make2DArray 为二组数组a 分配空间,然后对数组a 初始化,以描述 一个n 顶点、没有边的图的邻接矩阵,其复杂性为( n2 )。该代码没有捕获可能由M a k e 2 D A r r a y 引发的异常。在析构函数中调用了程序1 - 1 4中的二维数组释放函数D e l e t e 2 D
标签: 矩阵
上传时间: 2013-12-21
上传用户:lanjisu111
人工选择聚类中心,用k-means聚类方法对图像进行分割,效果不错的
上传时间: 2013-12-29
上传用户:gaojiao1999
A general technique for the recovery of signicant image features is presented. The technique is based on the mean shift algorithm, a simple nonparametric pro- cedure for estimating density gradients. Drawbacks of the current methods (including robust clustering) are avoided. Feature space of any nature can be processed, and as an example, color image segmentation is dis- cussed. The segmentation is completely autonomous, only its class is chosen by the user. Thus, the same program can produce a high quality edge image, or pro- vide, by extracting all the signicant colors, a prepro- cessor for content-based query systems. A 512 512 color image is analyzed in less than 10 seconds on a standard workstation. Gray level images are handled as color images having only the lightness coordinate
标签: technique presented features recovery
上传时间: 2015-10-14
上传用户:410805624
改进的Dijkstra寻径算法,用来找到从源点到目的节点的前k条最短路径
上传时间: 2013-12-19
上传用户:talenthn
经典C语言程序设计100例1-10 如【程序1】 题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去 掉不满足条件的排列。 2.程序源代码: main() { int i,j,k printf("\n") for(i=1 i<5 i++) /*以下为三重循环*/ for(j=1 j<5 j++) for (k=1 k<5 k++) { if (i!=k&&i!=j&&j!=k) /*确保i、j、k三位互不相同*/ printf("%d,%d,%d\n",i,j,k) } }
上传时间: 2013-12-14
上传用户:hfmm633