← 思考的乐趣 课程讲义样例 · 堂前燕

思考的乐趣第一季第005课上:组合数的应用——几何计数课堂讲义

第1题:线段上的点 / Points on a Line

在一条线段上有五个点,如下图所示。连接两点可以组成多少条不同的线段?
There are five points on a straight line segment, as shown in the figure below. How many different segments can be formed by connecting two points?

让我们用三种方法来做这个题目。

  1. 考虑线段的长度,进行分类讨论
  2. 考虑线段的“起点”,从左到右进行分类讨论
  3. 考虑什么是“线段”本身

第2题:从一个顶点出发的三角形 / Triangles from a Common Vertex

下图中一共有多少个三角形?
How many triangles are there in the figure below?

想象我们要从这些线条中选出构成三角形的三个点。

  1. 每个三角形必须包含上方的那个顶点
  2. 我们需要从下方5个点中任意选两个,来和上方点组成三角形
  3. 从5个点中选2个的方法数是多少?

第3题:三层结构中的三角形(练习) / Triangles in a Three-Layer Structure

下图中一共有多少个三角形?
How many triangles are there in the figure below?

第4题:来自两条平行线的三角形 / Triangles from Two Parallel Lines

如图所示,有两条水平的平行线:上面一条线上有3个点,下面一条线上有4个点。
从这7个点中任选3个,问一共可以组成多少个不同的三角形?
As shown in the figure, there are two horizontal parallel lines. The upper line has 3 points, and the lower line has 4 points. How many different triangles can be formed by choosing any 3 points from these 7?

注意:不是任意三个点都能组成三角形。
Hint: Not every selection of three points forms a triangle.

  1. 思路1:三角形的三个顶点不能在同一条直线上,因此三个点只能两个点在一条线上,另一个点在另一条线上。找到所有的可能,加起来。
  2. 思路2:先计算随便选3个点能组成多少个三角形,然后减去不符合条件的情况,也就是三个点在同一条线上的情况。

第5题:升级版的平行线三角形问题(练习) / Extended Parallel Line Triangle Count

如图所示,有两条水平的平行线:上面一条线上有4个点,下面一条线上有5个点。
从这9个点中任选3个,问最多可以组成多少个不同的三角形?使用我们在上题中学习的两种思路解答。
As shown in the figure, two horizontal parallel lines contain 4 points on the top line and 5 points on the bottom line. How many different triangles can be formed by choosing any 3 of these 9 points? Answer using the two approaches we learned in the previous question.

什么时候加,什么时候乘? / When to Add, When to Multiply?

项目 / Item 加法原理 / Addition Principle 乘法原理 / Multiplication Principle
核心思想
Core Idea
若完成一件事有几种互斥的方法,总数为所有方式的和。
If a task can be done in one of several mutually exclusive ways, total = sum.
若完成一件事需要多个独立步骤,每步可独立选择,总数为所有方式的积。
If a task consists of independent steps, total = product.
适用情境
When to Use
多个情况中只有一种情况可以出现 多个情况可以先后出现或分步出现
数学表达
Math Expression
\( n = a + b \) \( n = a \times b \)
例子
Example
从 3 个红球或 5 个蓝球中选一个:
\( 3 + 5 = 8 \)
选 1 件上衣(4 种)和 1 条裤子(3 种):
\( 4 \times 3 = 12 \)

加法原理的思想我们已经在之前的章节中使用过了,比如枚举计数中每一个分支上的情况汇总在一起本质上就是加法原理。

乘法原理的思想我们在之前的章节中也使用过,比如在推导组合数和排列数的时候,7选3并排列可以分为3步:先选第1个,再选第2个,最后选第3个,然后得到 \(7\times6\times5\) 种方式本质上就是乘法原理。

“反向”计数的思想 / The Idea of Counting by Subtraction

有时候我们要计算某种情况的数量,直接算会很麻烦。这时候可以换个角度:先把“所有可能的情况”都算出来,再减去那些“不符合要求的情况”。这种方法专业术语叫做“补集计数”——也就是“总数减去不要的”,我们就得到了“我们要的”。但是目前我们还没有系统地学习集合知识,我们可以暂时称之为“反向计数”。

