-
最优二叉查找树
C[i,j] 表示点i+1,i+2到点j中,选择任意一个点作为根,在(j-i)个解中找出成本最小的最优解
向前递推过程:
首先计算所有j-i=1的C(i, j)
然后依次计算j-i=2,3,…,n的C(i,j)。
C(0,n)=最优二分检索树的成本。
初始值
C(i,i) = 0
W(i,i) = Q(i),0≤i≤n
最优二分检索树的构造
在计算C(i, j)的过程中,记下使之取得最小值的k值,即树Tij的根,记为R(i, j)。
依据R(0, n)…,推导树的形态
- 2022-03-04 13:28:28下载
- 积分:1
-
Sicily 1009梅森素数
One of the world-wide cooperative computing tasks is the "Grand Internet Mersenne Prime Search" -- GIMPS -- striving to find ever-larger prime numbers by examining a particular category of such numbers.
A Mersenne number is defined as a number of the form (2p–1), where p is a prime number -- a number divisible only by one and itself. (A number that can be divided by numbers other than itself and one are called "composite" numbers, and each of these can be uniquely represented by the prime numbers that can be multiplied together to generate the composite number — referred to as its prime factors.)
Initially it looks as though the Mersenne numbers are all primes.
Prime
Corresponding Mersenne Number
2
4–1 = 3 -- prime
3
8–1 = 7
- 2022-03-17 05:46:40下载
- 积分:1
-
OTP 即一次性口令相比于原来的远程认证系统有着更好的安全性...
OTP 即一次性口令相比于原来的远程认证系统有着更好的安全性-OTP one-time password that is compared to the original remote authentication system has better security
- 2023-06-17 09:05:03下载
- 积分:1
-
C# code for chess game
srchess是一个内置于C的国际象棋程序。虽然它与商业国际象棋项目不一样,但srchess毫无问题地击败了我,因此对于普通玩家来说,它可能是一个严重的对手。程序支持合理数量的函数。它最大的弱点是
- 2022-02-09 14:24:56下载
- 积分:1
-
正则表达式的示例
Regex beginers 为一个简单的项目。在此项目中,您可以学习基本的语法和用法的正则表达式、 regecomp、 regexec。它真的可以帮助如果您从未使用过。
- 2022-06-19 04:14:13下载
- 积分:1
-
simhash算法实现
应用背景
利用ansj simhash进行分词和去重
关键技术ansj分词使用非常方便,只需要下载相应的jar包就可以,simhash能够快速去重。
- 2022-03-12 13:58:05下载
- 积分:1
-
vb CRC校验源码
"CRC算法函数
Public Function CRC(STR1 As String) As String
Dim CRCREG As Long
Dim MVAL As Long
Dim R As Integer
Dim T As Integer
CRCREG = 65535
For R = 1 To Len(STR1) Step 2
MVAL = Val("&H" + Mid(STR1, R, 2))
CRCREG = CRCREG Xor MVAL
CRCREG = C
- 2022-02-10 03:39:12下载
- 积分:1
-
对几个数据进行进行排序的算法
工程应用中,往往会涉及到简单的排序算法,尤其是在采样过程中,一般都会先采集一定点的数据,然后进行排序,最终取中间的数据进行平均。
- 2023-02-19 15:20:03下载
- 积分:1
-
CRC校验码
RTU通信技术的校验实现,labview程序下的,需要的人可以试试,通过测试完全可用,希望大家共同进步。谢谢
- 2022-07-27 16:57:22下载
- 积分:1
-
逆波兰表达式求值
是自己写的逆波兰表达式求值问题 通过栈和数组来存储数据完美实现了计算过程..
- 2023-07-09 11:00:03下载
- 积分:1