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個不同子序列,從而窮舉搜索法需要指數時間。
上傳時間: 2015-06-09
上傳用戶:氣溫達上千萬的
c語言版的多項式曲線擬合。 用最小二乘法進行曲線擬合. 用p-1 次多項式進行擬合,p<= 10 x,y 的第0個域x[0],y[0],沒有用,有效數據從x[1],y[1] 開始 nNodeNum,有效數據節點的個數。 b,為輸出的多項式系數,b[i] 為b[i-1]次項。b[0],沒有用。 b,有10個元素ok。
上傳時間: 2014-01-12
上傳用戶:變形金剛
MantisChess -- A Chinese Chess Program Copyright (C) Chen Chengtao, China This program is free software you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 2 of the License, or (at your option) any later version.
標簽: MantisChess Copyright Chengtao Chinese
上傳時間: 2015-06-22
上傳用戶:蟲蟲蟲蟲蟲蟲
剖析Intel IA32 架構下C 語言及CPU 浮點數機制 Version 0.01 哈爾濱工業大學 謝煜波 (email: xieyubo@126.com 網址:http://purec.binghua.com) (QQ:13916830 哈工大紫丁香BBSID:iamxiaohan) 前言 這兩天翻看一本C 語言書的時候,發現上面有一段這樣寫到 例:將同一實型數分別賦值給單精度實型和雙精度實型,然后打印輸出。 #include <stdio.h> main() { float a double b a = 123456.789e4 b = 123456.789e4 printf(“%f\n%f\n”,a,b) } 運行結果如下:
標簽: Version xieyubo Intel email
上傳時間: 2013-12-25
上傳用戶:徐孺
本書第二部分講述的是在Wi n 3 2平臺上的Wi n s o c k編程。對于眾多的基層網絡協議, Wi n s o c k是訪問它們的首選接口。而且在每個Wi n 3 2平臺上,Wi n s o c k都以不同的形式存在著。 Wi n s o c k是網絡編程接口,而不是協議。它從U n i x平臺的B e r k e l e y(B S D)套接字方案借鑒了 許多東西,后者能訪問多種網絡協議。在Wi n 3 2環境中,Wi n s o c k接口最終成為一個真正的 “與協議無關”接口,尤其是在Winsock 2發布之后。
上傳時間: 2015-07-08
上傳用戶:thinode
空間后方交匯求解相機外方位元素,變量如下 % x,y 控制點像點坐標 % X,Y,Z 控制點空間坐標 %f焦距 %X0,Y0,Z0,a,b,c六個外方位元素 %x0,y0,-f內方位元素:光心坐標 %cha,chb,chc:外方位角元素改正數 %count 記錄迭代次數 %R 旋轉矩陣 %A 線性化的偏導系數矩陣 %L 常數項矩陣 %M0 外方位元素矩陣 %M1 外方位元素改正數矩陣
上傳時間: 2014-01-10
上傳用戶:saharawalker
* 本算法用最小二乘法依據指定的M個基函數及N個已知數據進行曲線擬和 * 輸入: m--已知數據點的個數M * f--M維基函數向量 * n--已知數據點的個數N-1 * x--已知數據點第一坐標的N維列向量 * y--已知數據點第二坐標的N維列向量 * a--無用 * 輸出: 函數返回值為曲線擬和的均方誤差 * a為用基函數進行曲線擬和的系數, * 即a[0]f[0]+a[1]f[1]+...+a[M]f[M].
上傳時間: 2015-07-26
上傳用戶:
This section contains a brief introduction to the C language. It is intended as a tutorial on the language, and aims at getting a reader new to C started as quickly as possible. It is certainly not intended as a substitute for any of the numerous textbooks on C. 2. write a recursive function FIB (n) to find out the nth element in theFibanocci sequence number which is 1,1,2,3,5,8,13,21,34,55,…3. write the prefix and postfix form of the following infix expressiona + b – c / d + e * f – g * h / i ^ j4. write a function to count the number of nodes in a binary tr
標簽: introduction the contains intended
上傳時間: 2013-12-23
上傳用戶:liansi
中文名:Windows Forms 程序設計 英文名:Windows Forms Programming in c# 作者: Chris Sells 翻譯: 榮耀 蔣賢哲 出版社:人民郵電出版社 代碼內容: The Table of Contents * Foreword * Preface * Chapter 1 Hello, Windows Forms * Chapter 2 Forms * Chapter 3 Dialogs * Chapter 4 Layout * Chapter 5 Drawing Basics * Chapter 6 Drawing Text * Chapter 7 Advanced Drawing * Chapter 8 Printing * Chapter 9 Components * Chapter 10 Controls * Chapter 11 Design-Time Integration: The Properties Window * Chapter 12 Design-Time Integration: Designers and Smart Tags * Chapter 13 Resources * Chapter 14 Applications * Chapter 15 Settings * Chapter 16 Data Binding Basics * Chapter 17 Applied Data Binding * Chapter 18 Multithreaded User Interfaces * Chapter 19 ClickOnce Deployment * Appendix A Whats New in Windows Forms 2.0 * Appendix C Delegates and Events * Appendix D Component and Control Survey * Appendix E Drag and Drop * Appendix F Document Management * Bibliography * Index
標簽: Windows Forms Programming Chris
上傳時間: 2013-12-03
上傳用戶:啊颯颯大師的
摘 要: 本文件是C8051單片機DA測試實驗程序;使用外部22.1184MHz晶振. 功能:定義 A ~ F 為功能鍵。 按"A" 鍵,輸出250HZ的方波,按"B" 鍵,輸出250HZ的正弦波形,按"C" 鍵,輸出250HZ的三角波, 按"D" 鍵,輸出250HZ的鋸齒波。用示波器在J6(DAC0)觀測結果,使用串口觀測按鍵信息。
上傳時間: 2014-01-17
上傳用戶:zxc23456789