Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

GAC024 Discrete Mathematics · ⁨GAC024 คณิตศาสตร์แบบไม่ต่อเนื่อง⁩

GAC Mathematics · ⁨GAC คณิตศาสตร์⁩ · Topic 4 · ⁨หัวข้อ 4⁩

Train · ⁨ฝึกฝน⁩
4.1

What this module is, and how it is marked · ⁨บทนี้คืออะไร และมีวิธีการให้คะแนนอย่างไร⁩

English

A repeated set member is counted once, a binary carry may exceed a fixed width, and the fewest-edge route may not have the smallest weight. Discrete mathematics makes those rules explicit.

GAC024 covers sets, counting systems, binary logic, algorithms and networks. Your centre's current brief determines assessment tasks, tools, weights and deadlines. These original practice sheets do not establish official marking rules or a university credit decision.

State the universe, representation width, allowed inputs or graph assumptions before solving. Show enough working for another reader to reproduce the result and distinguish a mathematical model from its real implementation.

ไทย

สมาชิกชุดซ้ำนับเป็นหนึ่งครั้ง การ carry แบบ binary อาจเกินความกว้างที่กำหนด และเส้นทางที่ผ่านขอบน้อยที่สุดอาจไม่ได้มีน้ำหนักน้อยที่สุด คณิตศาสตร์เชิง rời (Discrete mathematics) ทำให้กฎเหล่านั้นชัดเจน

GAC024 ครอบคลุมเซต ระบบการนับ ตรรกะแบบไบนารี อัลกอริทึม และเครือข่าย กำหนดกรอบงานปัจจุบันของศูนย์คุณกำหนดภาระงานประเมินผล เครื่องมือ น้ำหนัก และกำหนดเวลา แผ่นฝึกหัดต้นฉบับเหล่านี้ไม่ establishes กฎการให้คะแนนอย่างเป็นทางการหรือการตัดสินใจให้หน่วยกิตจากมหาวิทยาลัย

ระบุ Universe, ความกว้างของ representation, อินพุตที่อนุญาต หรือสมมติฐานกราฟ ก่อนแก้问题 ShowXml enough working for another reader to reproduce the result และแยกแยะ mathematical model ออกจาก implementation จริงของมัน

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
binary/ˈbaɪnəri/ แบบไบนารี
hexadecimal/ˌheksəˈdesɪml/ ฐานสิบหก
place value/pleɪs ˈvæljuː/ ตำแหน่งที่มีค่า
Binary arithmetic/ˈbaɪnəri əˈrɪθmətɪk/ การคำนวณเลขฐานสอง
4.1

Sets, relations and functions · ⁨เซต ความสัมพันธ์ และฟังก์ชัน⁩

Syllabus · ⁨หลักสูตร⁩
English

