虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

S.M.A.<b>R.</b>T

  • LCS(最长公共子序列)问题可以简单地描述如下: 一个给定序列的子序列是在该序列中删去若干元素后得到的序列。给定两个序列X和Y

    LCS(最长公共子序列)问题可以简单地描述如下: 一个给定序列的子序列是在该序列中删去若干元素后得到的序列。给定两个序列X和Y,当另一序列Z既是X的子序列又是Y的子序列时,称Z是序列X和Y的公共子序列。例如,若X={A,B,C,B,D,B,A},Y={B,D,C,A,B,A},则序列{B,C,A}是X和Y的一个公共子序列,但它不是X和Y的一个最长公共子序列。序列{B,C,B,A}也是X和Y的一个公共子序列,它的长度为4,而且它是X和Y的一个最长公共子序列,因为X和Y没有长度大于4的公共子序列。 最长公共子序列问题就是给定两个序列X={x1,x2,...xm}和Y={y1,y2,...yn},找出X和Y的一个最长公共子序列。对于这个问题比较容易想到的算法是穷举,对X的所有子序列,检查它是否也是Y的子序列,从而确定它是否为X和Y的公共子序列,并且在检查过程中记录最长的公共子序列。X的所有子序列都检查过后即可求出X和Y的最长公共子序列。X的每个子序列相应于下标集{1,2,...,m}的一个子集。因此,共有2^m个不同子序列,从而穷举搜索法需要指数时间。

    标签: 序列 LCS 元素

    上传时间: 2015-06-09

    上传用户:气温达上千万的

  • 提供了一种简单的单向“进程间通信”(interprocess communication, I P C)机制。这个机制的名字非常古怪

    提供了一种简单的单向“进程间通信”(interprocess communication, I P C)机制。这个机制的名字非常古怪,叫作“邮槽”(M a i l s l o t)。用最简单的话来说,通过 邮槽,客户机进程可将消息传送或广播给一个或多个服务器进程。

    标签: communication interprocess 机制 进程间通信

    上传时间: 2014-01-26

    上传用户:二驱蚊器

  • 1、 了解系统调用pipe()的功能和实际原理 2、 编写一段程序

    1、 了解系统调用pipe()的功能和实际原理 2、 编写一段程序,使用管道实现父子进程之间的通信 a) 使用系统调用fork()创建一个子进程 b) 子进程调用函数write()向父进程发送自己的进程ID和字符串” s sending a message to parent.\n”。 c) 父进程调用函数read()通过管道读出子进程发来的消息,将消息输出屏幕,然后终止

    标签: pipe 系统调用 程序 编写

    上传时间: 2013-12-16

    上传用户:古谷仁美

  • E:VISUAL C++MFC扩展编程实例 实例35 添加帮助菜单项

    E:\VISUAL C++MFC扩展编程实例 实例35 添加帮助菜单项,在本例中将向应用程序中的H e l p菜单中添加C o n t e n t s和S e a r c h 菜单项。

    标签: VISUAL MFC 扩展 编程实例

    上传时间: 2014-01-09

    上传用户:541657925

  • 用GA直接训练BP网络的权重算法 主程序:gafault.m 它包括以下子程序: 1. BP网络初始化:nninit.m――给出P

    用GA直接训练BP网络的权重算法 主程序:gafault.m 它包括以下子程序: 1. BP网络初始化:nninit.m――给出P,T,R,S1,S2; 2. 适应值计算函数:gabpEval.m; 3.将遗传算法的编码解码为BP网络所对应的权值、阈值函数:gadecod.m;

    标签: gafault nninit BP网络 程序

    上传时间: 2013-12-07

    上传用户:奇奇奔奔

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.

    标签: represented integers group items

    上传时间: 2016-01-17

    上传用户:jeffery

  • 本程序要求用户在控制台里输入非终极符

    本程序要求用户在控制台里输入非终极符,终结符与产生式,然后对用户输入的文法进行分析,得出first集 与follow 集,并打印出预测分析表用户决定是否继续进行句型分析,如继续则给出符号分析栈的实现,从而判断刚输入的句子是否为符合该文法的句子。 该程序遵循LL(1) 文法FIRST(A)的构造:是A的所有可能推导的开头终结符或可能的ε FOLLOW(A)是所有句型中出现在紧接A之后的非终结符或“#” 预测分析程序 构造LL(1)分析表 ⅰ,构造文法中所有元素的FIRST和FOLLOW集合 ⅱ,对文法G的每个产生式A->α执行第三步和第四步 ⅲ,对每个终结符a∈FIRST(α),把A->α加至M[A,a] ⅳ,若ε∈FIRST(α),则对任何b∈FOLLOW(A)把A->α加至M[A,b]中 ⅴ,把所有无定义的M[A,a]标上“出错标志”

    标签: 程序 用户 控制台 输入

    上传时间: 2013-12-27

    上传用户:jackgao

  • pashload是应用在linux下的网络带宽测试源程序精确度比较高 ///////////////////////////////////// Pathload is a tool for es

    pashload是应用在linux下的网络带宽测试源程序精确度比较高 ///////////////////////////////////// Pathload is a tool for estimating the available bandwidth of an end-to-end path from a host S (sender) to a host R (receiver). The available bandwidth is the maximum IP-layer throughput that a flow can get in the path from S to R, without reducing the rate of the rest of the traffic in the path.

    标签: pashload Pathload linux tool

    上传时间: 2016-06-29

    上传用户:xzt

  • FCP takes a file, generates a random 2048 bit key and encrypts the file with a RC4 stream cipher. T

    FCP takes a file, generates a random 2048 bit key and encrypts the file with a RC4 stream cipher. The encrypted file is written to a new file along with the decryption stub and key. When the output file is executed it decrypts and executes the encrypted file. It s written in Delphi 6, enjoy the source code.

    标签: file generates encrypts cipher

    上传时间: 2013-12-08

    上传用户:爺的气质

  • 一、用GA直接训练BP网络的权重算法 主程序:gafault.m 它包括以下子程序: 1. BP网络初始化:nninit.m――给出P

    一、用GA直接训练BP网络的权重算法 主程序:gafault.m 它包括以下子程序: 1. BP网络初始化:nninit.m――给出P,T,R,S1,S2; 2. 适应值计算函数:gabpEval.m; 3.将遗传算法的编码解码为BP网络所对应的权值、阈值函数:gadecod.m; 二、用GA先求BP网络的权重,再用纯BP直接训练BP的混合GA-BP算法 主程序:gabpfault.m 它包括以下子程序: 1. 网络初始化:nninit.m――给出P,T,R,S1,S2; 2. 适应值计算函数:gabpEval.m; 3.将遗传算法的编码解码为BP网络所对应的权值、阈值函数:gadecod.m; 三、纯BP   主程序:(1)bpfault.m 在MATLAB5.2上       (2)bpfault.m 在MATLAB6.5上 为后来所加

    标签: gafault nninit BP网络 程序

    上传时间: 2014-08-15

    上传用户:litianchu