下面这幅图形象地展示了使用我们选点组成三角形的题目的思路:

  1. 先计算所有可能的情况 (简单)
  2. 再减去不符合要求的情况 (简单)
  3. 得到我们要的 (困难)
不能组成三角形的情况 可以组成三角形的情况

第6题:至少一个红球 / At Least One Red Ball

一个袋子里有 4 个红球和 4 个黑球。现在从中随机摸出 3 个球。
问:有多少种摸法可以使得这 3 个球中至少有一个红球
A bag contains 4 red balls and 4 black balls. If you randomly draw 3 balls, how many ways are there to get at least one red ball?

提示: 运用反向计数的思想。
点击展开答案 / Click to show answer

“至少一个红球”不好直接分类,但我们可以用“反向计数”的方法:
It’s hard to directly count all cases with at least one red ball. So let’s count the opposite — the number of ways to draw 3 balls with no red balls at all, and subtract that from the total.

步骤如下:

  1. 总共从 8 个球里选 3 个:\( C(8,3)\)
  2. 其中全是黑球的情况:从 4 个黑球里选 3 个:\( C(4,3) \)
  3. 至少一个红球的种数 = 总数 − 全是黑球的情况
  4. 即:\( C(8,3) - C(4,3) = 56 - 4 = 52 \)

第7题:至少有一个女生(练习) / At Least One Girl

某个俱乐部有 5 位男生和 3 位女生。从中任选 4 人组成一个小组。
问:有多少种分组方法可以让小组中至少有一个女生?
A club has 5 boys and 3 girls. A group of 4 people is to be formed. How many different groupings include at least one girl?

第8题:网格中的矩形 / Rectangles in a Grid

如图所示,一个 \(3 \times 2\) 的网格(3 列 2 行)由若干条横线与竖线组成。
问:在这个网格中,一共可以找到多少个不同的矩形(包括正方形)?
As shown in the figure, a \(3 \times 2\) grid consists of 3 columns and 2 rows. How many different rectangles (including squares) can be found in this grid?

仿照我们在第一题中的思路,可以用三种方法来计算这个题目。但是最后一种思路有明显的优势:思考什么是矩形的本质。
Following the approach in the first question, we can use three methods to solve this problem. But the last method has a clear advantage: think about the essence of a rectangle.

第9题:更大的网格(练习) / Rectangles in a Larger Grid

如图所示,这是一个 \(4 \times 3\) 的网格(4 列 3 行)。
问:在这个网格中,一共可以找到多少个不同的矩形(包括正方形)?
As shown in the figure, this is a \(4 \times 3\) grid (4 columns and 3 rows). How many different rectangles (including squares) can be found in this grid?

仍然采用“选两条横线 + 选两条竖线”来围出矩形。
– 横线有 4 条 → \( C(4,2) = 6 \)
– 竖线有 5 条 → \( C(5,2) = 10 \)

所以总矩形数为: \[ C(4,2)\times C(5,2) = 6 \times 10 = 60 \]

第10题:包含指定格子的矩形 / Rectangles Containing a Specific Cell

如图所示,在一个 \(4 \times 3\) 的网格中,第 2 行第 2 列的格子中放了一个爱心图案。
问:这个网格中,有多少个不同的矩形(包括正方形)包含这个爱心所在的格子?
In the \(4 \times 3\) grid shown, a heart symbol is placed in the cell at row 2, column 2. How many different rectangles (including squares) contain this cell?

思考:和之前的题目相比,唯一的区别就是我们的矩形的边不那么自由了。怎么个不自由法呢?

第11题:包含红心的矩形(练习) / Rectangles Containing the Red Heart (4×4 Grid)

如图所示,在一个 \(4 \times 4\) 的网格中,第 3 行第 2 列的格子中放置了一个红心。
问:在所有可能的矩形(包括正方形)中,有多少个矩形包含这个红心所在的格子?
In a \(4 \times 4\) grid, a red heart is placed in the cell at row 3, column 2. How many different rectangles (including squares) contain this cell?

第12题:包含两个红心的矩形 / Rectangles Containing Two Red Hearts