Unit 1 of 5 in GAC024 Discrete Mathematics (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

Module purpose: On completion of this module, students should be able to demonstrate an understanding of the basic principles of discrete mathematics, particularly the utilisation of mathematical logic. They should also be able to demonstrate the application of these skills to practical situations.

The module outcomes this unit works towards:

Learning Objective GAC024.1: Demonstrate understanding of the introductory concepts and properties of sets, relations and functions.

ไทย

หน่วยที่ 1 จาก 5 หน่วยใน GAC024 คณิตศาสตร์เชิง rời (ระดับ III) สาระเรียนนี้สอนเป็นเวลาประมาณ 40 ชั่วโมงในชั้นเรียน บวกกับ 20 ชั่วโมงการศึกษาค้นคว้าด้วยตนเอง และมีการประเมินผลที่ศูนย์การสอนโดยมี ACT เป็นผู้ออกแบบการประเมิน — ไม่มีข้อสอบภายนอก

วัตถุประสงค์ของสาระเรียน: เมื่อสำเร็จการเรียนสาระเรียนนี้แล้ว นักเรียนควรจะสามารถแสดงความเข้าใจเกี่ยวกับหลักการพื้นฐานของคณิตศาสตร์เชิง rời โดยเฉพาะการใช้ตรรกะทางคณิตศาสตร์ นอกจากนี้ยังสามารถแสดงความสามารถในการนำทักษะเหล่านี้ไปประยุกต์ใช้ในสถานการณ์จริงได้

ผลลัพธ์การเรียนรู้ submodule ที่หน่วยนี้มุ่งสู่:

เป้าหมายการเรียนรู้ GAC024.1: แสดงความเข้าใจในแนวคิดเบื้องต้นและคุณสมบัติของเซต ความสัมพันธ์ และฟังก์ชัน

Source: Cambridge International syllabus · ⁨แหล่งที่มา: หลักสูตร Cambridge International⁩

English
  • 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 subset 子集 has all its elements inside another set.
  • A relation 关系 pairs elements of two sets. A function 函数 is a relation where each input in its stated domain has exactly one output. Different inputs may share an output; an inverse relation is a function only when outputs uniquely identify their inputs.
  • A Venn diagram 韦恩图 turns a set problem into a picture, and can show the disjoint regions and their counts. Check that those regions add to the supplied universe total.

The inclusion-exclusion principle 容斥原理 subtracts the twice-counted overlap once: $|A\cup B|=|A|+|B|-|A\cap B|$.

Worked example. subtract an overlap only once

Known: 30 learners, 18 study French, 15 German, and 7 both. The overlap is included in both subject totals.

$$|F\cup G|=|F|+|G|-|F\cap G|=18+15-7=26$$
$$N_{neither}=|U|-|F\cup G|=30-26=4$$

French-only is $18-7=11$ and German-only $15-7=8$. The four disjoint regions sum to 30.

Practice sheet 4.1 includes progressively harder problems and independently checked solutions.

ไทย
  • เซต (Set) คือกลุ่มของวัตถุที่แตกต่างกัน Order และ repetition ไม่สำคัญ
  • Union ( UNION ) $A \cup B$ คือทุกอย่างที่อยู่ในอย่างใดอย่างหนึ่ง; Intersection ( INTERSECTION ) $A \cap B$ คือสิ่งที่อยู่ใน ทั้งสอง; Complement ของเซต (Set complement) คือทุกอย่างที่อยู่ใน Universe ที่ระบุแต่อยู่นอกเซต
  • เซตย่อย มีสมาชิกทั้งหมดอยู่ภายในอีกเซตหนึ่ง
  • ความสัมพันธ์ จับคู่สมาชิกของสองเซตเข้าด้วยกัน ฟังก์ชัน คือความสัมพันธ์ที่แต่ละ ค่าอินพุตในโดเมนที่กำหนดมีค่าเอาต์พุตเพียงค่าเดียว ค่าอินพุตที่แตกต่างกันอาจใช้ค่าเอาต์พุตร่วมกันได้ ความสัมพันธ์ย้อนกลับจะเป็นฟังก์ชันก็ต่อเมื่อค่าเอาต์พุตระบุตำแหน่งของค่าอินพุตได้อย่างชัดเจนเท่านั้น
  • แผนภาพเวนน์ แปลงปัญหาเซตให้เป็นรูปภาพ และสามารถแสดงพื้นที่ที่ไม่ซ้อนทับกันพร้อมจำนวนสมาชิกของแต่ละพื้นที่ ตรวจสอบให้แน่ใจว่าผลรวมของพื้นที่เหล่านี้เท่ากับจำนวนสมาชิกในเอกภพที่กำหนดให้

หลักการรวมและตัดออก จะลบส่วนที่นับซ้ำออกไปหนึ่งครั้ง: $|A\cup B|=|A|+|B|-|A\cap B|$

ตัวอย่างวิธีทำ ลบส่วนที่ซ้อนทับกันเพียงครั้งเดียว

เอกภพของชั้นเรียนจำนวน 30 คน แบ่งเป็นเรียนภาษาฝรั่งเศสอย่างเดียว 11 คน เรียนทั้งสองภาษา 7 คน เรียนภาษาเยอรมันอย่างเดียว 8 คน และไม่เรียนทั้งสองภาษาเลย 4 คน.

ข้อมูล已知: ผู้เรียน 30 คน, เรียนภาษาฝรั่งเศส 18 คน, เรียนภาษาเยอรมัน 15 คน, และเรียนทั้งสองภาษา 7 คน ส่วนที่ซ้อนทับถูกนับอยู่ในยอดรวมของแต่ละวิชาแล้ว

$$|F\cup G|=|F|+|G|-|F\cap G|=18+15-7=26$$
$$N_{neither}=|U|-|F\cup G|=30-26=4$$

เรียนภาษาฝรั่งเศสอย่างเดียวคือ $18-7=11$ และเรียนภาษาเยอรมันอย่างเดียวคือ $15-7=8$ ผลรวมของพื้นที่ทั้งสี่ที่ไม่ซ้อนทับกันเท่ากับ 30

แผ่นฝึกหัด 4.1 รวมโจทย์ที่ซับซ้อนขึ้นเรื่อยๆ พร้อมเฉลยที่ตรวจสอบความถูกต้องโดยอิสระ

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
set/set/ set
Union/ˈjuːnɪən/ รวม
intersection/ˌɪntəˈsekʃn/ จุดตัด
set complement/set ˈkɒmplɪmənt/ ส่วนเสริมของเซต
subset/ˈsʌbset/ เซตย่อย (subset)
relation/rɪˈleɪʃn/ ความสัมพันธ์
function/ˈfʌŋkʃn/ function
Venn diagram/ven ˈdaɪəɡræm/ แผนภาพเวนน์
inclusion-exclusion principle/ɪnˈkluːʒn eksˈkluːʒn ˈprɪnsɪpl/ หลักการรวม-ตัด
number base/ˈnʌmbə beɪs/ ฐานของจำนวน
Decimal/ˈdesɪml/ ทศนิยม
4.2

Counting systems · ⁨ระบบการนับ⁩

Syllabus · ⁨หลักสูตร⁩
English

Unit 2 of 5 in GAC024 Discrete Mathematics (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

The module outcomes this unit works towards:

Learning Objective GAC024.2: Understand the relationships between different counting systems and be able to perform simple binary arithmetic operations.

ไทย

หน่วยที่ 2 จาก 5 หน่วยใน GAC024 คณิตศาสตร์เชิง rời (ระดับ III) สาระเรียนนี้สอนเป็นเวลาประมาณ 40 ชั่วโมงในชั้นเรียน บวกกับ 20 ชั่วโมงการศึกษาค้นคว้าด้วยตนเอง และมีการประเมินผลที่ศูนย์การสอนโดยมี ACT เป็นผู้ออกแบบการประเมิน — ไม่มีข้อสอบภายนอก

ผลลัพธ์การเรียนรู้ submodule ที่หน่วยนี้มุ่งสู่:

เป้าหมายการเรียนรู้ GAC024.2: เข้าใจความสัมพันธ์ระหว่างระบบการนับที่แตกต่างกัน และสามารถดำเนินการคำนวณเลขฐานสองอย่างง่ายได้

Source: Cambridge International syllabus · ⁨แหล่งที่มา: หลักสูตร Cambridge International⁩

English
  • A positional number base 进制 b uses digits from zero to b minus one and place weights $b^i$. Decimal 十进制 uses ten, binary 二进制 two, hexadecimal 十六进制 sixteen.
  • Every digit's value is its place value 位值: in binary the places are 1, 2, 4, 8, 16 and so on.
  • Hexadecimal is shorthand for binary: one hex digit is exactly four bits, so conversion can group a stated-width binary pattern into four-bit blocks. Leading zeros preserve width while leaving the unsigned value unchanged.

For n unsigned bits, values run from zero to $2^n-1$. Distinguish an unrestricted sum from a stored fixed-width result; a wraparound rule, if explicitly given, keeps the low n bits.

Worked example. place weights determine the decimal value

Known numeral $1101_2$. Use weights from right to left: 1, 2, 4 and 8.

$$V=\sum d_i2^i$$
$$V=1(8)+1(4)+0(2)+1(1)=13$$

The same value is D in hexadecimal. Leading zeros would not change this nonnegative value but can record an intended width.

Practice sheet 4.2 includes progressively harder problems and independently checked solutions.

ไทย
  • ฐานของเลขตามตำแหน่ง b ใช้ตัวเลขตั้งแต่ 0 ถึง b-1 และมีน้ำหนักตำแหน่ง $b^i$ ทศนิยม ใช้สิบ, ไบนารี สอง, เฮกซาเดซิมอล สี่สิบหา.
  • ค่าของแต่ละหลักคือ ค่าตามตำแหน่ง: ในระบบไบนารี ตำแหน่งมีค่านับถอยหลังคือ 1, 2, 4, 8, 16 เป็นต้นไป
  • เฮกซาเดซิมอลเป็นการย่อเขียนของไบนารี: ตัวเลขเฮกซาเดซิมอลหนึ่งตัวเทียบเท่า 4 บิตพอดี ดังนั้นการแปลงรูปแบบไบนewidth ที่กำหนดให้สามารถจัดกลุ่มเป็นบล็อกขนาด 4 บิตได้Leading zeros รักษาความกว้างไว้โดยไม่เปลี่ยนค่าUnsigned

สำหรับบิต unsigned จำนวน n ตัว ค่าจะวิ่งจาก 0 ถึง $2^n-1$ แยกแยะระหว่างผลบวกที่ไม่จำกัดกับผลลัพธ์ที่เก็บในความกว้างคงที่ หากมีกฎการวนรอบ (wraparound) ระบุไว้อย่างชัดเจน จะเก็บเฉพาะ n บิตล่างสุดไว้

ตัวอย่างวิธีทำ น้ำหนักตำแหน่งกำหนดค่าทศนิยม

ตัวเลขไบนารี 1101 จัดเรียงตรงกับน้ำหนักตำแหน่ง 8, 4, 2 และ 1.

เลข known $1101_2$. ใช้น้ำหนักจากขวาไปซ้าย: 1, 2, 4 และ 8

$$V=\sum d_i2^i$$
$$V=1(8)+1(4)+0(2)+1(1)=13$$

ค่าเดียวกันนี้คือ D ในระบบเฮกซาเดซิมอล Leading zeros จะไม่เปลี่ยนค่าไม่ลบนี้แต่สามารถบันทึกความกว้างที่ต้องการได้

แผ่นฝึกหัด 4.2 รวมโจทย์ที่ซับซ้อนขึ้นเรื่อยๆ พร้อมเฉลยที่ตรวจสอบความถูกต้องโดยอิสระ

4.3

Binary applications · ⁨การประยุกต์ใช้ไบนารี⁩

Syllabus · ⁨หลักสูตร⁩
English

Unit 3 of 5 in GAC024 Discrete Mathematics (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

The module outcomes this unit works towards:

Learning Objective GAC024.2: Understand the relationships between different counting systems and be able to perform simple binary arithmetic operations.

Learning Objective GAC024.5: Use the basic identities of Boolean algebra to analyse logic circuits and understand the basic principles of propositional logic.

ไทย

หน่วยที่ 3 จาก 5 หน่วยใน GAC024 คณิตศาสตร์เชิง rời (ระดับ III) สาระเรียนนี้สอนเป็นเวลาประมาณ 40 ชั่วโมงในชั้นเรียน บวกกับ 20 ชั่วโมงการศึกษาค้นคว้าด้วยตนเอง และมีการประเมินผลที่ศูนย์การสอนโดยมี ACT เป็นผู้ออกแบบการประเมิน — ไม่มีข้อสอบภายนอก

ผลลัพธ์การเรียนรู้ submodule ที่หน่วยนี้มุ่งสู่:

เป้าหมายการเรียนรู้ GAC024.2: เข้าใจความสัมพันธ์ระหว่างระบบการนับที่แตกต่างกัน และสามารถดำเนินการคำนวณเลขฐานสองอย่างง่ายได้

เป้าหมายการเรียนรู้ GAC024.5: ใช้เอกลักษณ์พื้นฐานของพีชคณิตบูลเพื่อวิเคราะห์วงจรตรรกะและความเข้าใจหลักการพื้นฐานของตรรกะประโยค

Source: Cambridge International syllabus · ⁨แหล่งที่มา: หลักสูตร Cambridge International⁩

English
  • Binary arithmetic 二进制运算 adds like decimal, carrying at 2 instead of at 10.
  • A bit 位 is one binary digit; a byte 字节 is eight.
  • Boolean algebra 布尔代数 works on true and false with AND, OR and NOT.
  • A truth table 真值表 lists every Boolean input combination and output. Matching every row proves equivalence for the same finite Boolean inputs; it does not prove physical circuit timing or real-system security.
  • Logic gates 逻辑门 implement stated operations, and a logic circuit 逻辑电路 connects them. Trace the abstract logic according to its connections and input conventions.

Use inclusive OR and explicit brackets. De Morgan gives $\neg(A\land B)=(\neg A)\lor(\neg B)$. Bitwise NOT inverts only the stated width, not an unspecified infinite representation.

Worked example. an OR output is inverted by NOT

Known: $Y=\neg(A\lor B)$. Inclusive OR is false only when both inputs are false; NOT reverses that result. In row order $(A,B)=(0,0),(0,1),(1,0),(1,1)$, the output column is 1, 0, 0, 0. De Morgan gives equivalent expression $(\neg A)\land(\neg B)$.

Practice sheet 4.3 includes progressively harder problems and independently checked solutions.

ไทย
  • การคำนวณไบนารี บวกกันเหมือนทศนิยม โดย carry ที่ 2 แทนที่จะเป็น 10
  • บิต คือตัวเลขไบนารีหนึ่งหลัก; ไบต์ คือแปดบิต
  • พีชคณิตบูลีน ทำงานกับค่าจริงและเท็จ โดยใช้ AND, OR และ NOT
  • ตารางความจริง แสดงทุกชุดค่าอินพุตและเอาต์พุตของ布尔 If every row matches proves equivalence for the same finite Boolean inputs; it does not prove physical circuit timing or real-system security.
  • เกตตรรกะ ปฏิบัติการที่กำหนดไว้ และ วงจรตรรกะ เชื่อมต่อกेटเหล่านี้ ตาม dõiตรรกะนามธรรมตามการเชื่อมต่อและมาตรฐานค่าอินพุต

ใช้ OR แบบรวม (inclusive OR) และวงเล็บอย่างชัดเจน De Morgan ให้ $\neg(A\land B)=(\neg A)\lor(\neg B)$. NOT แบบ bitwise จะกลับค่าเฉพาะความกว้างที่กำหนด ไม่รวมถึงการแทนค่าแบบไร้ขีดจำกัด

ตัวอย่างวิธีทำ เอาต์พุต OR ถูกกลับค่าโดย NOT

อินพุต A และ B เข้าไปยังบล็อกที่มีป้าย OR, ซึ่งเอาต์พุตเข้าไปยังบล็อกที่มีป้าย NOT เพื่อให้ออกมา Y.

ข้อมูล已知: $Y=\neg(A\lor B)$. Inclusive OR เป็นเท็จก็ต่อเมื่ออินพุตทั้งสองเป็นเท็จ; NOT กลับผลลัพธ์นั้น ในลำดับแถว $(A,B)=(0,0),(0,1),(1,0),(1,1)$ คอลัมน์เอาต์พุตคือ 1, 0, 0, 0. De Morgan ให้สมการเทียบเท่า $(\neg A)\land(\neg B)$.

แผ่นฝึกหัด 4.3 รวมโจทย์ที่ซับซ้อนขึ้นเรื่อยๆ พร้อมเฉลยที่ตรวจสอบความถูกต้องโดยอิสระ

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
bit/bɪt/ บิต (bit)
byte/baɪt/ ไบต์
Boolean algebra/ˈbuːlɪən ˈældʒɪbrə/ พีชคณิตบูลีน
truth table/truːθ ˈteɪbl/ ตารางความจริง
Logic gates/ˈlɒdʒɪk ɡeɪts/ เกตลอจิก
logic circuit/ˈlɒdʒɪk ˈsɜːkɪt/ วงจรลอจิก
4.4

Algorithms · ⁨อัลกอริทึม⁩

Syllabus · ⁨หลักสูตร⁩
English

Unit 4 of 5 in GAC024 Discrete Mathematics (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

The module outcomes this unit works towards:

Learning Objective GAC024.3: Construct and analyse algorithms and flowcharts for simple mathematical and general procedures.

ไทย

หน่วยที่ 4 จาก 5 หน่วยใน GAC024 คณิตศาสตร์เชิง rời (ระดับ III) สาระเรียนนี้สอนเป็นเวลาประมาณ 40 ชั่วโมงในชั้นเรียน บวกกับ 20 ชั่วโมงการศึกษาค้นคว้าด้วยตนเอง และมีการประเมินผลที่ศูนย์การสอนโดยมี ACT เป็นผู้ออกแบบการประเมิน — ไม่มีข้อสอบภายนอก

ผลลัพธ์การเรียนรู้ submodule ที่หน่วยนี้มุ่งสู่:

เป้าหมายการเรียนรู้ GAC024.3: สร้างและวิเคราะห์อัลกอริทึมและแผนผังกระบวนการสำหรับขั้นตอนทางคณิตศาสตร์และทั่วไปอย่างง่าย

Source: Cambridge International syllabus · ⁨แหล่งที่มา: หลักสูตร Cambridge International⁩

English
  • An algorithm 算法 describes unambiguous steps for a task. A procedure solving the stated finite task must terminate and give the required result for its allowed inputs.
  • A flowchart 流程图 draws it: a decision is a diamond, a process a rectangle.
  • Pseudocode 伪代码 represents its steps without requiring a particular implementation language. State assignment, loop bounds and index conventions before tracing.
  • Tracing 追踪 an algorithm — a table with one column per variable and one row per step — records its actual updates. A trace checks the chosen input; a claim for all allowed inputs also needs a correctness argument.
  • Efficiency 效率 matters: a linear search can stop early but may inspect all n items. Binary search repeatedly discards half of an ordered search range; its logarithmic comparison count requires the sorted-data and bound conventions.

Worked example. repeat a remainder step until the second number is zero

Known: start with positive integers a equal to 10 and b equal to 6. While b is nonzero, compute r as a MOD b, then set a to b and b to r. Pairs after complete iterations are (6,4), (4,2), (2,0), giving output 2. Temporary r preserves the remainder before a and b change. Each nonzero remainder is smaller than the previous positive b, supporting termination.

Practice sheet 4.4 includes progressively harder problems and independently checked solutions.

ไทย
  • อัลกอริทึม อธิบายขั้นตอนที่ชัดเจนสำหรับงานหนึ่งๆ Procedure ที่แก้โจทย์ที่กำหนดให้ต้องหยุดทำงานและให้ผลลัพธ์ที่ต้องการสำหรับอินพุตที่อนุญาต
  • แผนภูมิโฟลว์ วาดออกมา: การตัดสินใจเป็นรูปเพชร, กระบวนการเป็นสี่เหลี่ยมผืนผ้า
  • โค้ดปลอม แทนขั้นตอนโดยไม่จำเป็นต้องใช้ภาษาโปรแกรมเฉพาะ State การกำหนดค่า, ขอบเขตของลูป และมาตรฐานดัชนีก่อนทำการ trace
  • การ trace อัลกอริทึม — ตารางที่มีคอลัมน์ต่อหนึ่งตัวแปรและแถวต่อหนึ่งขั้นตอน — บันทึกการอัปเดตจริง การ trace ตรวจสอบอินพุตที่เลือก; คำอ้างถึงอินพุตที่อนุญาตทั้งหมดทั้งหมดต้องการคำอธิบายความถูกต้องเพิ่มเติมด้วย
  • ประสิทธิภาพ สำคัญ: การค้นหาเชิงเส้นอาจหยุดก่อนแต่อาจตรวจสอบทั้งหมด n รายการ Binary search ทิ้งช่วงการค้นหาระดับครึ่งหนึ่งซ้ำๆ; จำนวนการเปรียบเทียบแบบลอการิทึมต้องใช้ข้อมูลที่เป็นorderedและมาตรฐานขอบเขต

ตัวอย่างวิธีทำ ทำขั้นตอนเศษเหลือซ้ำจนกว่าตัวเลขที่สองจะเป็นศูนย์

แผนภูมิโฟลว์ของอัลกอริทึมของ Euclid ตรวจสอบว่า b เท่ากับศูนย์หรือไม่ ถ้าไม่ใช่คำนวณเศษเหลือและอัปเดตคู่ก่อนกลับไปที่การทดสอบ.

ข้อมูลที่ทราบ: เริ่มต้นด้วยจำนวนเต็มบวก a เท่ากับ 10 และ b เท่ากับ 6. ในขณะที่ b ไม่เป็นศูนย์ คำนวณ r เป็น a MOD b แล้วกำหนดให้ a เป็น b และ b เป็น r คู่ผลหลังการทำซ้ำจนครบคือ (6,4), (4,2), (2,0) ซึ่งให้ผลลัพธ์ออกมาคือ 2. ค่า r ชั่วคราวช่วยรักษาเศษก่อนที่ a และ b จะเปลี่ยนแปลง. เศษที่ไม่เป็นศูนย์แต่ละตัวมีค่าน้อยกว่า b บวกตัวก่อนหน้าเสมอ ซึ่งสนับสนุนการหยุดการทำงานของอัลกอริทึม.

แผ่นฝึกหัด 4.4 รวมโจทย์ที่ซับซ้อนขึ้นเรื่อยๆ พร้อมเฉลยที่ตรวจสอบความถูกต้องโดยอิสระ

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
algorithm/ˈælɡərɪθəm/ อัลกอริทึม
flowchart/ˈfləʊtʃɑːt/ แผนภูมิไหล
Pseudocode/ˈsuːdəʊkəʊd/ 伪代码 (Pseudocode)
Tracing/ˈtreɪsɪŋ/ การวาดภาพตามต้นแบบ
Efficiency/ɪˈfɪʃənsi/ ประสิทธิภาพ
4.5

Graphs and networks · ⁨กราฟและเครือข่าย⁩

Syllabus · ⁨หลักสูตร⁩
English

Unit 5 of 5 in GAC024 Discrete Mathematics (Level III). The module is taught over about 40 class hours plus 20 hours of independent study, and is assessed at the teaching centre and moderated by ACT — there is no external exam.

The module outcomes this unit works towards:

Learning Objective GAC024.4: Identify the basic types, properties and applications of graphs and trees.

ไทย

หน่วยที่ 5 จาก 5 หน่วยใน GAC024 คณิตศาสตร์เชิง rời (ระดับ III) สาระเรียนนี้สอนเป็นเวลาประมาณ 40 ชั่วโมงในชั้นเรียน บวกกับ 20 ชั่วโมงการศึกษาค้นคว้าด้วยตนเอง และมีการประเมินผลที่ศูนย์การสอนโดยมี ACT เป็นผู้ออกแบบการประเมิน — ไม่มีข้อสอบภายนอก

ผลลัพธ์การเรียนรู้ submodule ที่หน่วยนี้มุ่งสู่:

**เป้าหมายการเรียนรู้ GAC024.4:**ระบุประเภทพื้นฐาน คุณสมบัติ และการใช้งานของกราฟและต้นไม้

Source: Cambridge International syllabus · ⁨แหล่งที่มา: หลักสูตร Cambridge International⁩

English
  • A graph 图 is a set of vertices 顶点 joined by edges 边. It models anything with connections: roads, friendships, dependencies.
  • For a simple undirected graph with no loops or repeated edges, the degree 度 counts incident edges. Every edge contributes two to the total degree sum.
  • A tree 树 is a connected graph with no cycles, and a finite tree with n vertices has n minus 1 edges. Some hierarchical models use trees, but actual systems can also contain cross-links or cycles.
  • A shortest path 最短路径 problem asks for the cheapest route between two vertices, by total weight under the stated constraints, rather than by the number of edges alone. A minimum spanning tree instead connects every vertex without cycles and minimises total included edge weight.

Worked example. compare total route weight, not the number of edges

Known edge weights are AB = 2, BC = 3, AC = 8 and CD = 1. The path A-C-D has weight 9, while A-B-C-D has weight 6. Therefore the three-edge path is shorter by weight despite having more edges. The minimum spanning tree for this small network uses AB, BC and CD with total 6; the agreement of totals here does not make the tasks identical.

Practice sheet 4.5 includes progressively harder problems and independently checked solutions.

ไทย
  • กราฟ คือเซตของ จุดยอด เชื่อมต่อกันด้วย เส้นเชื่อม它可以จำลองทุกอย่างที่มี การเชื่อมโยง: ถนน, มิตรภาพ, ความขึ้นอยู่กับสิ่งอื่น
  • สำหรับกราฟ simple undirected ที่ไม่มี self-loop หรือเส้นเชื่อมซ้ำ ดีกรี นับเส้นเชื่อมที่ติดกับจุดยอด ทุกเส้นเชื่อมมี kontribusi 2 ต่อผลรวมดีกรีทั้งหมด
  • ต้นไม้ เป็นกราฟที่ connected และไม่มี cycle, และต้นไม้ที่มีจำนวนจุดยอด n จะมี n-1 เส้นเชื่อม บางโมเดลเชิงลำดับชั้นใช้ต้นไม้ แต่ระบบจริงอาจมี cross-links หรือ cycle ได้
  • ปัญหา เส้นทางที่สั้นที่สุด (shortest path) ต้องการหาเส้นทางที่มีต้นทุนต่ำสุดระหว่างจุดยอดสองจุด โดยพิจารณาจากน้ำหนักรวมภายใต้ข้อจำกัดที่กำหนด ไม่ใช่จำนวนเส้นเชื่อมเพียงอย่างเดียว ในทางตรงกันข้าม ต้นไม้ครอบคลุมแบบน้อยสุด (minimum spanning tree) จะเชื่อมต่อทุกจุดยอดโดยไม่เกิดวงจร และลดทอนน้ำหนักรวมของเส้นเชื่อมที่เลือกไว้อย่างต่ำสุด

ตัวอย่างวิธีทำ เปรียบเทียบน้ำหนักรวมของเส้นทาง ไม่ใช่จำนวนเส้นเชื่อม

เครือข่ายไม่ระบุทิศทางเชื่อมต่อ A ไป B น้ำหนัก 2, B ไป C น้ำหนัก 3, A ไป C น้ำหนัก 8 และ C ไป D น้ำหนัก 1.

น้ำหนักเส้นเชื่อม已知คือ AB = 2, BC = 3, AC = 8 และ CD = 1 เส้นทาง A-C-D มีน้ำหนักรวม 9 ในขณะที่ A-B-C-D มีน้ำหนักรวม 6 ดังนั้นเส้นทางสามเส้นจึงมีน้ำหนักน้อยกว่าแม้จะมีเส้นเชื่อมมากกว่า ต้นไม้ครอบคลุมแบบน้อยสุดสำหรับเครือข่ายเล็กนี้ใช้ AB, BC และ CD รวมเป็น 6; ความตรงกันของผลรวมในที่นี้ไม่ได้หมายความว่าทั้งสองงานนั้นเหมือนกัน

แผ่นฝึกหัด 4.5 รวมโจทย์ที่ซับซ้อนขึ้นตามลำดับพร้อมคำตอบที่ตรวจสอบอย่างอิสระ

Vocabulary · ⁨คำศัพท์⁩ Train · ⁨ฝึกฝน⁩
English ไทย
graph/ɡræf/ กราฟ
vertices/ˈvɜːtɪsiːz/ จุดยอด
edges/ˈedʒɪz/ edges
degree/dɪˈɡriː/ ดีกรี
tree/triː/ ต้นไม้
shortest path/ˈʃɔːtɪst pæθ/ เส้นทางสั้นที่สุด

Interactive lessons on this topic · ⁨บทเรียนเชิงโต้ตอบสำหรับหัวข้อนี้⁩

Work through it step by step, with instant-check exercises. · ⁨ทำทีละขั้นตอน พร้อมแบบฝึกหัดตรวจสอบผลทันที⁩

More topics in GAC Mathematics · ⁨GAC คณิตศาสตร์⁩ · ⁨หัวข้อเพิ่มเติมใน GAC Mathematics · ⁨GAC คณิตศาสตร์⁩⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP