Movatterモバイル変換


[0]ホーム

URL:


登录/注册
下载豆瓣客户端
豆瓣6.0 全新发布×

豆瓣

扫码直接下载

iPhone·Android
豆瓣读书
搜索:

《算法导论(原书第3版)》的原文摘录

  • 动态规划算法的设计可以分为如下四个步骤:1 描述最优解的结构。2 递归定义最优解的值。3 按自底向上的方式计算最优解的值。4 由计算出的结果构造一个最优解。 (查看原文)
    silentsongs1回复4赞2012-11-13 18:32:29
    —— 引自第192页
  • 在最好的情况下,k=0,因此s'=s+q,并且立刻能得出偏移s+1,s+2,s+3,…s+q-1。 (查看原文)
    GilGaMesh6回复3赞2013-01-23 20:05:10
    —— 引自第589页
  • In the best case, k=0,so that s‘=s+q, and we immediately rule out shifts s+1,s +2;...,s+q-1. (查看原文)
    GilGaMesh6回复3赞2013-01-23 20:05:10
    —— 引自第589页
  • 即π[q]是Pq的真后缀P的最长前缀长度。 (查看原文)
    GilGaMesh6回复3赞2013-01-23 20:05:10
    —— 引自第589页
  • π[q] is the length of the longest prefix of P that is a proper suffix of Pq. (查看原文)
    GilGaMesh6回复3赞2013-01-23 20:05:10
    —— 引自第589页
  • 考虑对数组A中的n个数进行排序:首先找出A中的最小元素,并将其与A[1]中的元素进行交换。接着找出A中的次小元素,并将其与A[2]中的元素进行交换。对A中头n-1个元素继续这一过程。写出这个算法的伪代码,该算法称为选择排序(selection sort)。对这个算法来说,循环不变式是什么?为什么它仅需要在头n-1个元素上运行,而不是在所有n个元素上运行?以Θ形式写出选择排序的最佳和最坏情况下的运行时间。 (查看原文)
    龙三2013-01-30 11:02:26
    —— 引自第24页
  • 如果一个节点是红的,则它的两个儿子都是黑的。 (查看原文)
    栗子先生1赞2013-04-21 16:40:10
    —— 引自第164页
  • 如果一个节点是红的,那它的父亲一定是黑的 (查看原文)
    栗子先生1赞2013-04-21 16:40:10
    —— 引自第164页
  • 红黑树的节点至少是红黑相间 (查看原文)
    栗子先生1赞2013-04-21 16:40:10
    —— 引自第164页
  • 作为《算法导论》的作者之一,我肯定有偏爱。所以我只给出客观的理由,让其他人发表意见。1· 尺寸。该书共有1312页(包括封面),涵盖了广泛的主题和技术。2· 久经考验。该书于1990年首次出版,目前已是第三版,第四版正在进行中(注: 已经出版)。3· 严格。在数学上是严格的。一些性质留作练习(我们必须给学生一些事情做),但我们在数学上不遗余力。 (诚然,一些读者觉得数学令人厌烦。重点是我们支持我们的主张,而不是指指点点。)4· 价格。您不会以如此低的价格找到许多1300+页的精装教科书。5· 负重训练。随身携带算法简介可以增强你的肌肉。好吧,第5条是个玩笑,但其他原因都是严肃且真实的。 (查看原文)
    全神贯注1赞2024-05-28 09:57:37
    —— 引自章节:出版者的话
  • We can easily make each of them run in time O using ordinary binary heaps. By using Fibonacci heaps, Prim’s algorithm runs in time O(E+VlgV ), improves over the binary-heap implementation if |V| is much smaller than |E|. (查看原文)
    Smile2019-12-05 22:45:52
    —— 引自第624页
  • HEAPSORT(A) 1 BUILD-MAX-HEAP(A) 2 fori=A. length downto 2 3 exchange A[1] with A[i] 4 A.heap-size= A.heap-size-1 5 MAX-HEAPIFY(A, 1)图6-4给出了一个在 HIEAPSORT的第1行建立初始最大堆之后,堆排序操作的一个例子图6-4显示了第2~5行for循环第一次迭代开始前最大堆的情况和每一次送代之后最大堆的情况HEAPSORT过程的时间复杂度是O(nlgn),因为每次调用 BUILD-MAX- HEAP的时间复杂度是O(n),而nー1次调用MAX- HIEAPIEY,每次的时间为O(lgn)。 (查看原文)
    Smile2019-12-17 00:40:41
    —— 引自第89页
  • 在程序的每一步中,从A[i]、 A[LEFT(i)和A[RIGHT(i)]中选出最大的,并将其下标存储在largest中。如果A[i]是最大,那么以i为结点的子树已经是最大堆,程序结束。否则,最大元素是的某个孩子结点,则交换[i]和原来的A[largest]的值。从而使i及其孩子都满足最大堆的性质。在交換,下标为 largest的结点的值是原来的A[i],于是以该结点为根的子树又有可能会违反最大堆的性质。因此,需要对该子递归调用MAX- HEAPIFY。 (查看原文)
    Smile2019-12-17 00:40:41
    —— 引自第86页
  • divide-and-conquer algorithms partition the problem into disjoint subproblems,solve the subproblems recursively, and then combine their solutions to solvethe original problem. In contrast, dynamic programming applies when the subproblemsoverlap—that is, when subproblems share subsubproblems. (查看原文)
    CX2011-03-16 19:27:13
    —— 引自第359页
  • 所谓算法,就是良好定义的计算过程,它取一个或一组值作为输入,并产生出一个或一组值作为输出。 (查看原文)
    大众米线2011-10-07 21:52:46
    —— 引自第3页
  • Formost of this book, we shall assume a generic one-processor, random-access machine (RAM)model of computation as our implementation technology and understand that our algorithmswill be implemented as computer programs. In the RAM model, instructions are executed oneafter another, with no concurrent operations. (查看原文)
    ?..2012-03-19 21:22:18
    —— 引自第23页
  • INSERTION-SORT(A) cost times1 for j ← 2 to length[A] c1 n ##这个不是N-1吗??????????????????2 do key ← A[j] c2 n - 13 ▹ Insert A[j] into the sortedsequence A[1 j - 1]. 0 n - 14 i ← j - 1 c4 n - 15 while i > 0 and A[i] > key c56 do A[i + 1] ← A[i] c67 i ← i - 1 c78 A[i + 1] ← key c8 n - 1 (查看原文)
    ?..2012-03-20 20:02:01
    —— 引自第25页
  • The bug in the argument is that the "constant" hidden by the "big-oh" grows with n and thus isnot constant. We have not shown that the same constant works for all n. (查看原文)
    ?..2012-03-20 20:05:55
    —— 引自第925页
  • The ratio of the (k + 1)st and kth terms in this series is k/(k + 1) < 1, but the series is notbounded by a decreasing geometric series. To bound a series by a geometric series, one mustshow that there is an r < 1, which is a constant, such that the ratio of all pairs of consecutiveterms never exceeds r. In the harmonic series, no such r exists because the ratio becomesarbitrarily close to 1. (查看原文)
    ?..2012-03-20 20:09:37
    —— 引自第926页
  • The total number of levels of the "recursion tree" in Figure 2.5 is lg n + 1. This fact is easilyseen by an informal inductive argument. The base case occurs when n = 1, in which case thereis only one level. Since lg 1 = 0, we have that lg n + 1 gives the correct number of levels.Now assume as an inductive hypothesis that the number of levels of a recursion tree for 2inodes is lg 2i + 1 = i + 1 (since for any value of i, we have that lg 2i = i). Because we areassuming that the original input size is a power of 2, the next input size to consider is 2i+1. Atree with 2i+1 nodes has one more level than a tree of 2i nodes, and so the total number oflevels is (i + 1) + 1 = lg 2i+1 + 1. (查看原文)
    ?..2012-03-21 20:29:20
    —— 引自第35页
<前页12345后页>

>我来写笔记

>算法导论(原书第3版)

算法导论(原书第3版)
作者: Thomas H.Cormen, Charles E.Leiserson, Ronald L.Rivest, Clifford Stein
原作名: Introduction to Algorithms, Third Edition
isbn: 7111407016
书名: 算法导论(原书第3版)
页数: 780
出品方: 华章IT
译者:殷建平,徐云,王刚,刘晓光,苏明,邹恒明,王宏志
定价: 128.00元
出版社: 机械工业出版社
出版年: 2012-12
装帧: 平装
© 2005-2025 douban.com, all rights reserved 北京豆网科技有限公司关于豆瓣 ·在豆瓣工作 ·联系我们 ·法律声明 ·帮助中心 ·图书馆合作 ·移动应用

[8]ページ先頭

©2009-2025 Movatter.jp