如图所示,在一个 \(4 \times 4\) 的网格中,第 3 行第 2 列和第 2 行第 1 列的两个格子中放置了红心。
问:一共有多少个不同的矩形(包括正方形)同时包含这两个红心格子?
In a \(4 \times 4\) grid, two red hearts are placed in cell (row 3, column 2) and cell (row 2, column 1). How many different rectangles (including squares) contain both of these cells?

先分别求出来包含两个红心各自对上下左右边的要求,再考虑要同时包括两个的话需要满足什么条件。

第13题:奇怪的三角形/ Counting Small Triangles within a Triangle

如图,我们有三组平行线,分别是2根,3根和4根。它们相交的交点形成了很多线段。请问,这些线段可以组成多少个三角形?
As shown in the figure, we have three sets of parallel lines, with 2, 3, and 4 lines respectively. The intersections of these lines form many line segments. How many triangles can be formed by these line segments?

提示:
三角形必然有三条边,这三条边从哪里来?
或者思考,三角形的三个顶点是怎么来的?

第14题:不规则五边网格 (练习)/ Irregular Pentagon Grid

如图所示,我们有5组平行线,分别是3根,3根,4根,2根和3根。它们相交的交点形成了很多线段。请问,这些线段可以组成多少个不规则五边形?
As shown in the figure, we have five sets of parallel lines, with 3, 3, 4, 2, and 3 lines respectively. The intersections of these lines form many line segments. How many irregular pentagons can be formed by these line segments?

思考:五边形必有5条边,这5条边从哪里来?
Think: A pentagon must have 5 edges. Where do these 5 edges come from?

第15题:思维定式不可取 / Avoid Fixed Mindsets

如图所示,这是一个标准的 \(4 \times 4\) 点阵,共有 16 个点,整齐排列在网格交点上。现在我们要从这些点中选择 4 个,作为矩形的 4 个顶点,构成一个矩形(包括正方形)。
问:最多可以组成多少个这样的矩形?

The diagram shows a standard \(4 \times 4\) grid of dots (16 in total), arranged in equal spacing. From these dots, we choose 4 to form the 4 vertices of a rectangle (including a square). How many rectangles can be formed at most?

思考:长方形一定要水平竖直吗?
Think: Must a rectangle be horizontal or vertical?

思维定式:有时是帮手,有时是陷阱

在解决问题的过程中,我们常常依赖熟悉的方法和套路,也就是所谓的“思维定式”。
它们可以帮助我们快速识别问题类型,节省思考时间,是非常有效的思维工具。

但也要注意:当问题发生变化、结构不同、条件被刻意隐藏时,思维定式反而可能变成“思维障碍”。
它让我们下意识地套用旧方法,而忽略了题目真正的结构与线索。

因此,我们在训练时要学会识别自己的惯性思路,一旦发现“套不进去”或“结果不合理”,就要敢于停下、重新观察问题。

✅ 用好思维定式,可以提高效率;
❌ 依赖思维定式,可能错过创造性思路。

本节英文单词

1. segment
中文释义: 线段,部分
Usage (English): A line segment connects two points directly.

2. triangle
中文释义: 三角形
Usage (English): A triangle is formed by connecting any three non-collinear points.

3. layer
中文释义: 层,层次
Usage (English): We analyzed the figure by separating it into layers of lines.

4. parallel
中文释义: 平行的
Usage (English): These two lines are parallel because they never intersect.

5. core
中文释义: 核心,中心部分
Usage (English): Understanding symmetry is at the core of this geometry problem.

6. at least
中文释义: 至少
Usage (English): You must choose at least one red ball from the bag.

7. heart
中文释义: 心,爱心图案,引申为中心位置
Usage (English): The heart is placed at the center of the grid.

8. pentagon
中文释义: 五边形
Usage (English): A regular pentagon has five equal sides and five equal angles.

9. fix (fixed)
中文释义: 固定的,不动的(在几何中)
Usage (English): One vertex is fixed while the others move along the circle.

10. mindset
中文释义: 思维方式,思维模式
Usage (English): A flexible mindset helps us see alternative solutions to a problem.