← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 3719

子集和要求精确求和

理解等级:初级

子集和问题给定正整数集合S和目标t,问能否选出一个子集使其元素之和恰为t。

它是判定问题;集合本身可作为证书,通过加总核验。

输入整数按二进制编码,复杂度应按位数而非数值大小衡量。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第34章 NP完全性 · 查看原书依据

      The subset-sum problem takes as inputs a finite set S of positive integers and an integer target t > 0. It asks whether there exists a subset S′ ⊆ S whose elements sum to exactly t. For example, if S = {1, 2, 7, 14, 49, 98, 343, 686, 2409, 2793, 16808, 17206, 117705, 117993} and t = 138457, then the subset S′ = {1, 2, 7, 98, 343, 686, 2409,

    参考来源

    - 位置:《算法导论(第4版)》第34章《NP完全性》(OEBPS/chapter034.xhtml,文本字符[105000,110000))。 - 结论依据:第34章原文中的定义、规模界及双向归约证明;涉及图34.17–34.19时已核对图像。 - 原始内容:The subset-sum problem takes as inputs a finite set S of positive integers and an integer target t > 0. It asks whether there exists a subset S ′ ⊆ S whose elements sum to exactly t . For example, if S = {1, 2, 7, 14, 49, 98, 343, 686, 2409, 2793, 16808, 17206, 117705, 117993} and t = 138457, then the subset S ′ = {1, 2, 7, 98, 343, 686, 2409,