—图数据类型的实现——问题描述:图是一种较线性表和树更为复杂的数据结构。在图形结构中,结点之间的关系是任意的,任意两个数据元素之间都可能相关,因此,图的应用非常广泛,已渗入到诸如语言学‘逻辑学、物理、化学、电讯工程、计算机科学及数学的其它分支中。因此,实现图这种数据类型也尤为重要,在该练习中即要实现图的抽象数据类型。基本要求:2、 定义出图的ADT;3、 采用邻接矩阵及邻接表的存储结构(有向图也可使用十字链表)实现以下操作:a. 构造图 b. 销毁图 c. 定位操作d. 访问图中某个顶点的操作e. 给图中某个顶点赋值的操作f. 找图中某个顶点的第一个邻接点g. 找出图G中顶点v相对于w的下一个邻接点h. 在图G中添加新顶点vi. 删除图G中顶点vj. 在图G中插入一条边k. 在图G中删除一条边l. 实现图的深度遍历操作m. 实现图的广度遍历操作参考提示:具体内容参看教科书本156页实验要求:对于以上具体操作要求实现时有良好的用户交互界面。详细设计、编码、测试。
上传时间: 2015-03-13
上传用户:saharawalker
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
按递归下降方式设计其编译程序,生成PL/0栈式指令代码,然后解释执行。用(a=1)+2*(b=3+4*5)/2+2*a*b-(a=a+5)/ (c=2) 测试
上传时间: 2014-01-02
上传用户:firstbyte
这个程序可以扫描出来本机IP地址的版本号和类别,是IPV6还是IPV4,是A类还是B类还是C类
上传时间: 2015-03-27
上传用户:星仔
prolog 找路例子程序: === === === === === === Part 1-Adding connections Part 2-Simple Path example | ?- path1(a,b,P,T). will produce the response: T = 15 P = [a,b] ? Part 3 - Non-repeating path As an example, the query: ?- path2(a,h,P,T). will succeed and may produce the bindings: P = [a,depot,b,d,e,f,h] T = 155 Part 4 - Generating a path below a cost threshold As an example, the query: ?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300). returns: RS = [a,b,depot,c,d,e,g,f,h] ? RS = [a,c,depot,b,d,e,g,f,h] ? no ==================================
标签: Part connections example prolog
上传时间: 2015-04-24
上传用户:ljt101007
装备盒问题。 大意是给出一个矩形地板,你有一个底面为矩形的盒子必须放在上面而不超过地板边界。 现在给出地板的长(X)和宽(Y),以及盒子的长(a)和宽(b),问是否可能达到要求(即放上去不超过边界)
标签: 矩形
上传时间: 2015-04-28
上传用户:gundamwzc
5 ledblink -- 跑马灯程序 该项目在SDT2.51下编译调试。最简单的demo程序,运行后3个发光二极管轮流点亮。 6 timerint -- 定时器中断demo程序 该项目在SDT2.51下编译调试。将子目录timerint拷贝到c:\ 下。 该demo程序的主程序是while空循环,定时器中断服务程序每500ms将3个LED反相。 在57600超级终端里也可以看到中断发生时的信息。 7 uart -- 串口测试程序 该项目在SDT2.51下编译调试。运行后在57600的超级终端里等待PC键盘的输入,当按下 a 或 b 或 c 按键时,超级终端里将显示 You Pressed a ,You Pressed b ,You Pressed c .
上传时间: 2015-05-05
上传用户:aix008
二分图是一个无向图,它的n 个顶点可二分为集合A和集合B,且同一集合中的任意两个顶点在图中无边相连(即任何一条边都是一个顶点在集合A中,另一个在集合B中)。当且仅当B中的每个顶点至少与A中一个顶点相连时,A的一个子集A 覆盖集合B(或简单地说,A 是一个覆盖)。覆盖A 的大小即为A 中的顶点数目。当且仅当A 是覆盖B的子集中最小的时,A 为最小覆盖。
上传时间: 2015-05-07
上传用户:alan-ee
十部经典算法合集 .chm Fundamentals of Data Structures by Ellis Horowitz and Sartaj Sahni PREFACE CHAPTER 1: INTRODUCTION CHAPTER 2: ARRAYS CHAPTER 3: STACKS AND QUEUES CHAPTER 4: LINKED LISTS CHAPTER 5: TREES CHAPTER 6: GRAPHS CHAPTER 7: INTERNAL SORTING CHAPTER 8: EXTERNAL SORTING CHAPTER 9: SYMBOL TABLES CHAPTER 10: FILES APPENDIX A: SPARKS APPENDIX B: ETHICAL CODE IN INFORMATION PROCESSING APPENDIX C: ALGORITHM INDEX BY CHAPTER
标签: Fundamentals Structures Horowitz PREFACE
上传时间: 2015-05-19
上传用户:维子哥哥
MFC Black Book Introduction: Are you an MFC programmer? Good. There are two types of MFC programmers. What kind are you? The first kind are the good programmers who write programs that conform to the way MFC wants you to do things. The second bunch are wild-eyed anarchists who insist on getting things done their way. Me, I’m in the second group. If you are in the same boat (or would like to be) this book is for you. This book won’t teach you MFC—not in the traditional sense. You should pick it up with a good understanding of basic MFC programming and a desire to do things differently. This isn’t a Scribble tutorial (although I will review some fundamentals in the first chapter). You will learn how to wring every drop from your MFC programs. You’ll discover how to use, abuse, and abandon the document/view architecture. If you’ve ever wanted custom archives, you’ll find that, too.
标签: MFC Introduction programmer programme
上传时间: 2015-05-30
上传用户:youke111