搜索资源列表
MC_Prime
- 用Monte Carlo算法测试素数的实验程序,附有实验报告对程序做详细说明。-With the Monte Carlo algorithm for testing primes experimental procedure, experimental report with a detailed descr iption of the process.
StringMatch
- 分别用KMP、Monte Carlo和Las Vegas算法编制3个程序, 随机生成不小于5000对的、长度不等的01串X和Y(三个程序生成相同的串),然后统计算法的执行时间、Monte Carlo算法出错的比率,并根据运行结果对三种算法进行深入的比较。注意, 先利用本题下方所给素数实现上述算法,学完素数判定算法之后, 将该算法编程,产生少量的大素数并用数组保存起来, 以供上述随机算法使用(素数判定算法写在上述随机算法之外)。 -Were used to KMP, Monte
pattern_matching
- 分别用KMP、Monte Carlo 和Las Vegas 算法编制3 个程序,随机生成不小于5000 对、 长度很长、且长度不等的01 串X 和Y(三个程序生成 相同的串),然后统计算法的执行时间、Monte Carlo算法出错的比率,并根据运行结果对三种算法进行深入的比较。注意, 先利用本题下方所给素数实现上述算法,学完素数判定 算法之后,将该算法编程,产生一定数量的大素数并用数组保存起来(分别试不超过5000、500000、50000000),以供上述随机算法使用-The
prime-test
- 素数测试问题(Monte Carlo算法) 求am(mod n)的算法(m≤n) 设m的二进制表示为bkbk-1…b1b0(bk=1,且k≈log2m)。 例:m=41=101001(2),bkbk-1…b1b0=101001,(k=5)。 求am可以用下述方法:初始C←1。 -Prime number test problem ( Monte Carlo algorithm) Seek am ( MOD n ) algorithm ( M = n) A
VAN-DER-CORPUT-SEQUENCE-(BASIC-SEQUENCE)
- The Van Der Corput sequence is the basic sequence of many Quasi Monte Carlo simulations (QMC). We now present the method to follow in order to determine the nth element of the sequence.We begin by choosing a prime number b. To find the nth number, we