⊂ 子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k)
计算从 n 个元素中取 k 个的子集数 C(n, k)(大整数精确值),以及全部子集数 2ⁿ、真子集数 2ⁿ − 1、至多 k 个和至少 k 个元素的子集数;输入具体元素时列出所有 k 元子集,或检验一个集合是否是另一个集合的子集。本地处理。Counts the subsets with k of n elements, C(n, k), exactly with big integers, plus all subsets 2ⁿ, proper subsets 2ⁿ − 1, and subsets with at most or at least k elements; with actual elements it lists every k-element subset, or tests whether one set is a subset of another. Processed locally.
使用说明与常见问题How-to & FAQ
「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」是什么?What is the Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) tool?
计算从 n 个元素中取 k 个的子集数 C(n, k)(大整数精确值),以及全部子集数 2ⁿ、真子集数 2ⁿ − 1、至多 k 个和至少 k 个元素的子集数;输入具体元素时列出所有 k 元子集,或检验一个集合是否是另一个集合的子集。本地处理。Counts the subsets with k of n elements, C(n, k), exactly with big integers, plus all subsets 2ⁿ, proper subsets 2ⁿ − 1, and subsets with at most or at least k elements; with actual elements it lists every k-element subset, or tests whether one set is a subset of another. Processed locally.
如何使用「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」?How do I use the Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) tool?
在「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」中,填写「用法」、「n」、「k」、「元素」、「集合 A」等参数,结果会随输入实时计算并显示在下方。In the Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k): Fill in "Use", "n", "k", "Elements", "Set A"; results are recalculated instantly as you type.
有哪些范围限制?What are the limits?
计数模式下 n 为 0–1000 的整数,k 为 0 到 n 的整数;列出模式最多 20 个不同元素(重复的只算一次),k 元子集不超过 2000 个时才逐个列出。In Count mode n is a whole number from 0 to 1000 and k a whole number from 0 to n. List mode takes up to 20 distinct elements (repeats count once) and lists the subsets only when there are at most 2000 of them.
有多少个 k 元子集?How many k-element subsets are there?
C(n, k) = n! ÷ (k!(n − k)!)。例如 10 个元素中取 3 个,有 120 个子集。C(n, k) = n! ÷ (k!(n − k)!). Choosing 3 of 10 elements gives 120 subsets.
子集和真子集有什么区别?What is the difference between a subset and a proper subset?
A ⊆ B 表示 A 的每个元素都在 B 中,A 可以等于 B;真子集 A ⊂ B 还要求 A ≠ B。n 个元素的集合有 2ⁿ 个子集、2ⁿ − 1 个真子集。A ⊆ B means every element of A is in B, and A may equal B; a proper subset A ⊂ B also needs A ≠ B. A set of n elements has 2ⁿ subsets and 2ⁿ − 1 proper subsets.
空集是子集吗?Is the empty set a subset?
是。空集是任何集合的子集,也算在 2ⁿ 之中(k = 0 时 C(n, 0) = 1)。Yes. The empty set is a subset of every set and is counted in 2ⁿ (C(n, 0) = 1 for k = 0).
能举个计算实例吗?Can you show a worked example?
例如在「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」中填 n = 10,k = 3,结果区显示:C(n,k):120For example, entering n = 10, k = 3 in the Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) gives: C(n,k): 120
哪些输入会被检查?Which inputs are validated?
「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」会检查这些输入——「n」:所选方式用到时必须填写,须为 0–1000 的整数;「k」:所选方式用到时必须填写,须为 0 到 n(列出模式下为元素个数)之间的整数;绝对值超过 10¹⁵ 的数也会被拒绝。不符合时结果区显示具体提示,不会给出数字。The Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) checks its inputs — "n": required when the chosen option uses it, must be a whole number from 0 to 1000; "k": required when the chosen option uses it, must be a whole number from 0 to n (the number of elements in List mode); numbers above 10¹⁵ in absolute value are rejected too. When a value fails, the result area names the problem instead of showing a number.
有哪些选项可以调整?What options can I adjust?
「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」的设置:「用法」可选 计数、列出 k 元子集、检验 A ⊆ B(默认 计数);「n」默认 10;「k」默认 3;「元素」默认 a b c d;「集合 A」默认 1 2;「集合 B」默认 1 2 3。每次生成结果都按当前设置处理。Settings in the Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) — "Use": Count, List k-element subsets, Test A ⊆ B (default Count); "n" default 10; "k" default 3; "Elements" default a b c d; "Set A" default 1 2; "Set B" default 1 2 3. The result always uses the current settings.
计算精度如何?How precise are the results?
「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」使用 JavaScript 双精度浮点数(约 15–16 位有效数字),部分功能使用 BigInt 处理大整数。The Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) uses double-precision floating point (about 15–16 significant digits); some features use BigInt for large integers.
「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」免费吗?需要注册吗?Is the Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) free? Do I need an account?
「子集计算器(C(n,k) 计数、列出子集、真子集、至多/至少 k 个)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Subset Calculator (Count C(n,k), List Subsets, Proper Subsets, At Most or At Least k) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.