Lompat ke konten

GAC024 Matematika Diskrit

GAC Matematika Topik 4 12:39 Narasi bahasa Inggris · takarir bahasa Inggris dan 中文 yang dapat dipilih

spasi putar · ←/→ 5d · j/l 10d · f layar penuh · c takarir · ,/. kecepatan

Bab-bab

Transkrip
In 1736 the people of Königsberg asked Leonhard Euler a puzzle: could anyone walk through their city crossing each of its seven bridges exactly once? 1736 年,柯尼斯堡的居民向莱昂哈德·欧拉提出了一个难题:有没有人能在城中行走,恰好经过每一座桥一次,走遍全部七座桥?
Euler replaced the land with points and the bridges with lines, and proved that no such walk exists: a walk that uses every line once can have at most two points with an odd number of lines, and Königsberg had four. 欧拉用点代替陆地,用线代替桥梁,并证明了不存在这样的走法:每条线恰好经过一次的路线中,连接奇数条线的点最多只能有两个,而柯尼斯堡有四个。
With that proof he started graph theory, the mathematics behind metro maps, satellite navigation and the internet. 凭借这一证明,他开创了图论,也就是地铁线路图、卫星导航和互联网背后的数学。
Discrete mathematics is the study of separate, countable things: sets, digits, logic, step-by-step procedures and networks. 离散数学研究的是分离、可数的事物:集合、数字、逻辑、分步程序和网络。
GAC024 covers sets, counting systems, binary logic, algorithms and networks. GAC024 涵盖集合、计数系统、二进制逻辑、算法和网络。
Your centre sets the assessment tasks, their weights and the tools you may use. 你的教学中心确定评估任务、权重以及你可以使用的工具。
In this module you will: Before solving, state the universe of a set problem, the number of bits in a binary one, or the edge weights in a network. 在本模块中,你将学习:解题前,说明集合问题的全集、二进制问题的位数或网络中的边权。
use sets, Venn diagrams, relations and functions; convert between decimal, binary and hexadecimal; use Boolean logic, truth tables and logic gates; 使用集合、维恩图、关系和函数;在十进制、二进制和十六进制之间进行转换;使用布尔逻辑、真值表和逻辑门;
trace algorithms and compare their efficiency; model problems with graphs and find shortest paths. 追踪算法并比较其效率;用图对问题建模并求最短路径。
The inclusion-exclusion principle subtracts the twice-counted overlap once: |Acup B|=|A|+|B|-|Acap B|. 容斥原理把被计算了两次的重叠部分减去一次:|Acup B|=|A|+|B|-|Acap B|。
Worked example. 例题。
subtract an overlap only once Known: 30 learners, 18 study French, 15 German, and 7 both. 重叠部分只减去一次,已知:30 名学习者中,18 人学法语,15 人学德语,7 人两种都学。
The overlap is included in both subject totals. 重叠部分包含在两个学科的人数中。
French-only is 18-7=11 and German-only 15-7=8. 只学法语的有 18-7=11 人,只学德语的有 15-7=8 人。
The four disjoint regions sum to 30. 四个互不重叠的区域合计为 30 人。
Practice sheet 4.1 gives a progressively harder set with worked solutions. 练习单 4.1 提供了一组难度逐渐增加的题目及详细解答。
A set is a collection of distinct objects. 集合是不同对象组成的整体。
Order and repetition do not matter. 顺序和重复都不影响集合。
Union A cup B is everything in either; intersection A cap B is what is in both; the set complement is everything in the stated universe but outside the set. 并集 A cup B 包含属于任一集合的所有元素;交集 A cap B 包含同时属于两个集合的元素;集合的补集包含指定全集中不属于该集合的所有元素。
A subset has all its elements inside another set. 子集的所有元素都属于另一个集合。
A relation pairs elements of two sets. 关系将两个集合的元素配对。
A function is a relation in which each input has exactly one output. 函数是一种关系,其中每个输入恰好对应一个输出。
"Each student → their birthday" is a function (two students may share a birthday); "each birthday → the students born on it" is not, because one input can have several outputs. “每个学生 → 其生日”是函数,两个学生可以有相同的生日;“每个生日 → 当天出生的学生”不是函数,因为一个输入可以有多个输出。
A Venn diagram, introduced by the English logician John Venn in 1880, turns a set problem into a picture. 维恩图由英国逻辑学家约翰·维恩于 1880 年提出,它把集合问题转化为图像。
Check that the regions add up to the total. 检查各区域的数量相加是否等于总数。
A class universe of 30 is divided into French-only 11, both 7, German-only 8 and neither 4. 一个有 30 人的班级全集分为只学法语的 11 人、两种都学的 7 人、只学德语的 8 人和两种都不学的 4 人。
Match each part of the diagram to the text. 将图中的各部分与文字匹配。
With n bits you can store the whole numbers 0 to 2^n - 1. 用 n 位可以存储从 0 到 2^n - 1 的整数。
An IPv4 internet address has 32 bits, so there are 2^32 approximately 4.3 billion addresses, which is why the world ran out of them in 2011 and moved to 128-bit IPv6. 一个 IPv4 互联网地址有 32 位,因此共有 2^32 approximately 4.3 billion 个地址,这就是全球在 2011 年用尽这些地址并转向 128-bit IPv6 的原因。
If a sum needs more bits than are available, the extra carry is lost (overflow). 如果一个和需要的位数超过可用位数,多余的进位就会丢失,这称为溢出。
Worked example. 例题。
place weights determine the decimal value Known numeral 1101_2. 位权决定十进制值,已知数码 1101_2。
Use weights from right to left: 1, 2, 4 and 8. 从右到左使用位权:1、2、4 和 8。
The same value is D in hexadecimal, because 13 = 8 + 4 + 1 and D stands for 13. 相同的值在十六进制中是 D,因为 13 = 8 + 4 + 1,而 D 代表 13。
Practice sheet 4.2 gives a progressively harder set with worked solutions. 练习单 4.2 提供了一组难度逐渐增加的题目及详细解答。
A number base b uses the digits 0 to b - 1, and each place is worth a power of b. 基数为 b 的数制使用从 0 到 b - 1 的数字,每一位的位权都是 b 的一个幂。
Decimal uses ten, binary two, hexadecimal sixteen (digits 0–9 then A–F). 十进制使用十个数字,二进制使用两个,十六进制使用十六个,数字为 0–9,接着是 A–F。
Every digit's value is its place value: in binary the places are 1, 2, 4, 8, 16 and so on. 每个数字的值由它所在的数位决定:二进制的位权是 1、2、4、8、16,依此类推。
Hexadecimal is shorthand for binary: one hex digit is exactly four bits. 十六进制是二进制的简写:一个十六进制数字恰好对应四个二进制位。
Web colours use it: #FF8000 means red 255, green 128, blue 0, a bright orange. 网页颜色使用十六进制:#FF8000 表示红色 255、绿色 128、蓝色 0,是一种鲜橙色。
The binary digits 1101 are aligned with place weights 8, 4, 2 and 1. 二进制数字 1101 与位权 8、4、2 和 1 对齐。
Match each part of the diagram to the text. 将图中的各部分与文字匹配。
OR is inclusive: it is true when either or both inputs are true. OR 是包含性的:当任一输入或两个输入都为真时,它为真。
De Morgan's laws give neg (Aland B)=(neg A)lor (neg B) and neg (Alor B)=(neg A)land (neg B): negating a bracket flips each part and swaps AND with OR. 德摩根定律给出 neg (Aland B)=(neg A)lor (neg B) 和 neg (Alor B)=(neg A)land (neg B):对括号取反会使每个部分取反,并将 AND 与 OR 互换。
Worked example. 例题。
an OR output is inverted by NOT Known: Y=neg (Alor B). OR 的输出由 NOT 取反,已知:Y=neg (Alor B)。
Inclusive OR is false only when both inputs are false; NOT reverses that result. 包含性 OR 仅在两个输入都为假时为假;NOT 将该结果取反。
In row order (A,B)=(0,0),(0,1),(1,0),(1,1), the output column is 1, 0, 0, 0. 按行顺序 (A,B)=(0,0),(0,1),(1,0),(1,1),输出列为 1、0、0、0。
De Morgan gives equivalent expression (neg A)land (neg B). 根据德摩根定律,等价表达式为 (neg A)land (neg B)。
Practice sheet 4.3 gives a progressively harder set with worked solutions. 练习单 4.3 提供了一组难度逐渐增加的题目及详细解答。
Binary arithmetic adds like decimal, carrying at 2 instead of at 10. 二进制加法与十进制类似,只是在 2 而不是 10 时进位。
A bit is one binary digit; a byte is eight. 一个比特是一个二进制位;一个字节是八位。
Boolean algebra works on true and false with AND, OR and NOT. 布尔代数使用 AND、OR 和 NOT 对真值和假值进行运算。
A truth table lists every combination of inputs and the output for each. 真值表列出每一种输入组合以及对应的输出。
Two expressions are equivalent if their truth tables match in every row. 如果两个表达式的真值表在每一行都相同,它们就是等价的。
Logic gates carry out these operations in electronics, and a logic circuit connects them. 逻辑门在电子电路中执行这些运算,逻辑电路将它们连接起来。
George Boole published his algebra of logic in 1854; in 1937 Claude Shannon showed that it describes switching circuits exactly, which is the basis of every digital computer. 乔治·布尔于 1854 年发表了他的逻辑代数;1937 年,克劳德·香农证明它能精确描述开关电路,这成为所有数字计算机的基础。
Inputs A and B enter an OR-labelled block, whose output enters a NOT-labelled block to give Y. 输入 A 和 B 进入一个标有 OR 的方框,其输出进入一个标有 NOT 的方框,得到 Y。
Match each part of the diagram to the text. 将图中的各部分与文字匹配。
Worked example. 例题。
repeat a remainder step until the second number is zero This is Euclid's algorithm for the highest common factor, written down around 300 BCE and still used in computer cryptography. 重复求余步骤,直到第二个数为零,这是求最大公因数的欧几里得算法,约在公元前 300 年被记录下来,至今仍用于计算机密码学。
Start with a = 10 and b = 6. 从 a = 10 和 b = 6 开始。
While b ne 0: set r = a bmod b, then a = b and b = r. 当 b ne 0 时:令 r = a bmod b,然后令 a = b 和 b = r。
The output is a = 2, the HCF of 10 and 6. 输出为 a = 2,即 10 和 6 的最大公因数。
The algorithm always stops, because each remainder is smaller than the one before. 这个算法总会停止,因为每个余数都比前一个小。
Practice sheet 4.4 gives a progressively harder set with worked solutions. 练习单 4.4 提供了一组难度逐渐增加的题目及详细解答。
An algorithm is a list of clear steps that solves a task and always finishes. 算法是一系列清晰的步骤,能够解决一个任务并且总会结束。
The word comes from the name of al-Khwarizmi, a ninth-century mathematician in Baghdad. 这个词源自九世纪巴格达数学家花剌子米的名字。
A flowchart draws it: a decision is a diamond, a process a rectangle. 流程图用图形表示算法:判断用菱形,处理过程用矩形。
Pseudocode writes the steps in structured English, without a particular programming language. 伪代码用结构化的英语写出步骤,不依赖特定的编程语言。
Tracing an algorithm means following it by hand in a table with one column per variable and one row per step. 追踪算法是指在表格中手动执行算法,每个变量占一列,每个步骤占一行。
Efficiency matters. 效率很重要。
A linear search checks items one by one, up to n checks. 线性搜索逐一检查项目,最多检查 n 次。
A binary search of a sorted list halves the range each time: a sorted list of 1,000,000 names needs at most 20 checks, because 2^20 > 1,000,000. 对已排序列表进行二分查找时,每次将范围缩小一半:一个含有 1,000,000 个姓名的已排序列表最多需要检查 20 次,因为 2^20 > 1,000,000。
A Euclidean-algorithm flowchart tests b equal to zero, otherwise computes a remainder and updates the pair before returning to the test. 欧几里得算法的流程图检查 b 是否等于零,否则计算余数并更新这一对数,然后返回进行检查。
Match each part of the diagram to the text. 将图中的各部分与文字匹配。
Worked example. 例题。
compare total route weight, not the number of edges Known edge weights are AB = 2, BC = 3, AC = 8 and CD = 1. 比较路径总权重,而不是边数,已知边权为 AB = 2、BC = 3、AC = 8 和 CD = 1。
The path A-C-D has weight 9, while A-B-C-D has weight 6. 路径 A-C-D 的权重为 9,而 A-B-C-D 的权重为 6。
So the path with three edges is shorter than the path with two. 因此有三条边的路径比有两条边的路径更短。
The minimum spanning tree here uses AB, BC and CD, total 6; it happens to contain the shortest path, but in general the two problems have different answers. 这里的最小生成树使用 AB、BC 和 CD,总权重为 6;它恰好包含最短路径,但一般来说,这两个问题的答案不同。
Practice sheet 4.5 gives a progressively harder set with worked solutions. 练习单 4.5 提供了一组难度逐渐增加的题目及详细解答。
A graph is a set of vertices joined by edges. 图是由边连接的一组顶点。
It models anything with connections: roads, friendships, dependencies. 它可以对任何有连接关系的事物建模:道路、友谊、依赖关系。
The degree of a vertex is the number of edges that meet it. 顶点的度是与该顶点相连的边数。
Every edge has two ends, so the degrees always add up to twice the number of edges. 每条边有两个端点,所以各顶点的度数之和总是边数的两倍。
This is the fact behind Euler's Königsberg proof. 这是欧拉证明柯尼斯堡桥问题所依据的事实。
A tree is a connected graph with no cycles; a tree with n vertices has n - 1 edges. 树是没有环的连通图;有 n 个顶点的树有 n - 1 条边。
A family tree and a computer's folder structure are trees. 家谱和计算机的文件夹结构都是树。
A shortest path problem asks for the route with the smallest total weight (distance, time or cost), not the fewest edges. 最短路径问题要求的是总权重,也就是距离、时间或成本,最小的路线,而不是边数最少的路线。
Edsger Dijkstra designed his famous algorithm for it in 1956; navigation apps still use versions of it. 艾兹格·迪杰斯特拉于 1956 年为此设计了他著名的算法;导航应用至今仍使用该算法的不同版本。
A minimum spanning tree connects every vertex with the smallest total edge weight and no cycles, the cheapest way to link towns with cable. 最小生成树以最小的边权总和连接所有顶点且没有环,是用电缆连接城镇的最便宜方式。
An undirected network joins A to B with weight 2, B to C with 3, A to C with 8 and C to D with 1. 一个无向网络中,A 与 B 之间的边权为 2,B 与 C 之间为 3,A 与 C 之间为 8,C 与 D 之间为 1。
Match each part of the diagram to the text. 将图中的各部分与文字匹配。
GAC024 Discrete Mathematics course outline. L. Euler, "Solutio problematis ad geometriam situs pertinentis" (1736), the Königsberg bridges. G. Boole, An Investigation of the Laws of Thought (1854); C. E. Shannon, "A Symbolic Analysis of Relay and Switching Circuits" (1938). GAC024 Discrete Mathematics 课程大纲。 L. Euler,“Solutio problematis ad geometriam situs pertinentis”(1736),关于柯尼斯堡桥问题。 G. Boole,《思维规律的研究》(1854);C. E. Shannon,“A Symbolic Analysis of Relay and Switching Circuits”(1938)。
E. W. Dijkstra, "A Note on Two Problems in Connexion with Graphs", Numerische Mathematik 1 (1959). E. W. Dijkstra,“A Note on Two Problems in Connexion with Graphs”,Numerische Mathematik 1(1959)。
Euclid, Elements, Book VII, Propositions 1–2. 欧几里得,《几何原本》,第 VII 卷,命题 1–2。
Adding the two set totals without subtracting the overlap: |Acup B|=|A|+|B|-|Acap B|. 把两个集合的总数相加却没有减去重叠部分:|Acup B|=|A|+|B|-|Acap B|。
Calling a relation a function when one input has two outputs, or rejecting one because two inputs share an output. 一个输入有两个输出时仍把关系称为函数,或者因为两个输入共用一个输出就否认它是函数。
Reading binary place values from the left: the rightmost bit is worth 1. 从左边开始读取二进制位权:最右边一位的位权是 1。
Grouping binary into fours from the left when converting to hexadecimal; group from the right. 转换为十六进制时从左边开始将二进制数每四位分组;应从右边开始分组。
Forgetting that a fixed-width result keeps only the low bits when the question states wraparound. 题目规定采用回绕时,忘记固定位宽的结果只保留低位。
Treating OR as exclusive: inclusive OR is true when both inputs are true. 把 OR 当作排他性的:包含性 OR 在两个输入都为真时也为真。
Changing only one part when applying De Morgan: neg (Alor B)=neg Aland neg B; the operator flips too. 应用德摩根定律时只改变一个部分:neg (Alor B)=neg Aland neg B;运算符也要改变。
Choosing the path with fewest edges instead of the smallest total weight. 选择边数最少的路径,而不是总权重最小的路径。
set: a collection of distinct objects. 集合:不同对象组成的整体。
intersection: the elements that are in both sets. 交集:同时属于两个集合的元素。
function: a relation in which each input has exactly one output. 函数:每个输入恰好对应一个输出的关系。
place value: what a digit is worth because of its position. 位值:数字因其位置而具有的值。
truth table: a table of every input combination and its output. 真值表:列出每种输入组合及其输出的表。
algorithm: a finite list of clear steps that solves a task. 算法:解决任务的有限个清晰步骤。
tracing: following an algorithm by hand, step by step. 追踪:手动逐步执行算法。
degree: the number of edges meeting at a vertex. 度:与一个顶点相连的边数。
tree: a connected graph with no cycles. 树:没有环的连通图。
shortest path: the route between two vertices with the smallest total weight. 最短路径:两个顶点之间总权重最小的路线。
Answer each question before reading the answers. 看答案之前先回答每个问题。
1. In a group of 40 students, 25 play football, 18 play basketball and 8 play both. 1. 在 40 名学生中,25 人踢足球,18 人打篮球,8 人两种都参与。
How many play neither? 两种都不参与的有多少人?

Komentar

    Masuk atau buat akun

    IGCSE, A-Level & AP