多维多选择背包问题(MMKP)是0-1背包问题的延伸,背包核已经被用来设计解决背包问题的高效算法。目的是研究如何获得一种背包核,并以此高效处理多维多选择背包问题。首先给出了一种方法确定MMKP的核,然后阐述了利用核精确解决MMKP问题的B&B算法,列出了具体的算法步骤。在分析了算法的存储复杂度后,将算法在各种实例上的运行效果与目前解决MMKP问题的常用算法的运行效果进行了比较,发现本文的算法性能优于以往任何算法。
上传时间: 2013-11-20
上传用户:wangw7689
目录 第一章 传输线理论 一 传输线原理 二 微带传输线 三 微带传输线之不连续分析 第二章 被动组件之电感设计与分析 一 电感原理 二 电感结构与分析 三 电感设计与模拟 电感分析与量测
标签: 传输线
上传时间: 2013-11-21
上传用户:qb1993225
题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b这是条件运算符的基本例子。
上传时间: 2015-01-08
上传用户:lifangyuan12
RSA算法 :首先, 找出三个数, p, q, r, 其中 p, q 是两个相异的质数, r 是与 (p-1)(q-1) 互质的数...... p, q, r 这三个数便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 这个 m 一定存在, 因为 r 与 (p-1)(q-1) 互质, 用辗转相除法就可以得到了..... 再来, 计算 n = pq....... m, n 这两个数便是 public_key ,编码过程是, 若资料为 a, 将其看成是一个大整数, 假设 a < n.... 如果 a >= n 的话, 就将 a 表成 s 进位 (s
标签: person_key RSA 算法
上传时间: 2013-12-14
上传用户:zhuyibin
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
标签: government streamline important alphabet
上传时间: 2015-06-09
上传用户:weixiao99
电力系统在台稳定计算式电力系统不正常运行方式的一种计算。它的任务是已知电力系统某一正常运行状态和受到某种扰动,计算电力系统所有发电机能否同步运行 1运行说明: 请输入初始功率S0,形如a+bi 请输入无限大系统母线电压V0 请输入系统等值电抗矩阵B 矩阵B有以下元素组成的行矩阵 1正常运行时的系统直轴等值电抗Xd 2故障运行时的系统直轴等值电抗X d 3故障切除后的系统直轴等值电抗 请输入惯性时间常数Tj 请输入时段数N 请输入哪个时段发生故障Ni 请输入每时段间隔的时间dt
上传时间: 2015-06-13
上传用户:it男一枚
上下文无关文法(Context-Free Grammar, CFG)是一个4元组G=(V, T, S, P),其中,V和T是不相交的有限集,S∈V,P是一组有限的产生式规则集,形如A→α,其中A∈V,且α∈(V∪T)*。V的元素称为非终结符,T的元素称为终结符,S是一个特殊的非终结符,称为文法开始符。 设G=(V, T, S, P)是一个CFG,则G产生的语言是所有可由G产生的字符串组成的集合,即L(G)={x∈T* | Sx}。一个语言L是上下文无关语言(Context-Free Language, CFL),当且仅当存在一个CFG G,使得L=L(G)。 *⇒ 例如,设文法G:S→AB A→aA|a B→bB|b 则L(G)={a^nb^m | n,m>=1} 其中非终结符都是大写字母,开始符都是S,终结符都是小写字母。
标签: Context-Free Grammar CFG
上传时间: 2013-12-10
上传用户:gaojiao1999
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
*--- --- --- --声明--- --- --- -----*/ /* VC6.0下运行通过 此程序为本人苦心所做,请您在阅读的时候,尊重本人的 劳动。可以修改,但当做的每一处矫正或改进时,请将改进 方案,及修改部分发给本人 (修改部分请注名明:修改字样) Email: jink2005@sina.com QQ: 272576320 ——初稿完成:06-5-27 jink2005 补充: 程序存在问题: (1) follow集不能处理:U->xVyVz的情况 (2) 因本人偷懒,本程序为加入文法判断,故 输入的文法必须为LL(1)文法 (3) 您可以帮忙扩充:消除左递归,提取公因子等函数 (4) …… */ /*-----------------------------------------------*/ /*参考书《计算机编译原理——编译程序构造实践》 LL(1)语法分析,例1: ERTWF# +*()i# 文法G[E]:(按此格式输入) 1 E -> TR 2 R -> +TR 3 R -> 4 T -> FW 5 W -> * FW 6 W -> 7 F -> (E) 8 F -> i 分析例句:i*(i)# , i+i# 例2: 编译书5.6例题1 SHMA# adbe# S->aH H->aMd H->d M->Ab M-> A->aM A->e 分析例句:aaabd# */
上传时间: 2016-02-08
上传用户:ayfeixiao
汉诺塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C
标签: the animation Simulate movement
上传时间: 2017-02-11
上传用户:waizhang