c pgm to find redundant paths in a graph.Many fault-tolerant network algorithms rely on an underlying assumption that there are possibly distinct network paths between a source-destination pair. Given a directed graph as input, write a program that uses depth-first search to determine all such paths. Note that, these paths are not vertex-disjoint i.e., the vertices may repeat but they are all edge-disjoint i.e., no two paths have the same edges. The input is the adjacency matrix of a directed acyclic graph and a pair(s) of source and destination vertices and the output should be the number of such disjoint paths and the paths themselves on separate lines. In case of multiple paths the output should be in order of paths with minimum vertices first. In case of tie the vertex number should be taken in consideration for ordering.
标签: fault-tolerant algorithms redundant underlyin
上传时间: 2013-12-18
上传用户:jkhjkh1982
垃圾文件清理: 垃圾文件清理: 垃圾文件清理 Clean Windows Programs: :rd_dir if " R:~-2,1 "=="\" set R=" R:~1,-2 " if not exist R goto :DD cd /d R for /f "delims=" a in ( dir/ad/b ) do rd /s /q " a" del /f /s /q * cdrd /s /q R :DD Clean Windows Programs: :rd_dir if " R:~-2,1 "=="\" set R=" R:~1,-2 " if not exist R goto :DD cd /d R for /f "delims=" a in ( dir/ad/b ) do rd /s /q " a" del /f /s /q * cdrd /s /q R :DD
标签: Programs Windows rd_dir Clean
上传时间: 2017-04-21
上传用户:lanhuaying
) Compression using huffman code -with a number of bits k per code word -provide huffman table Huffman coding is optimal for a symbol-by-symbol coding with a known input probability distribution.This technique uses a variable-length code table for encoding a source symbol. The table is derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol .Huffman coding uses a specific method for representing each symbol, resulting in a prefix code that expresses the most common characters using shorter strings of bits than those used for less common source symbols.The Huffman coding is a procedure to generate a binary code tree.
标签: code Compression huffman provide
上传时间: 2017-05-30
上传用户:yuchunhai1990
建立两个任务AB,A可以挂起B,同时也可以恢复B
标签:
上传时间: 2017-06-02
上传用户:han_zh
将魔王的语言抽象为人类的语言:魔王语言由以下两种规则由人的语言逐步抽象上去的:α-〉β1β2β3…βm ;θδ1δ2…-〉θδnθδn-1…θδ1 设大写字母表示魔王的语言,小写字母表示人的语言B-〉tAdA,A-〉sae,eg:B(ehnxgz)B解释为tsaedsaeezegexenehetsaedsae对应的话是:“天上一只鹅地上一只鹅鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅”。(t-天d-地s-上a-一只e-鹅z-追g-赶x-下n-蛋h-恨)
上传时间: 2013-12-19
上传用户:aix008
本代码为编码开关代码,编码开关也就是数字音响中的 360度旋转的数字音量以及显示器上用的(单键飞梭开 关)等类似鼠标滚轮的手动计数输入设备。 我使用的编码开关为5个引脚的,其中2个引脚为按下 转轮开关(也就相当于鼠标中键)。另外3个引脚用来 检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉 电阻,并且a,c需要分别对地接一个104的电容,否则 因为编码开关的触点抖动会引起轻微误动作。本程序不 使用定时器,不占用中断,不使用延时代码,并对每个 细分步数进行判断,避免一切误动作,性能超级稳定。 我使用的编码器是APLS的EC11B可以参照附件的时序图 编码器控制流水灯最能说明问题,下面是以一段流水 灯来演示。
上传时间: 2017-07-03
上传用户:gaojiao1999
【问题描述】 在一个N*N的点阵中,如N=4,你现在站在(1,1),出口在(4,4)。你可以通过上、下、左、右四种移动方法,在迷宫内行走,但是同一个位置不可以访问两次,亦不可以越界。表格最上面的一行加黑数字A[1..4]分别表示迷宫第I列中需要访问并仅可以访问的格子数。右边一行加下划线数字B[1..4]则表示迷宫第I行需要访问并仅可以访问的格子数。如图中带括号红色数字就是一条符合条件的路线。 给定N,A[1..N] B[1..N]。输出一条符合条件的路线,若无解,输出NO ANSWER。(使用U,D,L,R分别表示上、下、左、右。) 2 2 1 2 (4,4) 1 (2,3) (3,3) (4,3) 3 (1,2) (2,2) 2 (1,1) 1 【输入格式】 第一行是数m (n < 6 )。第二行有n个数,表示a[1]..a[n]。第三行有n个数,表示b[1]..b[n]。 【输出格式】 仅有一行。若有解则输出一条可行路线,否则输出“NO ANSWER”。
标签: 点阵
上传时间: 2014-06-21
上传用户:llandlu
利用随机数产生1000个0~100之间的考试分数,将其存入一个文本文件中,然后程序从这个文件中读取这1000个考试分数,统计其中各分数段(A[90,100],B[80,90), C[70,80), D[60,70), F[0,60))的人数 、所占百分比,平均分。
上传时间: 2014-01-19
上传用户:问题问题
RSA的最重要特色在于双密钥,它们有特殊的数学形式。RSA的一对密钥有三个基本参数:模n ,公钥b和私钥a 。n和b是公开的,发送信息方用私钥n加密消息,接受方用公钥b能得到解密后的信息,从而确定发送信息方的身份,这就构成了签名机制。对方用公钥将要发送的信息加密,只有拥有私钥的一方才能将信息解密。
上传时间: 2017-07-31
上传用户:JasonC
KMP字符串匹配的c实现,测试字符串为char a[20]="abcdefghijk" char b[20]="abcdefgg" 取各位数字的算法,最大有效测试数据长整形最N=100000000 贪婪算法:已知若干面值的人名币,如何找零钱,使张数最小,测试面值a[4]={25,10,5,1} 快速排序C++实现
上传时间: 2013-12-27
上传用户:z1191176801