Tải bản đầy đủ (.pdf) (807 trang)

Toán rời rạc | Tài liệu, cơ sở ngành CNTT

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (20.56 MB, 807 trang )

<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1>

Phương pháp chứng minh



Trần Vĩnh Đức


HUST


Ngày 6 tháng 9 năm 2018


</div>
<span class='text_page_counter'>(2)</span><div class='page_container' data-page=2>

Bài tập


▶ GS Mc Brain và vợ là bà April tới một bữa tiệc ở đó có 4 đơi
vợ chồng khác.


▶ Có một vài cặp bắt tay nhau nhưng không ai bắt tay với vợ
hoặc chồng mình.


▶ GS hỏi mọi người khác xem họ bắt tay bao nhiêu người và
ông ấy nhận được 9 con số khác nhau.


▶ Hỏi có bao nhiêu người đã bắt tay April?


</div>
<span class='text_page_counter'>(3)</span><div class='page_container' data-page=3>

Tài liệu tham khảo



▶ Eric Lehman, F Thomson Leighton & Albert R Meyer,


<i>Mathematics for Computer Science, 2013</i> (Miễn phí)


▶ <i>K. Rosen, Tốn học rời rạc ứng dụng trong tin học (Bản dịch</i>
Tiếng Việt)


</div>
<span class='text_page_counter'>(4)</span><div class='page_container' data-page=4>

Định nghĩa



Chứng minh toán học của mộtmệnh đề là một dãysuy luận logic
dẫn đến mệnh đề này từ một tậptiên đề.


</div>
<span class='text_page_counter'>(5)</span><div class='page_container' data-page=5>

Nội dung



Mệnh đề, tiên đề, và suy luận logic


Phương pháp chứng minh


</div>
<span class='text_page_counter'>(6)</span><div class='page_container' data-page=6>

Định nghĩa


Mệnh đề là một khẳng định hoặc đúng hoặc sai.


▶ Mệnh đề 2 + 3 = 5

3



▶ Mệnh đề 1 + 1 = 3

7



</div>
<span class='text_page_counter'>(7)</span><div class='page_container' data-page=7>

Khẳng định không phải mệnh đề



▶ “Đưa tôi cái bánh!”
▶ “Bây giờ là 5 giờ”


</div>
<span class='text_page_counter'>(8)</span><div class='page_container' data-page=8>

Mệnh đề


<i>Với mọi số nguyên dương n, giá trị</i>


<i>p(n) ::= n</i>2<i><sub>+ n + 41</sub></i>


là số nguyên tố.



▶ <i>p(0) = 41</i>



▶ <i>p(1) = 43</i>



▶ <i>p(2) = 47</i>



▶ <i>p(3) = 53</i>



▶ <i><sub>· · ·</sub></i>


▶ <i>p(39) = 1601</i>



nhưng


<i>p(40) = 40</i>2<sub>+ 40 + 41 = 41</sub><i><sub>× 41</sub></i>

7



</div>
<span class='text_page_counter'>(9)</span><div class='page_container' data-page=9>

Mệnh đề (Giả thuyết Euler, 1769)


Phương trình


<i>a</i>4<i><sub>+ b</sub></i>4<i><sub>+ c</sub></i>4<i><sub>= d</sub></i>4


<i>khơng có nghiệm khi a, b, c, d là số nguyên dương.</i>


Năm 1988, Noam Eikies đã chứng minh là sai với phản ví dụ


<i>a = 95800,</i> <i>b = 217519,</i>
<i>c = 414560,</i> <i>d = 422481</i>



</div>
<span class='text_page_counter'>(10)</span><div class='page_container' data-page=10>

Mệnh đề


Phương trình


<i>313(x</i>3<i>+ y</i>3<i>) = z</i>3
khơng có nghiệm ngun dương.


Mệnh đề này cũng sai nhưng phản ví dụ nhỏ nhất có nhiều hơn
1000 chữ số.


</div>
<span class='text_page_counter'>(11)</span><div class='page_container' data-page=11>

Mệnh đề (Định lý bốn màu)


Mọi bản đồ đều có thể tơ được chỉ bằng bốn màu sao cho hai
vùng kề nhau có màu khác nhau.


Hình:Bản đồ tơ 5 màu


</div>
<span class='text_page_counter'>(12)</span><div class='page_container' data-page=12>

Mệnh đề (Định lý bốn màu)


Mọi bản đồ đều có thể tơ được chỉ bằng bốn màu sao cho hai
vùng kề nhau có màu khác nhau.


Appel & Hakel đã phân loại các bản đồ và dùng máy tính để kiểm
tra xem chúng có tơ được bằng 4 màu. Họ đã hồn tất chứng
minh năm 1976. Tuy nhiên


▶ Chứng minh quá dài để có thể kiểm tra mà khơng dùng máy
tính.


▶ Khơng ai đảm bảo rằng chương trình máy tính này chạy đúng.


▶ Khơng ai đủ nhiệt tình để kiểm tra hết hàng nghìn trường hợp


đã được chứng minh.


</div>
<span class='text_page_counter'>(13)</span><div class='page_container' data-page=13>

Mệnh đề (Định lý cuối cùng của Fermat)


Phương trình


<i>xn+ yn= zn</i>
<i>khơng có nghiệm nguyên với n<sub>≥ 3.</sub></i>


▶ Bài toán được viết trong một quyển sách Fermat đọc năm
1630.


▶ Andrew Wiles chứng minh là đúng năm 1994.


</div>
<span class='text_page_counter'>(14)</span><div class='page_container' data-page=14>

Mệnh đề (Giả thuyết Goldbach)


Mọi số nguyên chẵn lớn hơn 2 đều là tổng của hai số nguyên tố.


▶ Được giả thuyết năm 1742


▶ Đã được khẳng định là đúng với mọi số không lớn hơn 1016<sub>.</sub>


3

hay

7

?



</div>
<span class='text_page_counter'>(15)</span><div class='page_container' data-page=15>

Định nghĩa


Vị từ là một mệnh đề mà giá trị chân lý phụ thuộc vào một hoặc
nhiều biến.



<i>p(n) :: = “n là số bình phương hồn hảo”</i>
<i>p(4) = “4 là số bình phương hồn hảo”</i>
<i>p(4) =</i>

3



<i>p(5) =</i>

7



</div>
<span class='text_page_counter'>(16)</span><div class='page_container' data-page=16>

Phương pháp tiên đề



▶ Thủ tục chuẩn để thiết lập các giá trị chân lý trong toán học
đã được phát triển khoảng từ 300 BC bởi Euclid.


▶ Bắt đầu từ 5 “giả sử” để xây dựng hình học Euclid. Ví dụ:


<i>Qua một điểm nằm ngoài một đường thẳng ta vẽ được</i>
<i>một và chỉ một đường thẳng song song với đường thẳng</i>
<i>đã cho.</i>


▶ Các mệnh đề như thế này được thừa nhận là đúng được gọi là
tiên đề.


▶ Bắt đầu từ các tiên đề này, Euclid thiết lập giá trị chân lý của
các mệnh đề khác bằng cách đưa ra “chứng minh”.


▶ Chứng minh là một dãy các lập luận logic từ tập tiên đề dẫn
đến mệnh đề cần chứng minh.


</div>
<span class='text_page_counter'>(17)</span><div class='page_container' data-page=17>

Một số thuật ngữ cho mệnh đề



▶ <i>Mệnh đề đúng và quan trọng gọi là định lý.</i>



▶ <i>Bổ đề là mệnh đề chuẩn bị có ích để chứng minh các mệnh</i>


đề khác.


▶ <i>Hệ quả là một mệnh đề mà chứng minh nó chỉ cần vài bước</i>


từ một định lý.


</div>
<span class='text_page_counter'>(18)</span><div class='page_container' data-page=18>

Hệ tiên đề của chúng ta



▶ Về cơ bản, toán học hiện đại dựa trên hệ tiên đề ZFC
(Zermelo-Fraekel with Choice) cùng với một vài quy tắc suy
luận logic.


▶ Tuy nhiên, chúng quá tối giản. Ví dụ, một chứng minh hình
<i>thức trong ZFC cho 2 + 2 = 4 cần nhiều hơn 20, 000 bước lập</i>
luận!


▶ Trong môn học này, ta thừa nhận mọi sự kiện trong tốn
“phổ thơng” như tiên đề.


</div>
<span class='text_page_counter'>(19)</span><div class='page_container' data-page=19>

Suy luận logic



▶ Luật Modus Ponens:


<i>P,</i> <i>P<sub>⇒ Q</sub></i>
<i>Q</i>


<i>(Một chứng minh của P và một chứng minh P suy ra Q là</i>


<i>một chứng minh của Q)</i>


▶ Luật


<i>P<sub>⇒ Q, Q ⇒ R</sub></i>
<i>P⇒ R</i>


▶ Luật


<i>¬P ⇒ ¬Q</i>
<i>Q⇒ P</i>


</div>
<span class='text_page_counter'>(20)</span><div class='page_container' data-page=20>

Không phải luật



<i>¬P ⇒ ¬Q</i>


<i>P⇒ Q</i>

7



Ví dụ


▶ Nếu 4 là số ngun tố, thì “tơi không biết bay”.

3



▶ Nếu 4 không phải số nguyên tố,thì “tơi biết bay”.

7

.


</div>
<span class='text_page_counter'>(21)</span><div class='page_container' data-page=21>

Nội dung



Mệnh đề, tiên đề, và suy luận logic


Phương pháp chứng minh



</div>
<span class='text_page_counter'>(22)</span><div class='page_container' data-page=22>

Chứng minh mệnh đề “Nếu ... thì”



Để chứng minh mệnh đề<i>P⇒ Q</i>:


<b>1.</b> <i>Viết, “Giả sử P”.</i>


<b>2.</b> <i>Chỉ ra bằng lập luận logic rằng Q đúng.</i>


</div>
<span class='text_page_counter'>(23)</span><div class='page_container' data-page=23>

Định lý


Nếu 0<i><sub>≤ x ≤ 2 thì −x</sub></i>3<i><sub>+ 4x + 1 > 0.</sub></i>


Chứng minh.


Giả sử 0<i>≤ x ≤ 2. Vậy các số</i>


<i>x,</i> 2 +<i>x,</i> 2<i>− x</i>
đều lớn hơn hoặc bằng 0. Vậy


<i>x(2<sub>− x)(2 + x) ≥ 0</sub></i>


Thêm 1 vào tích trên ta được


<i>x(2− x)(2 + x) + 1 > 0</i>


Khai triển tích ta được<i><sub>−x</sub></i>3<i><sub>+ 4x + 1 > 0.</sub></i>


</div>
<span class='text_page_counter'>(24)</span><div class='page_container' data-page=24>

Chứng minh bằng phản đảo



▶ <i>Phản đảo của mệnh đề P⇒ Q là mệnh đề ¬Q ⇒ ¬P.</i>


▶ Ta chứng minh như sau:


<b>1.</b> Viết “Ta chứng minh mệnh đề phản đảo:”


và đưa ra mệnh đề phản đảo.


<b>2.</b> Làm như phương pháp chứng minh “Nếu ... thì”.


</div>
<span class='text_page_counter'>(25)</span><div class='page_container' data-page=25>

Định lý


<i>Nếu r là số vô tỷ, vậy√r cũng là số vô tỷ.</i>
Chứng minh.


▶ Ta chứng minh mệnh đề phản đảo: Nếu<i>√r là số hữu tỉ, vậy r</i>


là số hữu tỉ.


▶ Giả sử rằng <i>√r là số hữu tỉ. Có nghĩa rằng có hai số nguyên</i>
<i>p, q sao cho</i> <i>√r = p/q.</i>


▶ Bình phương hai vế ta được


<i>p</i>2


<i>q</i>2 <i>= r</i>


▶ <i>Vì p</i>2<i><sub>, q</sub></i>2 <i><sub>đều là số nguyên nên r là số hữu tỉ.</sub></i>


</div>
<span class='text_page_counter'>(26)</span><div class='page_container' data-page=26>

Chứng minh mệnh đề “Nếu và chỉ nếu”




Có hai cách chứng minh:


<b>1.</b> Chứng minh


<i>P⇔ Q tương đương với hai chứng minh</i>


{


<i>P<sub>⇒ Q</sub></i>
<i>Q⇒ P</i>


<b>2.</b> Xây dựng dãy “nếu và chỉ nếu”.


</div>
<span class='text_page_counter'>(27)</span><div class='page_container' data-page=27>

Chứng minh bằng cách chia trường hợp



Định lý


Mọi nhóm gồm 6 người đều có 3 người hoặc đôi một quen nhau,
hoặc đôi một lạ nhau.


Chứng minh.


<i>Xét x là một trong 6 người. Có hai trường hợp tương tự nhau:</i>


1. <i>Trong 5 người khác x, có ít nhất 3 người đều quen x.</i>


2. <i>Trong 5 người khác x, có ít nhất 3 người đều lạ x.</i>
Tại sao?


</div>
<span class='text_page_counter'>(28)</span><div class='page_container' data-page=28>

Chứng minh bằng cách chia trường hợp




Định lý


Mọi nhóm gồm 6 người đều có 3 người hoặc đơi một quen nhau,
hoặc đôi một lạ nhau.


Chứng minh trường hợp 1.


<i>Trong 5 người khác x, có ít nhất 3 người đều quen x.</i>
Có hai trường hợp con:


1. Khơng có cặp nào trong số 3 người này quen nhau.

3



2. Có một cặp trong 3 người này quen nhau. Vậy cặp này cùng
<i>với x tạo thành 3 người quen nhau từng đôi một.</i>

3



</div>
<span class='text_page_counter'>(29)</span><div class='page_container' data-page=29>

Chứng minh phản chứng



<i>Để chứng minh mệnh đề P bằng phản chứng:</i>


<b>1.</b> Viết “Ta chứng minh dùng phản chứng”.


<b>2.</b> <i>Viết “Giả sử P sai.”</i>


<b>3.</b> Dẫn ra một sự kiện đã biết là sai (một phản chứng).


<b>4.</b> <i>Viết “Điều này mâu thuẫn. Vậy P phải đúng.”</i>


</div>
<span class='text_page_counter'>(30)</span><div class='page_container' data-page=30>

Định lý
<i>√</i>



2 là số vô tỉ.


Chứng minh.


▶ Ta chứng minh dùng phản chứng.
▶ Giả sử <i>√</i>2 là số hữu tỉ.


▶ Vậy ta có thể viết<i>√2 = p/q ở dạng phân số tối giản.</i>
▶ Ta có


<i>√</i>


2 = <i>p</i>


<i>q</i> <i>⇒ 2 =</i>
<i>p</i>2


<i>q</i>2 <i>⇒ 2q</i>
2<i><sub>= p</sub></i>2


▶ <i>Vậy p chia hết cho 2. Tại sao? Nên p</i>2 <sub>chia hết cho 4.</sub>
▶ <i>Vậy q</i>2 <i><sub>chia hết cho 2. Nên q chia hết cho 2.</sub></i>


▶ <i>Vậy p/q không tối giản.</i>

7



</div>
<span class='text_page_counter'>(31)</span><div class='page_container' data-page=31>

Nội dung



Mệnh đề, tiên đề, và suy luận logic



Phương pháp chứng minh


</div>
<span class='text_page_counter'>(32)</span><div class='page_container' data-page=32>

Nguyên lý sắp thứ tự tốt (STTT)


Mọi tập số ngunkhơng âmkhác rỗng đều có phần tử nhỏ nhất.


▶ Tập rỗng khơng có phần tử nhỏ nhất.


▶ Khơng đúng với tập số âm. Ví dụ tập


<i>{· · · , −3, −2, −1}</i>


▶ Không đúng với mọi tập số hữu tỉ. Ví dụ tập
{


1
1<i>,</i>


1
2<i>,</i>


1
3<i>,</i> <i>· · ·</i>


}


</div>
<span class='text_page_counter'>(33)</span><div class='page_container' data-page=33>

Định lý


<i>Mọi số hữu tỉ m/n đều viết được dưới dạng x/y sao cho x, y khơng</i>
có ước chung ngun tố.



Chứng minh.


▶ <i>Giả sử ngược lại có m, n khơng viết được như trên.</i>
▶ <i>Xét C là tập</i> tử số<i>của các phân số như vậy. Vậy C<sub≯= ∅ vì</sub></i>


<i>m<sub>∈ C.</sub></i>


▶ <i>Theo nguyên lý STTT, có số nhỏ nhất m</i>0 <i>∈ C.</i>


▶ <i>Theo định nghĩa của tập C, có số n</i>0 <i>để m</i>0<i>/n</i>0 không viết
được ở dạng trên.


</div>
<span class='text_page_counter'>(34)</span><div class='page_container' data-page=34>

Chứng minh (tiếp).


▶ <i>Có nghĩa rằng m</i><sub>0</sub><i>, n</i>0 <i>có ước chung ngun tố p > 0. Vậy</i>


<i>m</i>0<i>/p</i>


<i>n</i><sub>0</sub><i>/p</i> =


<i>m</i>0


<i>n</i><sub>0</sub>


▶ <i>Vì m</i><sub>0</sub><i>/n</i>0 khơng thể viết ở dạng trên. Vậy <i>m<sub>n</sub></i><sub>0</sub>0<i><sub>/p</sub>/p</i> cũng không
viết được ở dạng trên.


▶ Vậy ta có



<i>m</i>0


<i>p</i> <i>∈ C và</i>
<i>m</i>0


<i>p</i> <i>< m</i>0

7



</div>
<span class='text_page_counter'>(35)</span><div class='page_container' data-page=35>

Chứng minh dùng STTT



<i>Để chứng minh P(n) đúng với mọi số nguyên không âm n, ta làm</i>
như sau


▶ <i>Định nghĩa tập phản ví dụ của P :</i>


<i>C ::=<sub>{n ∈ N | ¬P(n) đúng }</sub></i>


▶ <i>Giả sử phản chứng rằng C̸= ∅.</i>


▶ <i>Bởi nguyên lý STTT có phần tử nhỏ nhất c∈ C.</i>


▶ <i>Đưa ra phản chứng: thường bằng cách chỉ ra P(c) đúng hoặc</i>
<i>chỉ ra một phần tử d∈ C và d < c.</i>


▶ <i>Kết luận rằng C rỗng, có nghĩa rằng khơng có phản ví dụ.</i>


</div>
<span class='text_page_counter'>(36)</span><div class='page_container' data-page=36>

Định lý


Mọi số nguyên dương lớn hơn một đều phân tích được thành tích
các số nguyên tố.



Chứng minh bằng STTT.


▶ <i>Giả sử tập phản ví dụ của định lý C̸= ∅.</i>


▶ <i>Có phần tử n nhỏ nhất thuộc C. Vậy n khơng ngun tố. Có</i>
nghĩa rằng


<i>n = a<sub>· b</sub></i> <i>với a, b > 1</i>


▶ <i>Hơn nữa a, b phải phân tích được thành tích các số nguyên tố.</i>
Tại sao?


<i>a = p</i>1<i>· · · pk</i> và <i>b = q</i>1<i>· · · qm</i>


▶ <i>Vậy n = p</i>1<i>· · · pk· q</i>1<i>· · · qm</i>.

7



</div>
<span class='text_page_counter'>(37)</span><div class='page_container' data-page=37>

Định lý


Mọi số nguyên dương đều thú vị.


Chứng minh.


▶ <i>Xét S là tập các số nguyên dương</i> không thú vị.
▶ <i>Nếu S</i> khác<i>rỗng, S chứa phần tử nhỏ nhất n.</i>


▶ Nhưng là phần tử nhỏ nhất của một tập phải là một tính chất
thú vị.


▶ <i>Vậy n khơng thuộc S.</i>

7




</div>
<span class='text_page_counter'>(38)</span><div class='page_container' data-page=38>

Quy nạp



Trần Vĩnh Đức


HUST


Ngày 24 tháng 7 năm 2018


</div>
<span class='text_page_counter'>(39)</span><div class='page_container' data-page=39>

Tài liệu tham khảo



▶ Eric Lehman, F Thomson Leighton & Albert R Meyer,


<i>Mathematics for Computer Science, 2013</i> (Miễn phí)


▶ <i>Kenneth H. Rosen, Tốn học rời rạc ứng dụng trong tin học</i>
(Bản dịch Tiếng Việt)


</div>
<span class='text_page_counter'>(40)</span><div class='page_container' data-page=40>

Nội dung



Nguyên lý quy nạp


</div>
<span class='text_page_counter'>(41)</span><div class='page_container' data-page=41>

Nguyên lý quy nạp



<i>Xét vị từ P(n) trên</i> <sub>N. Nếu</sub>


▶ <i>P(0) đúng, và</i>


▶ <i>với mọi n<sub>∈ N, (P(n) ⇒ P(n + 1))</sub></i>
cũng đúng,



<i>thì P(n) đúng với mọi n<sub>∈ N.</sub></i>


8887 868584837879828180


77
76
75
74
73
72
71
70
696867<sub>6665</sub>


646362<sub>55</sub>61<sub>56</sub>60575958


54
53
52
51
50
49
48
47
46<sub>45</sub><sub>44</sub>


434241<sub>403938</sub>


37<sub>36</sub><sub>35</sub>
34


33
32
31
30
29
28

27


26


25


24


23


22

<sub>21</sub>


20

<sub>191817</sub>



161514

<sub>13</sub>

<sub>12</sub>


11


10

<sub>9</sub>


8


7


6


5


4


3


2


1



</div>
<span class='text_page_counter'>(42)</span><div class='page_container' data-page=42>

Ví dụ



Định lý



<i>Với mọi n∈ N,</i>


1 + 2 +<i>· · · + n =</i> <i>n(n + 1)</i>
2


<i>Đặt P(n) là mệnh đề</i>


<i>n</i>




<i>i=1</i>


<i>i =</i> <i>n(n + 1)</i>


2


</div>
<span class='text_page_counter'>(43)</span><div class='page_container' data-page=43>

Chứng minh.


▶ Bước cơ sở: <i>P(0) đúng.</i>


▶ Bước quy nạp: <i>Ta sẽ chứng minh: với mọi n≥ 0, mệnh đề</i>


<i>P(n)<sub>⇒ P(n + 1)</sub></i>


đúng.


<i>Thật vậy, giả sử P(n) đúng, với n là một số nguyên bất kỳ. Vì</i>


1 + 2 +<i>· · · + n + (n + 1) = (1 + 2 + · · · + n) + (n + 1)</i>


= <i>n(n + 1)</i>


2 <i>+ (n + 1)</i>


= <i>(n + 1)(n + 2)</i>
2
<i>nên P(n + 1) đúng.</i>


<i>Theo quy nạp ta có P(n) đúng với mọi số n<sub>∈ N.</sub></i>


</div>
<span class='text_page_counter'>(44)</span><div class='page_container' data-page=44>

Ví dụ


Chứng minh rằng


1
2+


1
4+


1


8 +<i>· · · +</i>
1
2<i>n</i> <i>< 1</i>
<i>với mọi n≥ 1.</i>


</div>
<span class='text_page_counter'>(45)</span><div class='page_container' data-page=45>

Ví dụ



Định lý



<i>Với mọi n<sub>∈ N, ta có n</sub></i>3<i><sub>− n chia hết cho 3.</sub></i>
<i>Đặt P(n) là mệnh đề</i>


<i>”n</i>3<i><sub>− n chia hết cho 3.”</sub></i>


</div>
<span class='text_page_counter'>(46)</span><div class='page_container' data-page=46>

Chứng minh.


▶ Bước cơ sở: <i>P(0) đúng vì 0</i>3<i><sub>− 0 = 0 chia hết cho 3.</sub></i>


▶ Bước quy nạp: <i>Ta sẽ chứng minh rằng, với mọi n<sub>∈ N, mệnh</sub></i>


đề


<i>P(n)⇒ P(n + 1)</i>


đúng.


<i>Thật vậy, giả sử P(n) đúng, với n là một số nguyên bất kỳ. Vì</i>


<i>(n + 1)</i>3<i>− (n + 1) = n</i>3<i>+ 3n</i>2<i>+ 3n + 1− n − 1</i>
<i>= n</i>3<i>+ 3n</i>2<i>+ 2n</i>


<i>= n</i>3<i>− n + 3n</i>2<i>+ 3n</i>
<i>= (n</i>3<i>− n) + 3(n</i>2<i>+ n)</i>
<i>chia hết cho 3 nên P(n + 1) đúng.</i>


<i>Theo quy nạp ta có P(n) đúng với mọi số n∈ N.</i>


</div>
<span class='text_page_counter'>(47)</span><div class='page_container' data-page=47>

Ví dụ chứng minh sai




Định lý (Sai)


Mọi con ngựa đều cùng màu.
<i>Đặt P(n) là mệnh đề</i>


<i>”Trong mọi tập gồm n con ngựa, các con ngựa đều</i>
<i>cùng màu.”</i>


</div>
<span class='text_page_counter'>(48)</span><div class='page_container' data-page=48>

<i>Đặt P(n) là mệnh đề</i>


<i>”Trong mọi tập gồm n con ngựa, các con ngựa đều</i>
<i>cùng màu.”</i>


Chứng minh Sai.


▶ Bước cơ sở: <i>P(1) đúng vì chỉ có một con ngựa.</i>


▶ Bước quy nạp: <i>Giả sử P(n) đúng để chứng minh P(n + 1)</i>


đúng.


<i>Xét tập gồm n + 1 con ngựa<sub>{h</sub></i>1<i>, h</i>2<i>,· · · , hn+1}</i>


▶ <i>Các con h</i>1<i>, h</i>2<i>, . . . , hn</i> có cùng màu (giả thiết quy nạp).


▶ <i>Các con h</i>2<i>, h</i>3<i>, . . . , hn+1</i> có cùng màu (giả thiết quy nạp).
Vậy


<i>màu(h</i><sub>1</sub><i>) = màu(h</i>2<i>, . . . , hn) = màu(hn+1).</i>



Vậy các con ngựa <i>{h</i>1<i>, h</i>2<i>,· · · , hn+1} đều cùng màu. Có nghĩa</i>


<i>rằng P(n + 1) đúng.</i>


<i>Theo quy nạp ta có P(n) đúng với mọi số n<sub>∈ N.</sub></i>


</div>
<span class='text_page_counter'>(49)</span><div class='page_container' data-page=49>

Bài tập



1. Chứng minh rằng


<i>n</i>




<i>i=1</i>


<i>i</i>2 <sub>=</sub> <i>n(n + 1)(2n + 1)</i>
6


2. Chứng minh rằng 2<i>n</i> <i><sub>> n</sub></i>2 <i><sub>với n</sub><sub>≥ 5.</sub></i>


3. <i>Chứng minh rằng với mọi n<sub>≥ 1,</sub></i>


<i>F(n− 1)F(n + 1) − F(n</i>2<sub>) = (</sub><i><sub>−1)</sub>n</i>


<i>với F(i) là số Fibonacci thứ i.</i>


</div>
<span class='text_page_counter'>(50)</span><div class='page_container' data-page=50>

Ví dụ lát gạch




Induction I 31


<b>2.6 Courtyard Tiling</b>



Induction served purely as a proof technique in the preceding examples. But induction
sometimes can serve as a more general reasoning tool.


MIT recently constructed a new computer science building. As the project went further
and further over budget, there were some radical fundraising ideas. One plan was to


install a big courtyard with dimensions 2n<sub>⇥ 2</sub>n<sub>:</sub>


2n
2n


One of the central squares would be occupied by a statue of a wealthy potential donor.
Let’s call him “Bill”. (In the special case n = 0, the whole courtyard consists of a single
central square; otherwise, there are four central squares.) A complication was that the
building’s unconventional architect, Frank Gehry, insisted that only special L-shaped tiles
be used:


A courtyard meeting these constraints exsists, at least for n = 2:


<b>B</b>


For larger values of n, is there a way to tile a 2n<sub>⇥ 2</sub>n<sub>courtyard with L-shaped tiles and a</sub>


statue in the center? Let’s try to prove that this is so.


<b>Theorem 15.</b> For all n 0there exists a tiling of a 2n<sub>⇥ 2</sub>n <sub>courtyard with Bill in a central</sub>


square.


Hình:Sân


Induction I

31



<b>2.6 Courtyard Tiling</b>



Induction served purely as a proof technique in the preceding examples. But induction


sometimes can serve as a more general reasoning tool.



MIT recently constructed a new computer science building. As the project went further


and further over budget, there were some radical fundraising ideas. One plan was to


install a big courtyard with dimensions 2

n

<sub>⇥ 2</sub>

n

<sub>:</sub>



2

n

2

n


One of the central squares would be occupied by a statue of a wealthy potential donor.


Let’s call him “Bill”. (In the special case n = 0, the whole courtyard consists of a single


central square; otherwise, there are four central squares.) A complication was that the


building’s unconventional architect, Frank Gehry, insisted that only special L-shaped tiles


be used:



A courtyard meeting these constraints exsists, at least for n = 2:



<b>B</b>



For larger values of n, is there a way to tile a 2

n

<sub>⇥ 2</sub>

n

<sub>courtyard with L-shaped tiles and a</sub>




statue in the center? Let’s try to prove that this is so.



<b>Theorem 15.</b>

For all n

0

there exists a tiling of a 2

n

<sub>⇥ 2</sub>

n

courtyard with Bill in a central


square.



Hình:Gạch


Induction I 31


<b>2.6 Courtyard Tiling</b>



Induction served purely as a proof technique in the preceding examples. But induction
sometimes can serve as a more general reasoning tool.


MIT recently constructed a new computer science building. As the project went further
and further over budget, there were some radical fundraising ideas. One plan was to
install a big courtyard with dimensions 2n<sub>⇥ 2</sub>n<sub>:</sub>


2n


2n


One of the central squares would be occupied by a statue of a wealthy potential donor.
Let’s call him “Bill”. (In the special case n = 0, the whole courtyard consists of a single
central square; otherwise, there are four central squares.) A complication was that the
building’s unconventional architect, Frank Gehry, insisted that only special L-shaped tiles
be used:


A courtyard meeting these constraints exsists, at least for n = 2:



<b>B</b>


For larger values of n, is there a way to tile a 2n<sub>⇥ 2</sub>n<sub>courtyard with L-shaped tiles and a</sub>


statue in the center? Let’s try to prove that this is so.


<b>Theorem 15.</b> For all n 0there exists a tiling of a 2n<sub>⇥ 2</sub>n<sub>courtyard with Bill in a central</sub>


square.


Hình:Lát gạch và đặt
tượng Bill


</div>
<span class='text_page_counter'>(51)</span><div class='page_container' data-page=51>

Định lý


<i>Với mọi n, ln có cách lát gạch một sân 2n<sub>× 2</sub>n</i> <sub>chỉ để lại một ô</sub>


trốngở giữa (để đặt tượng Bill).


</div>
<span class='text_page_counter'>(52)</span><div class='page_container' data-page=52>

Chứng minh thử.


<i>Xét P(n) là mệnh đề</i>


<i>”Có cách lát gạch sân 2n<sub>× 2</sub>n</i> <i><b><sub>để lại một ơ ở giữa.”</sub></b></i>


▶ Bước cơ sở: <i>P(0) đúng vì chỉ có một ô dành cho Bill.</i>


▶ Bước quy nạp: !


</div>
<span class='text_page_counter'>(53)</span><div class='page_container' data-page=53>

Chứng minh.



<i>Xét P(n) là mệnh đề</i>


<i>”Với mỗi vị trí đặt tượng Bill trong sân 2n<sub>× 2</sub>n<sub>, ta đều</sub></i>
<i>có cách lát gạch kín sân.”</i>


▶ Bước cơ sở: <i>P(0) đúng vì chỉ có</i>


một ơ dành cho Bill.


▶ Bước quy nạp: <i>Giả sử P(n) đúng,</i>


<i>ta chứng minh P(n + 1) đúng.</i>


32 Induction I


Proof. (doomed attempt) The proof is by induction. Let P (n) be the proposition that there
exists a tiling of a 2n<sub>⇥ 2</sub>n<sub>courtyard with Bill in the center.</sub>


Base case: P (0) is true because Bill fills the whole courtyard.


Inductive step: Assume that there is a tiling of a 2n<sub>⇥ 2</sub>n<sub>courtyard with Bill in the center</sub>


for some n 0. We must prove that there is a way to tile a 2n+1<sub>⇥ 2</sub>n+1<sub>courtyard with Bill</sub>


in the center...


Now we’re in trouble! The ability to tile a smaller courtyard with Bill in the center does
not help tile a larger courtyard with Bill in the center. We can not bridge the gap between
P (n)and P (n + 1). The usual recipe for finding an inductive proof will not work!



When this happens, your first fallback should be to look for a stronger induction
hy-pothesis; that is, one which implies your previous hypothesis. For example, we could
make P (n) the proposition that for every location of Bill in a 2n<sub>⇥ 2</sub>n<sub>courtyard, there exists</sub>


a tiling of the remainder.


This advice may sound bizzare: “If you can’t prove something, try to prove something
more grand!” But for induction arguments, this makes sense. In the inductive step, where
you have to prove P (n) ) P (n + 1), you’re in better shape because you can assume P (n),
which is now a more general, more useful statement. Let’s see how this plays out in the
case of courtyard tiling.


Proof. (successful attempt) The proof is by induction. Let P (n) be the proposition that for
every location of Bill in a 2n<sub>⇥ 2</sub>n<sub>courtyard, there exists a tiling of the remainder.</sub>


Base case: P (0) is true because Bill fills the whole courtyard.


Inductive step: Asume that P (n) is true for some n 0; that is, for every location of Bill in
a 2n<sub>⇥ 2</sub>n<sub>courtyard, there exists a tiling of the remainder. Divide the 2</sub>n+1<sub>⇥ 2</sub>n+1<sub>courtyard</sub>


into four quadrants, each 2n<sub>⇥ 2</sub>n<b><sub>. One quadrant contains Bill (B in the diagram below).</sub></b>


<b>Place a temporary Bill (X in the diagram) in each of the three central squares lying outside</b>
this quadrant:


<b>X</b>
<b>X X</b>


<b>B</b>



2n <sub>2</sub>n


2n


2n


<i>Theo quy nạp ta có P(n) đúng với mọi số n∈ N.</i>


</div>
<span class='text_page_counter'>(54)</span><div class='page_container' data-page=54>

15-Puzzle

“mcs-ftl” — 2010/9/8 — 0:40 — page 59 — #65


3.3. Invariants 59


25
26
24
22
21
: 23
8
7
6 9
4
3
2 5
(a)
25
26
24
22


21
:
23
8
7
6 9
4
3
2 5
(b)


Figure 3.5 The 15-puzzle in its starting configuration (a) and after the 12-block
is moved into the hole below (b).


26
25
24
22
21
: 23
8
7
6 9
4
3
2 5


Figure 3.6 The desired final configuration for the 15-puzzle. Can it be achieved
by only moving one block at a time into an adjacent hole?



get all 15 blocks into their natural order. A picture of the 15-puzzle is shown in
Figure3.5along with the configuration after the 12-block is moved into the hole
below. The desired final configuration is shown in Figure3.6.


The 15-puzzle became very popular in North America and Europe and is still
sold in game and puzzle shops today. Prizes were offered for its solution, but
it is doubtful that they were ever awarded, since it is impossible to get from the
configuration in Figure3.5(a) to the configuration in Figure3.6by only moving
one block at a time into an adjacent hole. The proof of this fact is a little tricky so
we have left it for you to figure out on your own! Instead, we will prove that the
analogous task for the much easier 8-puzzle cannot be performed. Both proofs, of
course, make use of the Invariant Method.


<i>⇒</i>


“mcs-ftl” — 2010/9/8 — 0:40 — page 59 — #65


3.3. Invariants 59


25
26
24
22
21
: 23
8
7
6 9
4
3


2 5
(a)
25
26
24
22
21
:
23
8
7
6 9
4
3
2 5
(b)


Figure 3.5 The 15-puzzle in its starting configuration (a) and after the 12-block
is moved into the hole below (b).


26
25
24
22
21
: 23
8
7
6 9
4


3
2 5


Figure 3.6 The desired final configuration for the 15-puzzle. Can it be achieved
by only moving one block at a time into an adjacent hole?


get all 15 blocks into their natural order. A picture of the 15-puzzle is shown in
Figure3.5along with the configuration after the 12-block is moved into the hole
below. The desired final configuration is shown in Figure3.6.


The 15-puzzle became very popular in North America and Europe and is still
sold in game and puzzle shops today. Prizes were offered for its solution, but
it is doubtful that they were ever awarded, since it is impossible to get from the
configuration in Figure3.5(a) to the configuration in Figure3.6by only moving
one block at a time into an adjacent hole. The proof of this fact is a little tricky so
we have left it for you to figure out on your own! Instead, we will prove that the
analogous task for the much easier 8-puzzle cannot be performed. Both proofs, of
course, make use of the Invariant Method.


Chuyển hợp lệ: di chuyển một số sang ơ trống cạnh nó.


</div>
<span class='text_page_counter'>(55)</span><div class='page_container' data-page=55>

15-Puzzle



Có thể chuyển từ


“mcs-ftl” — 2010/9/8 — 0:40 — page 59 — #65


3.3. Invariants 59


25


26
24
22
21
: 23
8
7
6 9
4
3
2 5
(a)
25
26
24
22
21
:
23
8
7
6 9
4
3
2 5
(b)


Figure 3.5 The 15-puzzle in its starting configuration (a) and after the 12-block
is moved into the hole below (b).



26
25
24
22
21
: 23
8
7
6 9
4
3
2 5


Figure 3.6 The desired final configuration for the 15-puzzle. Can it be achieved
by only moving one block at a time into an adjacent hole?


get all 15 blocks into their natural order. A picture of the 15-puzzle is shown in
Figure3.5along with the configuration after the 12-block is moved into the hole
below. The desired final configuration is shown in Figure3.6.


The 15-puzzle became very popular in North America and Europe and is still
sold in game and puzzle shops today. Prizes were offered for its solution, but
it is doubtful that they were ever awarded, since it is impossible to get from the
configuration in Figure3.5(a) to the configuration in Figure3.6by only moving
one block at a time into an adjacent hole. The proof of this fact is a little tricky so
we have left it for you to figure out on your own! Instead, we will prove that the
analogous task for the much easier 8-puzzle cannot be performed. Both proofs, of
course, make use of the Invariant Method.


sang



“mcs-ftl” — 2010/9/8 — 0:40 — page 59 — #65


3.3. Invariants 59


25
26
24
22
21
: 23
8
7
6 9
4
3
2 5
(a)
25
26
24
22
21
:
23
8
7
6 9
4
3


2 5
(b)


Figure 3.5 The 15-puzzle in its starting configuration (a) and after the 12-block
is moved into the hole below (b).


26
25
24
22
21
: 23
8
7
6 9
4
3
2 5


Figure 3.6 The desired final configuration for the 15-puzzle. Can it be achieved
by only moving one block at a time into an adjacent hole?


get all 15 blocks into their natural order. A picture of the 15-puzzle is shown in
Figure3.5along with the configuration after the 12-block is moved into the hole
below. The desired final configuration is shown in Figure3.6.


The 15-puzzle became very popular in North America and Europe and is still
sold in game and puzzle shops today. Prizes were offered for its solution, but
it is doubtful that they were ever awarded, since it is impossible to get from the
configuration in Figure3.5(a) to the configuration in Figure3.6by only moving


one block at a time into an adjacent hole. The proof of this fact is a little tricky so
we have left it for you to figure out on your own! Instead, we will prove that the
analogous task for the much easier 8-puzzle cannot be performed. Both proofs, of
course, make use of the Invariant Method.


không?


</div>
<span class='text_page_counter'>(56)</span><div class='page_container' data-page=56>

8-Puzzle

“mcs-ftl” — 2010/9/8 — 0:40 — page 60 — #66


Chapter 3 Induction
60
G
H
F
E
D
C
B
A
(a)
<b>G</b>
H
F
E
D
C
B
A
(b)
G


<b>E</b>
H
F
D
C
B
A
(c)


Figure 3.7 The 8-Puzzle in its initial configuration (a) and after one (b) and
two (c) possible moves.


3.3.4 The 8-Puzzle


In the 8-Puzzle, there are 8 lettered tiles (A–H) and a blank square arranged in a
3⇥ 3 grid. Any lettered tile adjacent to the blank square can be slid into the blank.
For example, a sequence of two moves is illustrated in Figure3.7.


In the initial configuration shown in Figure3.7(a), the G and H tiles are out of
order. We can find a way of swapping G and H so that they are in the right order,
but then other letters may be out of order. Can you find a sequence of moves that
puts these two letters in correct order, but returns every other tile to its original
position? Some experimentation suggests that the answer is probably “no,” and we
will prove that is so by finding an invariant, namely, a property of the puzzle that is
always maintained, no matter how you move the tiles around. If we can then show
that putting all the tiles in the correct order would violate the invariant, then we can
conclude that the puzzle cannot be solved.


Theorem 3.3.3. No sequence of legal moves transforms the configuration in
Fig-ure3.7(a) into the configuration in Figure3.8.



We’ll build up a sequence of observations, stated as lemmas. Once we achieve
a critical mass, we’ll assemble these observations into a complete proof of
Theo-rem3.3.3.


Define a row move as a move in which a tile slides horizontally and a column
move as one in which the tile slides vertically. Assume that tiles are read
top-to-bottom and left-to-right like English text, that is, the natural order, defined as
follows: So when we say that two tiles are “out of order”, we mean that the larger
letter precedes the smaller letter in this natural order.


Our difficulty is that one pair of tiles (the G and H) is out of order initially. An
immediate observation is that row moves alone are of little value in addressing this


</div>
<span class='text_page_counter'>(57)</span><div class='page_container' data-page=57>

8-Puzzle



Bài tập


Liệu có thể tìm được một dãy chuyển hợp lệ để chuyển từ
“mcs-ftl” — 2010/9/8 — 0:40 — page 60 — #66


Chapter 3 Induction
60
G
H
F
E
D
C
B


A
(a)
<b>G</b>
H
F
E
D
C
B
A
(b)
G
<b>E</b>
H
F
D
C
B
A
(c)


Figure 3.7 The 8-Puzzle in its initial configuration (a) and after one (b) and
two (c) possible moves.


3.3.4 The 8-Puzzle


In the 8-Puzzle, there are 8 lettered tiles (A–H) and a blank square arranged in a
3⇥ 3 grid. Any lettered tile adjacent to the blank square can be slid into the blank.
For example, a sequence of two moves is illustrated in Figure3.7.



In the initial configuration shown in Figure3.7(a), the G and H tiles are out of
order. We can find a way of swapping G and H so that they are in the right order,
but then other letters may be out of order. Can you find a sequence of moves that
puts these two letters in correct order, but returns every other tile to its original
position? Some experimentation suggests that the answer is probably “no,” and we
will prove that is so by finding an invariant, namely, a property of the puzzle that is
always maintained, no matter how you move the tiles around. If we can then show
that putting all the tiles in the correct order would violate the invariant, then we can
conclude that the puzzle cannot be solved.


Theorem 3.3.3. No sequence of legal moves transforms the configuration in
Fig-ure3.7(a) into the configuration in Figure3.8.


We’ll build up a sequence of observations, stated as lemmas. Once we achieve
a critical mass, we’ll assemble these observations into a complete proof of
Theo-rem3.3.3.


Define a row move as a move in which a tile slides horizontally and a column
move as one in which the tile slides vertically. Assume that tiles are read
top-to-bottom and left-to-right like English text, that is, the natural order, defined as
follows: So when we say that two tiles are “out of order”, we mean that the larger
letter precedes the smaller letter in this natural order.


Our difficulty is that one pair of tiles (the G and H) is out of order initially. An
immediate observation is that row moves alone are of little value in addressing this


sang


“mcs-ftl” — 2010/9/8 — 0:40 — page 61 — #67



3.3. Invariants 61


<b>H</b>
<b>G</b>
F
E
D
C
B
A


Figure 3.8 The desired final configuration of the 8-puzzle.


9
8 :
7
6
5
4
3
2
problem:


Lemma 3.3.4. A row move does not change the order of the tiles.


Proof. A row move moves a tile from cell i to cell i C 1 or vice versa. This tile
does not change its order with respect to any other tile. Since no other tile moves,
there is no change in the order of any of the other pairs of tiles. ⌅
Let’s turn to column moves. This is the more interesting case, since here the
order can change. For example, the column move in Figure3.9changes the relative


order of the pairs .G; H / and .G; E/.


Lemma 3.3.5. A column move changes the relative order of exactly two pairs of
tiles.


Proof. Sliding a tile down moves it after the next two tiles in the order. Sliding a
tile up moves it before the previous two tiles in the order. Either way, the relative
order changes between the moved tile and each of the two tiles it crosses. The
relative order between any other pair of tiles does not change. ⌅
These observations suggest that there are limitations on how tiles can be swapped.
Some such limitation may lead to the invariant we need. In order to reason about
swaps more precisely, let’s define a term referring to a pair of items that are out of
order:


</div>
<span class='text_page_counter'>(58)</span><div class='page_container' data-page=58>

Định lý


Không tồn tại dãy chuyển cho bài toán trên.


</div>
<span class='text_page_counter'>(59)</span><div class='page_container' data-page=59>

Chuyển hàng



Thứ tự tự nhiên của các chữ trên ô:


“mcs-ftl” — 2010/9/8 — 0:40 — page 61 — #67


3.3. Invariants 61


<b>H</b>
<b>G</b>
F
E


D
C
B
A


Figure 3.8 The desired final configuration of the 8-puzzle.


9
8 :
7
6
5
4
3
2
problem:


Lemma 3.3.4. A row move does not change the order of the tiles.


Proof. A row move moves a tile from cell i to cell i C 1 or vice versa. This tile
does not change its order with respect to any other tile. Since no other tile moves,
there is no change in the order of any of the other pairs of tiles. ⌅
Let’s turn to column moves. This is the more interesting case, since here the
order can change. For example, the column move in Figure3.9changes the relative
order of the pairs .G; H / and .G; E/.


Lemma 3.3.5. A column move changes the relative order of exactly two pairs of
tiles.


Proof. Sliding a tile down moves it after the next two tiles in the order. Sliding a


tile up moves it before the previous two tiles in the order. Either way, the relative
order changes between the moved tile and each of the two tiles it crosses. The


relative order between any other pair of tiles does not change. ⌅


These observations suggest that there are limitations on how tiles can be swapped.
Some such limitation may lead to the invariant we need. In order to reason about
swaps more precisely, let’s define a term referring to a pair of items that are out of
order:


Bổ đề


Mỗi lần chuyển hàng không làm thay đổi thứ tự các chữ.


</div>
<span class='text_page_counter'>(60)</span><div class='page_container' data-page=60>

Chuyển cột



Bổ đề


Mỗi lần chuyển theo cột làm thay đổi thứ tự của đúng hai cặp chữ.


“mcs-ftl” — 2010/9/8 — 0:40 — page 62 — #68


Chapter 3 Induction
62
E
H <b>G</b>
F
D
C
B


A
(a)
E
H
<b>G</b>
F
D
C
B
A
(b)


Figure 3.9 An example of a column move in which the G-tile is moved into the
adjacent hole above. In this case, G changes order with E and H .


Definition 3.3.6. A pair of letters L1and L2is an inversion if L1precedes L2in


the alphabet, but L1appears after L2in the puzzle order.


For example, in the puzzle below, there are three inversions: .D; F /, .E; F /,
.E; G/.
H
E
G
D
F
C
B
A



There is exactly one inversion .G; H / in the start state:


<b>G</b>
<b>H</b>
F
E
D
C
B
A


</div>
<span class='text_page_counter'>(61)</span><div class='page_container' data-page=61>

Cặp ngược



Định nghĩa


<i>Cặp chữ L</i>1 <i>và L</i>2 <i>gọi là ngược nếu L</i>1 <i>đứng trước L</i>2 trong bảng
<i>chữ cái nhưng L</i><sub>1</sub> <i>lại đứng sau L</i><sub>2</sub> trong ô chữ.


“mcs-ftl” — 2010/9/8 — 0:40 — page 63 — #69


3.3. Invariants 63


There are no inversions in the end state:


<b>H</b>
<b>G</b>
F
E
D
C


B
A


Let’s work out the effects of row and column moves in terms of inversions.
Lemma 3.3.7. During a move, the number of inversions can only increase by 2,
decrease by 2, or remain the same.


Proof. By Lemma3.3.4, a row move does not change the order of the tiles, and so
a row move does not change the number of inversions.


By Lemma3.3.5, a column move changes the relative order of exactly 2 pairs
of tiles. There are three cases: If both pairs were originally in order, then the
number of inversions after the move goes up by 2. If both pairs were originally
inverted, then the number of inversions after the move goes down by 2. If one
pair was originally inverted and the other was originally in order, then the number
of inversions stays the same (since changing the former pair makes the number of
inversions smaller by 1, and changing the latter pair makes the number of inversions


larger by 1). ⌅


We are almost there. If the number of inversions only changes by 2, then what
about the parity of the number of inversions? (The “parity” of a number refers to
whether the number is even or odd. For example, 7 and 5 have odd parity, and 18
and 0 have even parity.)


Since adding or subtracting 2 from a number does not change its parity, we have
the following corollary to Lemma3.3.7:


Corollary 3.3.8. Neither a row move nor a column move ever changes the parity
of the number of inversions.



Now we can bundle up all these observations and state an invariant, that is, a
property of the puzzle that never changes, no matter how you slide the tiles around.
Lemma 3.3.9. In every configuration reachable from the configuration shown in
Figure3.7(a), the parity of the number of inversions is odd.


“mcs-ftl” — 2010/9/8 — 0:40 — page 62 — #68


Chapter 3 Induction
62
E
H <b>G</b>
F
D
C
B
A
(a)
E
H
<b>G</b>
F
D
C
B
A
(b)


Figure 3.9 An example of a column move in which the G-tile is moved into the
adjacent hole above. In this case, G changes order with E and H .



Definition 3.3.6. A pair of letters L1and L2is an inversion if L1precedes L2in


the alphabet, but L1appears after L2in the puzzle order.


For example, in the puzzle below, there are three inversions: .D; F /, .E; F /,
.E; G/.
H
E
G
D
F
C
B
A


There is exactly one inversion .G; H / in the start state:


<b>G</b>
<b>H</b>
F
E
D
C
B
A


“mcs-ftl” — 2010/9/8 — 0:40 — page 62 — #68


Chapter 3 Induction


62
E
H <b>G</b>
F
D
C
B
A
(a)
E
H
<b>G</b>
F
D
C
B
A
(b)


Figure 3.9 An example of a column move in which the G-tile is moved into the
adjacent hole above. In this case, G changes order with E and H .


Definition 3.3.6. A pair of letters L1and L2is an inversion if L1precedes L2in
the alphabet, but L1appears after L2in the puzzle order.


For example, in the puzzle below, there are three inversions: .D; F /, .E; F /,
.E; G/.
H
E
G


D
F
C
B
A


There is exactly one inversion .G; H / in the start state:


<b>G</b>
<b>H</b>
F
E
D
C
B
A


</div>
<span class='text_page_counter'>(62)</span><div class='page_container' data-page=62>

Bổ đề


Mỗi bước di chuyển, số cặp ngược chỉ có thể tăng 2, hoặc giảm 2,
hoặc giữ ngun.


Chứng minh.


Chuyển hàng:khơng đổi vì khơng làm thay đổi thứ tự các chữ


Chuyển cột:sẽ làm thay đổi thứ tự đúng 2 cặp chữ.


▶ Nếu cả hai cặp này không ngược:số cặp ngược tăng 2.



▶ Nếu cả hai cặp này ngược: số cặp ngược giảm 2.


▶ Nếu trong hay cặp này chỉ có một cặp ngược: số cặp ngược
giữ nguyên.


</div>
<span class='text_page_counter'>(63)</span><div class='page_container' data-page=63>

Hệ quả


Trong mọi bước di chuyển, tính chẵn lẻ của số cặp ngược là khơng
đổi.


</div>
<span class='text_page_counter'>(64)</span><div class='page_container' data-page=64>

Bổ đề


Số cặp ngược trong trong mọi cấu hình đạt được từ


“mcs-ftl” — 2010/9/8 — 0:40 — page 60 — #66


Chapter 3 Induction
60
G
H
F
E
D
C
B
A
(a)
<b>G</b>
H
F


E
D
C
B
A
(b)
G
<b>E</b>
H
F
D
C
B
A
(c)


Figure 3.7 The 8-Puzzle in its initial configuration (a) and after one (b) and
two (c) possible moves.


3.3.4 The 8-Puzzle


In the 8-Puzzle, there are 8 lettered tiles (A–H) and a blank square arranged in a
3<sub>⇥ 3 grid. Any lettered tile adjacent to the blank square can be slid into the blank.</sub>
For example, a sequence of two moves is illustrated in Figure3.7.


In the initial configuration shown in Figure3.7(a), the G and H tiles are out of
order. We can find a way of swapping G and H so that they are in the right order,
but then other letters may be out of order. Can you find a sequence of moves that
puts these two letters in correct order, but returns every other tile to its original
position? Some experimentation suggests that the answer is probably “no,” and we


will prove that is so by finding an invariant, namely, a property of the puzzle that is
always maintained, no matter how you move the tiles around. If we can then show
that putting all the tiles in the correct order would violate the invariant, then we can
conclude that the puzzle cannot be solved.


Theorem 3.3.3. No sequence of legal moves transforms the configuration in
Fig-ure3.7(a) into the configuration in Figure3.8.


We’ll build up a sequence of observations, stated as lemmas. Once we achieve
a critical mass, we’ll assemble these observations into a complete proof of
Theo-rem3.3.3.


Define a row move as a move in which a tile slides horizontally and a column
move as one in which the tile slides vertically. Assume that tiles are read
top-to-bottom and left-to-right like English text, that is, the natural order, defined as
follows: So when we say that two tiles are “out of order”, we mean that the larger
letter precedes the smaller letter in this natural order.


Our difficulty is that one pair of tiles (the G and H) is out of order initially. An
immediate observation is that row moves alone are of little value in addressing this


luôn là lẻ.


</div>
<span class='text_page_counter'>(65)</span><div class='page_container' data-page=65>

Chứng minh bằng quy nạp.


<i>Đặt P(n) là mệnh đề : “ Số cặp ngược trong cấu hình đạt được từ</i>


“mcs-ftl” — 2010/9/8 — 0:40 — page 60 — #66


Chapter 3 Induction


60
G
H
F
E
D
C
B
A
(a)
<b>G</b>
H
F
E
D
C
B
A
(b)
G
<b>E</b>
H
F
D
C
B
A
(c)


Figure 3.7 The 8-Puzzle in its initial configuration (a) and after one (b) and


two (c) possible moves.


3.3.4 The 8-Puzzle


In the 8-Puzzle, there are 8 lettered tiles (A–H) and a blank square arranged in a
3<sub>⇥ 3 grid. Any lettered tile adjacent to the blank square can be slid into the blank.</sub>
For example, a sequence of two moves is illustrated in Figure3.7.


In the initial configuration shown in Figure3.7(a), the G and H tiles are out of
order. We can find a way of swapping G and H so that they are in the right order,
but then other letters may be out of order. Can you find a sequence of moves that
puts these two letters in correct order, but returns every other tile to its original
position? Some experimentation suggests that the answer is probably “no,” and we
will prove that is so by finding an invariant, namely, a property of the puzzle that is
always maintained, no matter how you move the tiles around. If we can then show
that putting all the tiles in the correct order would violate the invariant, then we can
conclude that the puzzle cannot be solved.


Theorem 3.3.3. No sequence of legal moves transforms the configuration in
Fig-ure3.7(a) into the configuration in Figure3.8.


We’ll build up a sequence of observations, stated as lemmas. Once we achieve
a critical mass, we’ll assemble these observations into a complete proof of
Theo-rem3.3.3.


Define a row move as a move in which a tile slides horizontally and a column
move as one in which the tile slides vertically. Assume that tiles are read
top-to-bottom and left-to-right like English text, that is, the natural order, defined as
follows: So when we say that two tiles are “out of order”, we mean that the larger
letter precedes the smaller letter in this natural order.



Our difficulty is that one pair of tiles (the G and H) is out of order initially. An
immediate observation is that row moves alone are of little value in addressing this


<i>sau n bước chuyển luôn là lẻ”</i>


▶ Bước cơ sở: <i>P(0) đúng. Tại sao?</i>


▶ Bước quy nạp: <i>Giả sử P(n) đúng, do hệ quả trước về tính</i>


<i>chẵn lẻ khơng đổi của số cặp ngược. Ta được P(n + 1) đúng.</i>


</div>
<span class='text_page_counter'>(66)</span><div class='page_container' data-page=66>

Định lý


Không tồn tại dãy chuyển hợp lệ để chuyển từ
“mcs-ftl” — 2010/9/8 — 0:40 — page 60 — #66


Chapter 3 Induction
60
G
H
F
E
D
C
B
A
(a)
<b>G</b>
H


F
E
D
C
B
A
(b)
G
<b>E</b>
H
F
D
C
B
A
(c)


Figure 3.7 The 8-Puzzle in its initial configuration (a) and after one (b) and
two (c) possible moves.


3.3.4 The 8-Puzzle


In the 8-Puzzle, there are 8 lettered tiles (A–H) and a blank square arranged in a
3⇥ 3 grid. Any lettered tile adjacent to the blank square can be slid into the blank.
For example, a sequence of two moves is illustrated in Figure3.7.


In the initial configuration shown in Figure3.7(a), the G and H tiles are out of
order. We can find a way of swapping G and H so that they are in the right order,
but then other letters may be out of order. Can you find a sequence of moves that
puts these two letters in correct order, but returns every other tile to its original


position? Some experimentation suggests that the answer is probably “no,” and we
will prove that is so by finding an invariant, namely, a property of the puzzle that is
always maintained, no matter how you move the tiles around. If we can then show
that putting all the tiles in the correct order would violate the invariant, then we can
conclude that the puzzle cannot be solved.


Theorem 3.3.3. No sequence of legal moves transforms the configuration in
Fig-ure3.7(a) into the configuration in Figure3.8.


We’ll build up a sequence of observations, stated as lemmas. Once we achieve
a critical mass, we’ll assemble these observations into a complete proof of
Theo-rem3.3.3.


Define a row move as a move in which a tile slides horizontally and a column
move as one in which the tile slides vertically. Assume that tiles are read
top-to-bottom and left-to-right like English text, that is, the natural order, defined as
follows: So when we say that two tiles are “out of order”, we mean that the larger
letter precedes the smaller letter in this natural order.


Our difficulty is that one pair of tiles (the G and H) is out of order initially. An
immediate observation is that row moves alone are of little value in addressing this


sang


“mcs-ftl” — 2010/9/8 — 0:40 — page 61 — #67


3.3. Invariants 61


<b>H</b>
<b>G</b>


F
E
D
C
B
A


Figure 3.8 The desired final configuration of the 8-puzzle.


9
8 :
7
6
5
4
3
2
problem:


Lemma 3.3.4. A row move does not change the order of the tiles.


Proof. A row move moves a tile from cell i to cell i C 1 or vice versa. This tile
does not change its order with respect to any other tile. Since no other tile moves,
there is no change in the order of any of the other pairs of tiles. ⌅
Let’s turn to column moves. This is the more interesting case, since here the
order can change. For example, the column move in Figure3.9changes the relative
order of the pairs .G; H / and .G; E/.


Lemma 3.3.5. A column move changes the relative order of exactly two pairs of
tiles.



Proof. Sliding a tile down moves it after the next two tiles in the order. Sliding a
tile up moves it before the previous two tiles in the order. Either way, the relative
order changes between the moved tile and each of the two tiles it crosses. The
relative order between any other pair of tiles does not change. ⌅
These observations suggest that there are limitations on how tiles can be swapped.
Some such limitation may lead to the invariant we need. In order to reason about
swaps more precisely, let’s define a term referring to a pair of items that are out of
order:


</div>
<span class='text_page_counter'>(67)</span><div class='page_container' data-page=67>

Nội dung



Nguyên lý quy nạp


</div>
<span class='text_page_counter'>(68)</span><div class='page_container' data-page=68>

Bài tập


Hãy dùng quy nạp để chứng minh rằng mọi số nguyên dương đều
phân tích được thành tích của các số nguyên tố.


</div>
<span class='text_page_counter'>(69)</span><div class='page_container' data-page=69>

Nguyên lý quy nạp mạnh



<i>Xét vị từ P(n) trên</i> <sub>N. Nếu</sub>


▶ <i>P(0) đúng, và</i>


▶ <i>với mọi n∈ N, (P(0) ∧ P(1) ∧ · · · ∧ P(n)) ⇒ P(n + 1),</i>
<i>thì P(n) đúng với mọi n∈ N.</i>


</div>
<span class='text_page_counter'>(70)</span><div class='page_container' data-page=70>

Ví dụ



Ở nước Quy nạp, họ dùng đơn vị tiền Mạnh. Họ chỉ có hai loại
tiền 3M (Mạnh) và 5M. Dù họ có vấn đề nhỏ với việc đổi tiền 4M
hoặc 7M, nhưng họ nhận thấy rằng họ có thể đổi mọi số tiền ít
nhất 8M. Hãy giải thích cho họ xem tại sao điều này đúng.


</div>
<span class='text_page_counter'>(71)</span><div class='page_container' data-page=71>

Unstacking Game



▶ Có một chồng hộp. Bạn sẽ thực hiện một dãy bước chuyển.


▶ <i>Mỗi bước chuyển bạn chia một hộp kích thước (a + b) thành</i>
<i>hai chồng khác rỗng kích thước a và b. Và bạn được ab điểm</i>
cho bước chuyển này.


▶ Trò chơi kết thúc khi mỗi chồng hộp chỉ còn một hộp.


▶ Điểm của bạn là tổng điểm bạn đạt được ở mỗi bước.


▶ Hãy tìm một chiến lược chơi để tối đa hoá điểm của bạn?


</div>
<span class='text_page_counter'>(72)</span><div class='page_container' data-page=72>

<i>Một chiến lược kiểu “chia đơi” cho trị chơi với n = 10 đĩa</i>



<i>Điểm</i>


10


5 5 <b>25</b>


5 3 2 <b>6</b>


3 3 2 2 <b>6</b>



2 3 2 2 1 <b>2</b>


1 3 2 2 1 1 <b>1</b>


1 2 2 2 1 1 1 <b>2</b>


1 1 2 2 1 1 1 1 <b>1</b>


1 1 1 2 1 1 1 1 1 <b>1</b>


1 1 1 1 1 1 1 1 1 1 <b>1</b>


<b>45</b>


</div>
<span class='text_page_counter'>(73)</span><div class='page_container' data-page=73>

Định lý


<i>Mọi chiến lược của trò chơi gồm chồng n hộp đều cho cùng điểm</i>


<i>S(n) =</i> <i>n(n− 1)</i>


2 <i>.</i>


</div>
<span class='text_page_counter'>(74)</span><div class='page_container' data-page=74>

Chứng minh.


<i>Ta gọi P(n) là mệnh đề S(n) = n(n− 1)/2.</i>


Bước cơ sở:<i>P(0) đúng vì S(0) = 0.</i>


Bước quy nạp:<i>Giả sử P(0)<sub>∧ · · · ∧ P(n) đúng để chứng minh</sub></i>



<i>P(n + 1).</i>


<i>Xét trò chơi với n + 1 đĩa. Ta chia n + 1 đĩa này tùy ý thành hai</i>
<i>phần không rỗng a, b thỏa mãn a + b = n + 1. Theo giả thiết quy</i>
nạp, ta được


<i>S(a + b) = S(a) + S(b) + ab =</i> <i>a(a− 1)</i>


2 +


<i>b(b<sub>− 1)</sub></i>


2 <i>+ ab</i>


= <i>a</i>


2<i><sub>− a + b</sub></i>2<i><sub>− b + 2ab</sub></i>


2 =


<i>(a + b)</i>2<i>− (a + b)</i>
2


= <i>(a + b)(a + b− 1)</i>


2 =


<i>(n + 1)n</i>



2

3



</div>
<span class='text_page_counter'>(75)</span><div class='page_container' data-page=75>

Đồ thị



Trần Vĩnh Đức


HUST


Ngày 24 tháng 7 năm 2018


</div>
<span class='text_page_counter'>(76)</span><div class='page_container' data-page=76>

Tài liệu tham khảo



▶ <i>Norman L. Biggs, Discrete Mathematics, Oxford University</i>
Press, 2002.


</div>
<span class='text_page_counter'>(77)</span><div class='page_container' data-page=77>

1/26/16, 10:42 AM
Hồ Hoàn Kiếm đến Bách Khoa, Hai Bà Trưng - Google Maps


Page 1 of 1
/>


Dữ liệu bản đồ ©2016 Google 1 ki lơ mét


50 p



4,1 km



via Phố Huế



51 p




4,2 km



via Hàng Bài



52 p



4,2 km



via Bà Triệu



Đi bộ 4,1 km, 50 p


Hồ Hoàn Kiếm đến Bách Khoa, Hai Bà Trưng



</div>
<span class='text_page_counter'>(78)</span><div class='page_container' data-page=78>

Nội dung



Đồ thị và biểu diễn


Một số đồ thị đặc biệt


Đẳng cấu


Bậc


</div>
<span class='text_page_counter'>(79)</span><div class='page_container' data-page=79>

Định nghĩa


Một<i><b>đồ thị</b></i> <i>G là một cặp có thứ tự G = (V, E), ở đây V là một</i>


<i>tập, còn E là tập với các phần tử là các tập con hai phần tử của V.</i>
<i>Các phần tử của V được gọi là các<b>đỉnh</b>, còn các phần tử của E</i>
gọi là các<i><b>cạnh</b></i> <i>của G.</i>



Ví dụ


<i>Xét đồ thị G = (V, E) trong đó</i>


<i>V ={a, b, c, d, z}</i>


<i>E ={{a, b}, {a, d}, {b, z}, {c, d}, {d, z}}.</i>


<i>a</i>


<i>z</i> <i>b</i>


<i>d</i> <i>c</i>


</div>
<span class='text_page_counter'>(80)</span><div class='page_container' data-page=80>

Định nghĩa


▶ <i>Hai đỉnh x và y gọi là</i> <i><b>kề nhau</b></i> (hay<i><b>hàng xóm</b></i>) nếu<i><sub>{x, y} là</sub></i>
một cạnh của đồ thị.


▶ <i>Ta biểu diễn đồ thị G = (V, E) bởi</i> <i><b>danh sách kề</b></i>, trong đó
<i>mỗi đỉnh v giữ một danh sách các đỉnh kề với v.</i>


Ví dụ <i>a</i>


<i>z</i> <i>b</i>


<i>d</i> <i>c</i>


<i>a</i> <i>b</i> <i>c</i> <i>d</i> <i>z</i>


<i>b</i> <i>a</i> <i>d</i> <i>a</i> <i>b</i>


<i>d</i> <i>z</i> <i>c</i> <i>d</i>


<i>z</i>


</div>
<span class='text_page_counter'>(81)</span><div class='page_container' data-page=81>

Bài tập


<i>Có ba ngơi nhà A, B, C, mỗi ngôi nhà đều kết nối với cả ba nhà</i>
<i>cung cấp ga, nước, và điện: G, W, E.</i>


1. Hãy viết danh sách kề cho đồ thị biểu diễn bài tốn này và
vẽ nó.


2. Liệu bạn có thể vẽ đồ thị này trên mặt phẳng để khơng có
cạnh cắt nhau khơng?


</div>
<span class='text_page_counter'>(82)</span><div class='page_container' data-page=82>

Ví dụ


▶ GS Mc Brain và vợ là bà April tới một bữa tiệc ở đó có 4 đơi
vợ chồng khác.


▶ Có một vài cặp bắt tay nhau nhưng không ai bắt tay với vợ
hoặc chồng mình.


▶ GS hỏi mọi người khác xem họ bắt tay bao nhiêu người và
ông ấy nhận được 9 con số khác nhau.


▶ Hỏi có bao nhiêu người đã bắt tay April?



</div>
<span class='text_page_counter'>(83)</span><div class='page_container' data-page=83>

Nội dung



Đồ thị và biểu diễn


Một số đồ thị đặc biệt


Đẳng cấu


Bậc


</div>
<span class='text_page_counter'>(84)</span><div class='page_container' data-page=84>

Đồ thị đầy đủ



Định nghĩa


<i>Đồ thị đầy đủ gồm n đỉnh, ký hiệu là Kn</i> là đồ thị có đúng một


cạnh nối mỗi cặp đỉnh phân biệt.


10.2 Graph Terminology and Special Types of Graphs <b>655</b>


<b>EXAMPLE 5</b> <b>Complete Graphs A complete graph on n vertices, denoted by K</b>n, is a simple graph


that contains exactly one edge between each pair of distinct vertices. The graphs Kn, for


n<sub>= 1, 2, 3, 4, 5, 6, are displayed in Figure 3. A simple graph for which there is at least one</sub>
<b>pair of distinct vertex not connected by an edge is called noncomplete.</b> ▲


<i>K</i>1 <i>K</i>2 <i>K</i>3 <i>K</i>4 <i>K</i>5 <i>K</i>6


<b>FIGURE 3</b> <b>The Graphs Knfor 1≤ n ≤ 6.</b>



<b>EXAMPLE 6</b> <b>Cycles A cycle C</b>n, n<i>≥ 3, consists of n vertices v</i>1,<i>v</i>2, . . . ,<i>v</i>n and edges <i>{v</i>1,<i>v</i>2},


<i>{v</i>2,<i>v</i>3<i>}, . . . , {v</i>n−1,<i>v</i>n<i>}, and {v</i>n,<i>v</i>1}. The cycles C3, C4, C5, and C6 are displayed in


Figure 4. ▲


<i>C</i>3 <i>C</i>4 <i>C</i>5 <i>C</i>6


<b>FIGURE 4</b> <b>The Cycles C3, C4, C5, and C6.</b>


<b>EXAMPLE 7</b> <b>Wheels We obtain a wheel W</b>nwhen we add an additional vertex to a cycle Cn, for n≥ 3,


and connect this new vertex to each of the n vertices in Cn, by new edges. The wheels W3, W4,


W5, and W6are displayed in Figure 5. ▲


<i>W</i>3 <i>W</i>4 <i>W</i>5 <i>W</i>6


<b>FIGURE 5</b> <b>The Wheels W3, W4, W5, and W6.</b>


<b>EXAMPLE 8</b> n<b>-Cubes An n-dimensional hypercube, or n-cube, denoted by Q</b>n, is a graph that has vertices


representing the 2n<sub>bit strings of length n. Two vertices are adjacent if and only if the bit strings</sub>


that they represent differ in exactly one bit position. We display Q1, Q2, and Q3in Figure 6.


Note that you can construct the (n+ 1)-cube Qn+1from the n-cube Qnby making two


copies of Qn, prefacing the labels on the vertices with a 0 in one copy of Qnand with a 1 in the



other copy of Qn, and adding edges connecting two vertices that have labels differing only in


the first bit. In Figure 6, Q3is constructed from Q2by drawing two copies of Q2as the top and


bottom faces of Q3, adding 0 at the beginning of the label of each vertex in the bottom face and


<i>1 at the beginning of the label of each vertex in the top face. (Here, by face we mean a face of</i>
a cube in three-dimensional space. Think of drawing the graph Q3in three-dimensional space


with copies of Q2as the top and bottom faces of a cube and then drawing the projection of the


resulting depiction in the plane.) ▲


</div>
<span class='text_page_counter'>(85)</span><div class='page_container' data-page=85>

Câu hỏi


<i>Đồ thị Kn</i> có bao nhiêu cạnh?


</div>
<span class='text_page_counter'>(86)</span><div class='page_container' data-page=86>

Đồ thị vịng


Định nghĩa


<i>Đồ thị vòng Cn, với n≥ 3 là một đồ thị có n đỉnh v</i>1<i>, v</i>2<i>, . . . , vn</i> và


các cạnh


<i>{v</i>1<i>, v</i>2<i>}, {v</i>2<i>, v</i>3<i>}, · · · , {vn−1, vn}, và {vn, v</i>1<i>}</i>


10.2 Graph Terminology and Special Types of Graphs <b>655</b>


<b>EXAMPLE 5</b>

<b>Complete Graphs A complete graph on n vertices, denoted by K</b>

n

, is a simple graph




that contains exactly one edge between each pair of distinct vertices. The graphs K

n

, for



n

= 1, 2, 3, 4, 5, 6, are displayed in Figure 3. A simple graph for which there is at least one



<b>pair of distinct vertex not connected by an edge is called noncomplete.</b>



<i>K</i>1 <i>K</i>2 <i>K</i>3 <i>K</i>4 <i>K</i>5 <i>K</i>6


<b>FIGURE 3</b>

<b>The Graphs K</b>

n

<b>for 1</b>

<b>≤ n ≤ 6.</b>



<b>EXAMPLE 6</b>

<b>Cycles A cycle C</b>

n

, n

<i>≥ 3, consists of n vertices v</i>

1

,

<i>v</i>

2

, . . . ,

<i>v</i>

n

and edges

<i>{v</i>

1

,

<i>v</i>

2

},



<i>{v</i>

2

,

<i>v</i>

3

<i>}, . . . , {v</i>

n−1

,

<i>v</i>

n

<i>}, and {v</i>

n

,

<i>v</i>

1

}. The cycles C

3

, C

4

, C

5

, and C

6

are displayed in



Figure 4.



<i>C</i>3 <i>C</i>4 <i>C</i>5 <i>C</i>6


<b>FIGURE 4</b>

<b>The Cycles C</b>

<b>3</b>

<b>, C</b>

<b>4</b>

<b>, C</b>

<b>5</b>

<b>, and C</b>

<b>6</b>

<b>.</b>



<b>EXAMPLE 7</b>

<b>Wheels We obtain a wheel W</b>

n

when we add an additional vertex to a cycle C

n

, for n

≥ 3,



and connect this new vertex to each of the n vertices in C

n

, by new edges. The wheels W

3

, W

4

,



W

<sub>5</sub>

, and W

6

are displayed in Figure 5.



<i>W</i>3 <i>W</i>4 <i>W</i>5 <i>W</i>6


<b>FIGURE 5</b>

<b>The Wheels W</b>

<b>3</b>

<b>, W</b>

<b>4</b>

<b>, W</b>

<b>5</b>

<b>, and W</b>

<b>6</b>

<b>.</b>




<b>EXAMPLE 8</b>

n

<b>-Cubes An n-dimensional hypercube, or n-cube, denoted by Q</b>

n

, is a graph that has vertices



representing the 2

n

bit strings of length n. Two vertices are adjacent if and only if the bit strings


that they represent differ in exactly one bit position. We display Q

1

, Q

2

, and Q

3

in Figure 6.



Note that you can construct the (n

+ 1)-cube Q

n+1

from the n-cube Q

n

by making two



copies of Q

n

, prefacing the labels on the vertices with a 0 in one copy of Q

n

and with a 1 in the



other copy of Q

n

, and adding edges connecting two vertices that have labels differing only in



the first bit. In Figure 6, Q

3

is constructed from Q

2

by drawing two copies of Q

2

as the top and



bottom faces of Q

3

, adding 0 at the beginning of the label of each vertex in the bottom face and



<i>1 at the beginning of the label of each vertex in the top face. (Here, by face we mean a face of</i>


a cube in three-dimensional space. Think of drawing the graph Q

3

in three-dimensional space



with copies of Q

2

as the top and bottom faces of a cube and then drawing the projection of the



resulting depiction in the plane.)



</div>
<span class='text_page_counter'>(87)</span><div class='page_container' data-page=87>

Câu hỏi


<i>Đồ thị Cn</i> có bao nhiêu cạnh?


</div>
<span class='text_page_counter'>(88)</span><div class='page_container' data-page=88>

Đồ thị bánh xe



Định nghĩa



<i>Khi thêm một đỉnh vào vòng Cn</i> <i>với n≥ 3 và nối đỉnh này với mỗi</i>


<i>đỉnh trong Cn</i> bằng một cạnh mới ta sẽ nhận được đồ thị bánh xe
<i>Wn</i>.


10.2 Graph Terminology and Special Types of Graphs <b>655</b>


<b>EXAMPLE 5</b> <b>Complete Graphs A complete graph on n vertices, denoted by K</b>n, is a simple graph


that contains exactly one edge between each pair of distinct vertices. The graphs Kn, for


n= 1, 2, 3, 4, 5, 6, are displayed in Figure 3. A simple graph for which there is at least one
<b>pair of distinct vertex not connected by an edge is called noncomplete.</b> ▲


<i>K</i><sub>1</sub> <i>K</i><sub>2</sub> <i>K</i><sub>3</sub> <i>K</i><sub>4</sub> <i>K</i><sub>5</sub> <i>K</i><sub>6</sub>


<b>FIGURE 3</b> <b>The Graphs Knfor 1≤ n ≤ 6.</b>


<b>EXAMPLE 6</b> <b>Cycles A cycle C</b>n, n<i>≥ 3, consists of n vertices v</i>1,<i>v</i>2, . . . ,<i>v</i>n and edges <i>{v</i>1,<i>v</i>2},


<i>{v</i>2,<i>v</i>3<i>}, . . . , {v</i>n−1,<i>v</i>n<i>}, and {v</i>n,<i>v</i>1}. The cycles C3, C4, C5, and C6 are displayed in


Figure 4. ▲


<i>C</i><sub>3</sub> <i>C</i><sub>4</sub> <i>C</i><sub>5</sub> <i>C</i><sub>6</sub>


<b>FIGURE 4</b> <b>The Cycles C3, C4, C5, and C6.</b>


<b>EXAMPLE 7</b> <b>Wheels We obtain a wheel W</b>n when we add an additional vertex to a cycle Cn, for n≥ 3,



and connect this new vertex to each of the n vertices in Cn, by new edges. The wheels W3, W4,


W<sub>5</sub>, and W6are displayed in Figure 5. ▲


<i>W</i><sub>3</sub> <i>W</i><sub>4</sub> <i>W</i><sub>5</sub> <i>W</i><sub>6</sub>


<b>FIGURE 5</b> <b>The Wheels W3, W4, W5, and W6.</b>


<b>EXAMPLE 8</b> n<b>-Cubes An n-dimensional hypercube, or n-cube, denoted by Q</b>n, is a graph that has vertices


representing the 2n<sub>bit strings of length n. Two vertices are adjacent if and only if the bit strings</sub>


that they represent differ in exactly one bit position. We display Q1, Q2, and Q3in Figure 6.


Note that you can construct the (n+ 1)-cube Qn+1 from the n-cube Qn by making two


copies of Qn, prefacing the labels on the vertices with a 0 in one copy of Qnand with a 1 in the


other copy of Qn, and adding edges connecting two vertices that have labels differing only in


the first bit. In Figure 6, Q3is constructed from Q2by drawing two copies of Q2as the top and


bottom faces of Q3, adding 0 at the beginning of the label of each vertex in the bottom face and


<i>1 at the beginning of the label of each vertex in the top face. (Here, by face we mean a face of</i>
a cube in three-dimensional space. Think of drawing the graph Q3 in three-dimensional space


with copies of Q2as the top and bottom faces of a cube and then drawing the projection of the



resulting depiction in the plane.) ▲


</div>
<span class='text_page_counter'>(89)</span><div class='page_container' data-page=89>

Câu hỏi


<i>Đồ thị Wn</i> có bao nhiêu cạnh?


</div>
<span class='text_page_counter'>(90)</span><div class='page_container' data-page=90>

<i>Các khối n chiều</i>



Định nghĩa


<i>Các khối n chiều, ký hiệu Qn</i>, là các đồ thị có 2<i>n</i> đỉnh, mỗi đỉnh


<i>được biểu diễn bằng xâu nhị phân độ dài n. Hai đỉnh liền kề nếu và</i>
chỉ nếu các xâu nhị phân biểu diễn chúng khác nhau đúng một bit.


<b>656</b> 10 / Graphs


<i>Q</i><sub>1</sub> <i>Q</i><sub>2</sub>


0 1
00 01
10 11
<i>Q</i><sub>3</sub>
000 001
100 101
111
110
010 <sub>011</sub>


<b>FIGURE 6</b> <b>The n-cube Q</b>n, n<b>= 1, 2, 3.</b>



<b>Bipartite Graphs</b>



Sometimes a graph has the property that its vertex set can be divided into two disjoint subsets
such that each edge connects a vertex in one of these subsets to a vertex in the other subset.
For example, consider the graph representing marriages between men and women in a village,
where each person is represented by a vertex and a marriage is represented by an edge. In this
graph, each edge connects a vertex in the subset of vertices representing males and a vertex in
the subset of vertices representing females. This leads us to Definition 5.


<b>DEFINITION 6</b> <i>A simple graph G is called bipartite if its vertex set V can be partitioned into two disjoint</i>
sets V1and V2such that every edge in the graph connects a vertex in V1and a vertex in V2


(so that no edge in G connects either two vertices in V1or two vertices in V2). When this


condition holds, we call the pair (V1, V2)<i>a bipartition of the vertex set V of G.</i>


In Example 9 we will show that C6is bipartite, and in Example 10 we will show that K3is


not bipartite.


<b>EXAMPLE 9</b> C6is bipartite, as shown in Figure 7, because its vertex set can be partitioned into the two sets


V1<i>= {v</i>1,<i>v</i>3,<i>v</i>5} and V2<i>= {v</i>2,<i>v</i>4,<i>v</i>6}, and every edge of C6 connects a vertex in V1 and a


vertex in V2. ▲


<b>EXAMPLE 10</b> K3is not bipartite. To verify this, note that if we divide the vertex set of K3into two disjoint


sets, one of the two sets must contain two vertices. If the graph were bipartite, these two vertices


could not be connected by an edge, but in K3each vertex is connected to every other vertex by


an edge. ▲


<b>EXAMPLE 11</b> Are the graphs G and H displayed in Figure 8 bipartite?


<i>V</i><sub>1</sub> <i>V</i><sub>2</sub>


<i>v</i><sub>1</sub>
<i>v</i><sub>3</sub>
<i>v</i>5
<i>v</i><sub>2</sub>
<i>v</i><sub>4</sub>
<i>v</i><sub>6</sub>


<b>FIGURE 7</b> <b>Showing That C6Is</b>


<b>Bipartite.</b>
<i>a</i> <i>b</i>
<i>c</i>
<i>e</i> <i>d</i>
<i>f</i>
<i>g</i>
<i>G</i>
<i>a</i> <i>b</i>
<i>e</i> <i>d</i>
<i>H</i>
<i>f</i> <i>c</i>


</div>
<span class='text_page_counter'>(91)</span><div class='page_container' data-page=91>

Câu hỏi



<i>Đồ thị Qn</i> có bao nhiêu cạnh?


</div>
<span class='text_page_counter'>(92)</span><div class='page_container' data-page=92>

Đồ thị hai phần



Định nghĩa


<i>Một đồ thị được gọi là hai phần nếu tập đỉnh V có thể phân hoạch</i>
<i>thành hai tập V</i><sub>1</sub> <i>và V</i><sub>2</sub> sao cho mỗi cạnh của đồ thị nối một đỉnh
<i>của V</i>1 <i>tới một đỉnh của V</i>2.


<b>656</b>

10 / Graphs



<i>Q</i>

<sub>1</sub>

<i>Q</i>

<sub>2</sub>


0

1


00

01


10

11


<i>Q</i>

<sub>3</sub>

000

001


100

101


111


110


010

<sub>011</sub>



<b>FIGURE 6</b>

<b>The n-cube Q</b>

n

, n

<b>= 1, 2, 3.</b>



<b>Bipartite Graphs</b>



Sometimes a graph has the property that its vertex set can be divided into two disjoint subsets



such that each edge connects a vertex in one of these subsets to a vertex in the other subset.


For example, consider the graph representing marriages between men and women in a village,


where each person is represented by a vertex and a marriage is represented by an edge. In this


graph, each edge connects a vertex in the subset of vertices representing males and a vertex in


the subset of vertices representing females. This leads us to Definition 5.



<b>DEFINITION 6</b>

<i>A simple graph G is called bipartite if its vertex set V can be partitioned into two disjoint</i>



sets V

1

and V

2

such that every edge in the graph connects a vertex in V

1

and a vertex in V

2



(so that no edge in G connects either two vertices in V

1

or two vertices in V

2

). When this



condition holds, we call the pair (V

1

, V

2

)

<i>a bipartition of the vertex set V of G.</i>



In Example 9 we will show that C

6

is bipartite, and in Example 10 we will show that K

3

is



not bipartite.



<b>EXAMPLE 9</b>

C

<sub>6</sub>

is bipartite, as shown in Figure 7, because its vertex set can be partitioned into the two sets



V

<sub>1</sub>

<i>= {v</i>

<sub>1</sub>

,

<i>v</i>

3

,

<i>v</i>

5

} and V

2

<i>= {v</i>

2

,

<i>v</i>

4

,

<i>v</i>

6

}, and every edge of C

6

connects a vertex in V

1

and a



vertex in V

2

.



<b>EXAMPLE 10</b>

K

<sub>3</sub>

is not bipartite. To verify this, note that if we divide the vertex set of K

3

into two disjoint



sets, one of the two sets must contain two vertices. If the graph were bipartite, these two vertices



could not be connected by an edge, but in K

3

each vertex is connected to every other vertex by




an edge.



<b>EXAMPLE 11</b>

Are the graphs G and H displayed in Figure 8 bipartite?



<i>V</i>

<sub>1</sub>

<i>V</i>

<sub>2</sub>


<i>v</i>

<sub>1</sub>

<i>v</i>

<sub>3</sub>

<i>v</i>

<sub>5</sub>

<i>v</i>

<sub>2</sub>

<i>v</i>

<sub>4</sub>

<i>v</i>

<sub>6</sub>


<b>FIGURE 7</b>

<b>Showing That C</b>

<b>6</b>

<b>Is</b>



<b>Bipartite.</b>


<i>a</i>

<i>b</i>


<i>c</i>


<i>e</i>

<i>d</i>


<i>f</i>


<i>g</i>


<i>G</i>


<i>a</i>

<i>b</i>


<i>e</i>

<i>d</i>


<i>H</i>


<i>f</i>

<i>c</i>



<b>FIGURE 8</b>

<b>The Undirected Graphs G and H .</b>



</div>
<span class='text_page_counter'>(93)</span><div class='page_container' data-page=93>

Câu hỏi



Đồ thị nào dưới đây là đồ thị hai phần?


<b>656</b> 10 / Graphs


<i>Q</i><sub>1</sub> <i>Q</i><sub>2</sub>


0 1
00 01
10 11
<i>Q</i><sub>3</sub>
000 001
100 101
111
110
010 <sub>011</sub>


<b>FIGURE 6</b>

<b>The n-cube Q</b>

n

, n

<b>= 1, 2, 3.</b>


<b>Bipartite Graphs</b>



Sometimes a graph has the property that its vertex set can be divided into two disjoint subsets


such that each edge connects a vertex in one of these subsets to a vertex in the other subset.


For example, consider the graph representing marriages between men and women in a village,


where each person is represented by a vertex and a marriage is represented by an edge. In this


graph, each edge connects a vertex in the subset of vertices representing males and a vertex in


the subset of vertices representing females. This leads us to Definition 5.



<b>DEFINITION 6</b>

<i>A simple graph G is called bipartite if its vertex set V can be partitioned into two disjoint</i>



sets V

1

and V

2

such that every edge in the graph connects a vertex in V

1

and a vertex in V

2


(so that no edge in G connects either two vertices in V

1

or two vertices in V

2

). When this



condition holds, we call the pair (V

1

, V

2

)

<i>a bipartition of the vertex set V of G.</i>



In Example 9 we will show that C

6

is bipartite, and in Example 10 we will show that K

3

is



not bipartite.



<b>EXAMPLE 9</b>

C

6

is bipartite, as shown in Figure 7, because its vertex set can be partitioned into the two sets



V

1

<i>= {v</i>

1

,

<i>v</i>

3

,

<i>v</i>

5

} and V

2

<i>= {v</i>

2

,

<i>v</i>

4

,

<i>v</i>

6

}, and every edge of C

6

connects a vertex in V

1

and a



vertex in V

2

.



<b>EXAMPLE 10</b>

K

3

is not bipartite. To verify this, note that if we divide the vertex set of K

3

into two disjoint


sets, one of the two sets must contain two vertices. If the graph were bipartite, these two vertices



could not be connected by an edge, but in K

3

each vertex is connected to every other vertex by



an edge.



<b>EXAMPLE 11</b>

Are the graphs G and H displayed in Figure 8 bipartite?



<i>V</i><sub>1</sub> <i>V</i><sub>2</sub>


<i>v</i><sub>1</sub>
<i>v</i><sub>3</sub>
<i>v</i><sub>5</sub>
<i>v</i><sub>2</sub>


<i>v</i><sub>4</sub>
<i>v</i><sub>6</sub>


<b>FIGURE 7</b>

<b>Showing That C</b>

<b>6</b>

<b>Is</b>



<b>Bipartite.</b>


<i>a</i> <i>b</i>
<i>c</i>
<i>e</i> <i>d</i>
<i>f</i>
<i>g</i>
<i>G</i>
<i>a</i> <i>b</i>
<i>e</i> <i>d</i>
<i>H</i>
<i>f</i> <i>c</i>


<b>FIGURE 8</b>

<b>The Undirected Graphs G and H .</b>



</div>
<span class='text_page_counter'>(94)</span><div class='page_container' data-page=94>

Câu hỏi


<i>Đồ thị C</i>5 <i>và C</i>6 có phải là những đồ thị hai phần?


</div>
<span class='text_page_counter'>(95)</span><div class='page_container' data-page=95>

Đồ thị hai phần đầy đủ



Định nghĩa


<i>Đồ thị hai phần đầy đủ Km,n</i> là đồ thị có tập đỉnh được phân


<i>hoạch thành hai tập con tương ứng có m đỉnh và n đỉnh và có một</i>


cạnh nối hai đỉnh nếu có một đỉnh thuộc tập này và một đỉnh
thuộc tập kia.


<b>658</b> 10 / Graphs


<b>EXAMPLE 13</b> <b>Complete Bipartite Graphs A complete bipartite graph K</b>m,nis a graph that has its vertex


set partitioned into two subsets of m and n vertices, respectively with an edge between two
vertices if and only if one vertex is in the first subset and the other vertex is in the second subset.
The complete bipartite graphs K2,3, K3,3, K3,5, and K2,6are displayed in Figure 9. ▲


<i>K</i>2,3 <i>K</i>3,3


<i>K</i><sub>3,5</sub> <i>K</i><sub>2,6</sub>


<b>FIGURE 9</b> <b>Some Complete Bipartite Graphs.</b>


<b>Bipartite Graphs and Matchings</b>



Bipartite graphs can be used to model many types of applications that involve matching the
elements of one set to elements of another, as Example 14 illustrates.


<b>EXAMPLE 14</b> <b>Job Assignments</b> Suppose that there are m employees in a group and n different jobs that
need to be done, where m<sub>≥ n. Each employee is trained to do one or more of these n jobs. We</sub>
would like to assign an employee to each job. To help with this task, we can use a graph to model
employee capabilities. We represent each employee by a vertex and each job by a vertex. For
each employee, we include an edge from that employee to all jobs that the employee has been
trained to do. Note that the vertex set of this graph can be partitioned into two disjoint sets, the
set of employees and the set of jobs, and each edge connects an employee to a job. Consequently,
this graph is bipartite, where the bipartition is (E, J ) where E is the set of employees and J is


the set of jobs. We now consider two different scenarios.


First, suppose that a group has four employees: Alvarez, Berkowitz, Chen, and Davis;
and suppose that four jobs need to be done to complete Project 1: requirements, architecture,
implementation, and testing. Suppose that Alvarez has been trained to do requirements and
testing; Berkowitz has been trained to do architecture, implementation, and testing; Chen has
been trained to do requirements, architecture, and implementation; and Davis has only been
trained to do requirements. We model these employee capabilities using the bipartite graph in
Figure 10(a).


Second, suppose that a group has second group also has four employees: Washington, Xuan,
Ybarra, and Ziegler; and suppose that the same four jobs need to be done to complete Project 2 as
are needed to complete Project 1. Suppose that Washington has been trained to do architecture;
Xuan has been trained to do requirements, implementation, and testing; Ybarra has been trained
to do architecture; and Ziegler has been trained to do requirements, architecture and testing. We
model these employee capabilities using the bipartite graph in Figure 10(b).


To complete Project 1, we must assign an employee to each job so that every job has an
employee assigned to it, and so that no employee is assigned more than one job. We can do this
by assigning Alvarez to testing, Berkowitz to implementation, Chen to architecture, and Davis
to requirements, as shown in Figure 10(a) (where blue lines show this assignment of jobs).


To complete Project 2, we must also assign an employee to each job so that every job has
an employee assigned to it and no employee is assigned more than one job. However, this is


</div>
<span class='text_page_counter'>(96)</span><div class='page_container' data-page=96>

<b>658</b> 10 / Graphs


<b>EXAMPLE 13</b> <b>Complete Bipartite Graphs A complete bipartite graph K</b>m,nis a graph that has its vertex


set partitioned into two subsets of m and n vertices, respectively with an edge between two


vertices if and only if one vertex is in the first subset and the other vertex is in the second subset.


The complete bipartite graphs K2,3, K3,3, K3,5, and K2,6are displayed in Figure 9. ▲


<i>K</i>2,3 <i>K</i>3,3


<i>K</i>3,5 <i>K</i>2,6


<b>FIGURE 9</b> <b>Some Complete Bipartite Graphs.</b>


<b>Bipartite Graphs and Matchings</b>


Bipartite graphs can be used to model many types of applications that involve matching the
elements of one set to elements of another, as Example 14 illustrates.


<b>EXAMPLE 14</b> <b>Job Assignments</b> Suppose that there are m employees in a group and n different jobs that


need to be done, where m≥ n. Each employee is trained to do one or more of these n jobs. We


would like to assign an employee to each job. To help with this task, we can use a graph to model
employee capabilities. We represent each employee by a vertex and each job by a vertex. For
each employee, we include an edge from that employee to all jobs that the employee has been
trained to do. Note that the vertex set of this graph can be partitioned into two disjoint sets, the
set of employees and the set of jobs, and each edge connects an employee to a job. Consequently,
this graph is bipartite, where the bipartition is (E, J ) where E is the set of employees and J is
the set of jobs. We now consider two different scenarios.


First, suppose that a group has four employees: Alvarez, Berkowitz, Chen, and Davis;
and suppose that four jobs need to be done to complete Project 1: requirements, architecture,
implementation, and testing. Suppose that Alvarez has been trained to do requirements and


testing; Berkowitz has been trained to do architecture, implementation, and testing; Chen has
been trained to do requirements, architecture, and implementation; and Davis has only been
trained to do requirements. We model these employee capabilities using the bipartite graph in
Figure 10(a).


Second, suppose that a group has second group also has four employees: Washington, Xuan,
Ybarra, and Ziegler; and suppose that the same four jobs need to be done to complete Project 2 as
are needed to complete Project 1. Suppose that Washington has been trained to do architecture;
Xuan has been trained to do requirements, implementation, and testing; Ybarra has been trained
to do architecture; and Ziegler has been trained to do requirements, architecture and testing. We
model these employee capabilities using the bipartite graph in Figure 10(b).


To complete Project 1, we must assign an employee to each job so that every job has an
employee assigned to it, and so that no employee is assigned more than one job. We can do this
by assigning Alvarez to testing, Berkowitz to implementation, Chen to architecture, and Davis
to requirements, as shown in Figure 10(a) (where blue lines show this assignment of jobs).


To complete Project 2, we must also assign an employee to each job so that every job has
an employee assigned to it and no employee is assigned more than one job. However, this is


</div>
<span class='text_page_counter'>(97)</span><div class='page_container' data-page=97>

Câu hỏi


<i>Đồ thị Km,n</i> có bao nhiêu cạnh?


</div>
<span class='text_page_counter'>(98)</span><div class='page_container' data-page=98>

Bài tập


<i>Hãy xây dựng một đồ thị với 5 đỉnh và 6 cạnh mà không chứa C</i>3
(tam giác) nào.


</div>
<span class='text_page_counter'>(99)</span><div class='page_container' data-page=99>

Nội dung




Đồ thị và biểu diễn


Một số đồ thị đặc biệt


Đẳng cấu


Bậc


</div>
<span class='text_page_counter'>(100)</span><div class='page_container' data-page=100>

Định nghĩa


<i>Hai đồ thị G</i>1 <i>và G</i>2 được gọi là<i><b>đẳng cấu</b>nếu có một song ánh α</i>
<i>từ tập đỉnh của G</i><sub>1</sub> <i>đến tập đỉnh của G</i><sub>2</sub> sao cho<i><sub>{α(x), α(y)} là</sub></i>
<i>một cạnh của G</i>1 <i>nếu và chỉ nếu</i> <i>{x, y} là một cạnh của G</i>2.
<i>Song ánh α được gọi là một<b>đẳng cấu</b></i>.


</div>
<span class='text_page_counter'>(101)</span><div class='page_container' data-page=101>

Ví dụ


<i>Hai đồ thị sau đây đẳng cấu với nhau và đẳng cấu α định nghĩa</i>
bởi:


<i>α(a) = t,</i> <i>α(b) = v,</i> <i>α(c) = w,</i> <i>α(d) = u.</i>


<i>a</i> <i>b</i>


<i>c</i>


<i>d</i> <i>v</i> <i>u</i>


<i>w</i>


<i>t</i>


</div>
<span class='text_page_counter'>(102)</span><div class='page_container' data-page=102>

Ví dụ


Hai đồ thị sau có đẳng cấu không?


<i>a</i>


<i>e</i> <i>b</i>


<i>d</i> <i>c</i>


<i>a</i>


<i>e</i> <i>b</i>


<i>d</i> <i>c</i>


</div>
<span class='text_page_counter'>(103)</span><div class='page_container' data-page=103>

Bài tập


Hãy chứng minh rằng hai đồ thị sau không đẳng cấu.


</div>
<span class='text_page_counter'>(104)</span><div class='page_container' data-page=104>

Nội dung



Đồ thị và biểu diễn


Một số đồ thị đặc biệt


Đẳng cấu



Bậc


</div>
<span class='text_page_counter'>(105)</span><div class='page_container' data-page=105>

Định nghĩa


<i><b>Bậc</b>của một đỉnh v trong đồ thị G = (V, E) là số cạnh của G</i>
<i>chứa v. Ta ký hiệu deg(v) là bậc của đỉnh v. Có nghĩa rằng</i>


<i>deg(v) =|Dv|</i> với <i>Dv</i>=<i>{e ∈ E | v ∈ e }.</i>


Ví dụ <i>a</i>


<i>z</i> <i>b</i>


<i>d</i> <i>c</i>


đỉnh deg


<i>a</i> 2


<i>b</i> 2


<i>c</i> 1


<i>d</i> 3


<i>z</i> 2


</div>
<span class='text_page_counter'>(106)</span><div class='page_container' data-page=106>

Định lý


<i>Tổng các bậc deg(v), lấy trên mọi đỉnh v của đồ thị G = (V, E),</i>


bằng hai lần số cạnh:




<i>v∈V</i>


<i>deg(v) = 2<sub>|E|.</sub></i>


Ví dụ <i><sub>a</sub></i>


<i>z</i> <i>b</i>


<i>d</i> <i>c</i>


đỉnh thuộc vào cạnh


<i>a</i> <i><sub>{a, b}, {a, d}</sub></i>
<i>b</i> <i><sub>{a, b}, {b, z}</sub></i>
<i>c</i> <i>{c, d}</i>


<i>d</i> <i>{a, d}, {c, d}, {d, z}</i>
<i>z</i> <i><sub>{b, z}, {d, z}</sub></i>


</div>
<span class='text_page_counter'>(107)</span><div class='page_container' data-page=107>

<i>Một đỉnh của đồ thị G là<b>lẻ</b></i> nếu bậc của nó là lẻ, và là<i><b>chẵn</b></i> nếu
bậc của nó là chẵn.


Hệ quả


Số đỉnh lẻ của đồ thị là số chẵn.



Chứng minh.




<i>v<sub>∈V</sub></i>lẻ


<i>deg(v) +</i> ∑


<i>v<sub>∈V</sub></i><sub>chẵn</sub>


<i>deg(v) = 2|E|</i>


</div>
<span class='text_page_counter'>(108)</span><div class='page_container' data-page=108>

Bậc và đẳng cấu



▶ <i>Nếu α : V</i>1 <i>→ V</i>2 <i>là một đẳng cấu giữa G</i>1 <i>và G</i>2 và


<i>α(v) = w, vậy</i>


<i>deg(v) = deg(w).</i>
Tại sao?


▶ <i>Nếu trong G</i><sub>1</sub> <i>có đỉnh x với deg(x) = δ</i><sub>0</sub> <i>và trong G</i><sub>2</sub> khơng có
<i>đỉnh nào có bậc δ</i>0<i>, vậy thì G</i>1 <i>và G</i>2 khơng đẳng cấu.


</div>
<span class='text_page_counter'>(109)</span><div class='page_container' data-page=109>

Bài tập


Các dãy số sau đây có thể là các bậc của mọi đỉnh của đồ thị nào
đó khơng? Nếu có hãy vẽ một đồ thị như vậy.


<b>1.</b> <i>2, 2, 2, 3</i>


<b>2.</b> <i>1, 2, 2, 3, 4</i>


<b>3.</b> <i>2, 2, 4, 4, 4</i>
<b>4.</b> <i>1, 2, 3, 4.</i>


</div>
<span class='text_page_counter'>(110)</span><div class='page_container' data-page=110>

Bài tập


▶ <i>Xét đồ thị G = (V, E),<b>phần bù</b></i> <i>G của G là đồ thị có cùng</i>


<i>tập đỉnh là V và tập cạnh là</i> tất cả các cặp đỉnh phân biệt
không <i>kề nhau trong G</i>.


▶ <i>Giả sử G có n đỉnh và các bậc của nó là</i>


<i>d</i>1<i>, d</i>2<i>, . . . , dn.</i>


<i>Các bậc của G là gì?</i>


</div>
<span class='text_page_counter'>(111)</span><div class='page_container' data-page=111>

Đồ thị chính quy



▶ <i>Đồ thị mà trong đó mọi đỉnh đều có cùng bậc r được gọi là</i>


<i><b>chính quy</b>. Khi đó r|V| = 2|E|.</i>


▶ <i>Đồ thị Kn</i> <i>là đồ thị chính quy bậc n− 1.</i>


▶ <i>Đồ thị vòng Cn</i> là đồ thị chính quy bậc 2.


▶ <i>Đồ thị Qn</i> là đồ thị chính quy bậc mấy ?



</div>
<span class='text_page_counter'>(112)</span><div class='page_container' data-page=112>

<i>a</i>


<i>e</i> <i>b</i>


<i>d</i> <i>c</i>


0


4 1


3 2


Hình:<i>Đồ thị đầy đủ K</i>5 <i>và đồ thị chu trình C</i>5


</div>
<span class='text_page_counter'>(113)</span><div class='page_container' data-page=113>

Bài tập


Liệt kê các đồ thị chính quy bậc 4 (đơi một khơng đẳng cấu) với
bảy đỉnh.


</div>
<span class='text_page_counter'>(114)</span><div class='page_container' data-page=114>

Bài tập


Chứng minh rằng trong mọi đồ thị với ít nhất hai đỉnh ln có hai
đỉnh cùng bậc.


</div>
<span class='text_page_counter'>(115)</span><div class='page_container' data-page=115>

Nội dung



Đồ thị và biểu diễn


Một số đồ thị đặc biệt



Đẳng cấu


Bậc


</div>
<span class='text_page_counter'>(116)</span><div class='page_container' data-page=116>

Định nghĩa


Một<i><b>hành trình</b></i> <i>trong đồ thị G là một dãy đỉnh</i>


<i>v</i><sub>1</sub><i>, v</i>2<i>, . . . , vk,</i>


<i>thỏa mãn vi</i> <i>và vi+1</i> kề nhau (với 1<i>≤ i ≤ k − 1).</i>
<i>a</i>


<i>e</i> <i>b</i>


<i>d</i> <i>c</i>


</div>
<span class='text_page_counter'>(117)</span><div class='page_container' data-page=117>

Định nghĩa


Hành trình mà trong đó mọi đỉnh đều khác nhau được gọi là


<i><b>đường đi</b></i>.


<i>a</i>


<i>e</i> <i>b</i>


<i>d</i> <i>c</i>


</div>
<span class='text_page_counter'>(118)</span><div class='page_container' data-page=118>

Đồ thị cộng tác




▶ Đỉnh: các tác giả


▶ <i>Đỉnh a nối b nếu hai tác giả a và b</i>
viết chung bài báo.


▶ <i>Số Erdưs của nhà tốn học m là</i>
<i>đường đi ngắn nhất giữa m và Paul</i>
Erdös.


<b>10.4 Connectivity 681</b>


<b>TABLE 1</b> <b>The Number</b>
<b>of Mathematicians</b>
<b>with a Given Erd˝os</b>
<b>Number (as of early</b>
<b>2006).</b>


<i><b>Erd˝os</b></i> <i><b>Number</b></i>
<i><b>Number</b></i> <i><b>of People</b></i>


0 1
1 504
2 6,593
3 33,605
4 83,642
5 87,760
6 40,014
7 11,591
8 3,146


9 819
10 244
11 68
12 23
13 5


<b>TABLE 2</b> <b>The Number</b>
<b>of Actors with a Given</b>
<b>Bacon Number (as of</b>
<b>early 2011).</b>


<i><b>Bacon</b></i> <i><b>Number</b></i>
<i><b>Number</b></i> <i><b>of People</b></i>


0 1
1 2,367
2 242,407
3 785,389
4 200,602
5 14,048
6 1,277
7 114
8 16


game where participants where challenged to find a sequence of movies leading from each actor
named to Kevin Bacon. We can find a number similar to a Bacon number using any actor as the


center of the acting universe. ▲


<b>Connectedness in Undirected Graphs</b>



When does a computer network have the property that every pair of computers can share
infor-mation, if messages can be sent through one or more intermediate computers? When a graph
is used to represent this computer network, where vertices represent the computers and edges
represent the communication links, this question becomes: When is there always a path between
two vertices in the graph?


<b>DEFINITION 3</b> <i>An undirected graph is called connected if there is a path between every pair of distinct</i>
<i>vertices of the graph. An undirected graph that is not connected is called disconnected. We</i>
<i>say that we disconnect a graph when we remove vertices or edges, or both, to produce a</i>
disconnected subgraph.


Thus, any two computers in the network can communicate if and only if the graph of this network
is connected.


<b>EXAMPLE 4</b> The graph G1in Figure 2 is connected, because for every pair of distinct vertices there is a


path between them (the reader should verify this). However, the graph G2in Figure 2 is not


connected. For instance, there is no path in G2between vertices a and d. ▲


We will need the following theorem in Chapter 11.


</div>
<span class='text_page_counter'>(119)</span><div class='page_container' data-page=119>

Đồ thị Hollywood



▶ Đỉnh: các diễn viên


▶ <i>Diễn viên a nối với diễn viên b nếu</i>


<i>a và b đóng chung một bộ phim</i>



▶ <i>Số Bacon của diễn viên c là đường</i>
<i>đi ngắn nhất giữa c và Kevin</i>
Bacon.


<b>10.4 Connectivity 681</b>


<b>TABLE 1</b> <b>The Number</b>


<b>of Mathematicians</b>
<b>with a Given Erd˝os</b>
<b>Number (as of early</b>
<b>2006).</b>


<i><b>Erd˝os</b></i> <i><b>Number</b></i>
<i><b>Number</b></i> <i><b>of People</b></i>


0 1
1 504
2 6,593
3 33,605
4 83,642
5 87,760
6 40,014
7 11,591
8 3,146
9 819
10 244
11 68
12 23


13 5


<b>TABLE 2</b> <b>The Number</b>


<b>of Actors with a Given</b>
<b>Bacon Number (as of</b>
<b>early 2011).</b>


<i><b>Bacon</b></i> <i><b>Number</b></i>
<i><b>Number</b></i> <i><b>of People</b></i>


0 1
1 2,367
2 242,407
3 785,389
4 200,602
5 14,048
6 1,277
7 114
8 16


game where participants where challenged to find a sequence of movies leading from each actor
named to Kevin Bacon. We can find a number similar to a Bacon number using any actor as the


center of the acting universe. ▲


<b>Connectedness in Undirected Graphs</b>



When does a computer network have the property that every pair of computers can share
infor-mation, if messages can be sent through one or more intermediate computers? When a graph


is used to represent this computer network, where vertices represent the computers and edges
represent the communication links, this question becomes: When is there always a path between
two vertices in the graph?


<b>DEFINITION 3</b> <i>An undirected graph is called connected if there is a path between every pair of distinct</i>


<i>vertices of the graph. An undirected graph that is not connected is called disconnected. We</i>
<i>say that we disconnect a graph when we remove vertices or edges, or both, to produce a</i>
disconnected subgraph.


Thus, any two computers in the network can communicate if and only if the graph of this network
is connected.


<b>EXAMPLE 4</b> The graph G1 in Figure 2 is connected, because for every pair of distinct vertices there is a


path between them (the reader should verify this). However, the graph G2 in Figure 2 is not


connected. For instance, there is no path in G2between vertices a and d. ▲


We will need the following theorem in Chapter 11.


</div>
<span class='text_page_counter'>(120)</span><div class='page_container' data-page=120>

Định nghĩa


<i>Ta ký hiệu x</i> <i><sub>∼ y nếu hai đỉnh x và y trong G có thể nối với nhau</sub></i>
bằng một đường đi. Có nghĩa rằng, tồn tại một đường đi


<i>v</i>1<i>, v</i>2<i>,· · · , vk</i>


<i>trong G với x = v</i>1 <i>và y = vk</i>.
<i>a</i>



<i>e</i> <i>b</i>


<i>d</i> <i>c</i>


</div>
<span class='text_page_counter'>(121)</span><div class='page_container' data-page=121>

Dễ thấy, quan hệ<i>∼ là quan hệ tương đương trên tập đỉnh V của G.</i>
<i>Vậy thì V được phân hoạch thành các lớp tương đương rời nhau.</i>


Hai đỉnh nằm trong cùng một lớp nếu giữa chúng có đường đi, và
trong hai lớp khác nhau nếukhơng có đường đi.


Ví dụ


Với đồ thị bên, ta có phân hoạch:


<i>V =</i> <i>V</i><sub>đỏ</sub> <i><sub>∪</sub></i> <i>V</i><sub>xanh</sub>


<i>a</i>


<i>b</i>


<i>c</i>


<i>d</i>
<i>e</i>


<i>f</i>


</div>
<span class='text_page_counter'>(122)</span><div class='page_container' data-page=122>

Định nghĩa



<i>Giả sử G = (V, E) là một đồ thị và phân hoạch của V tương ứng</i>
với quan hệ tương đương <i>∼ là</i>


<i>V = V</i>1<i>∪ V</i>2<i>∪ · · · ∪ Vr.</i>


<i>Ký hiệu Ei</i> (với 1<i>≤ i ≤ r) là các tập con của E bao gồm các cạnh</i>


<i>với đầu mút nằm trong Vi. Vậy thì các đồ thị Gi= (Vi, Ei</i>) được


gọi là các<i><b>thành phần liên thơng</b></i> <i>của G.</i>


<i>Ta nói G<b>liên thơng</b></i> nếu nó chỉ có một thành phần liên thơng.


</div>
<span class='text_page_counter'>(123)</span><div class='page_container' data-page=123>

Ví dụ


Đồ thị dưới đây khơng liên thơng. Nó có hai thành phần liên thơng.


<i>a</i>


<i>b</i>


<i>c</i>


<i>d</i>
<i>e</i>


<i>f</i>


</div>
<span class='text_page_counter'>(124)</span><div class='page_container' data-page=124>

Bài tập



Tìm số thành phần liên thông của đồ thị với danh sách kề là


<i>a</i> <i>b</i> <i>c</i> <i>d</i> <i>e</i> <i>f</i> <i>g</i> <i>h</i> <i>i</i> <i>j</i>
<i>f</i> <i>c</i> <i>b</i> <i>h</i> <i>c</i> <i>a</i> <i>b</i> <i>d</i> <i>a</i> <i>a</i>


<i>i</i> <i>g</i> <i>e</i> <i>g</i> <i>i</i> <i>c</i> <i>f</i> <i>f</i>


<i>j</i> <i>g</i> <i>j</i> <i>e</i>


</div>
<span class='text_page_counter'>(125)</span><div class='page_container' data-page=125>

Bài tập


Đồ thị mô tả bữa tiệc của bà April có bao nhiêu thành phần liên
thơng?


</div>
<span class='text_page_counter'>(126)</span><div class='page_container' data-page=126>

Định nghĩa


Một hành trình


<i>v</i>1<i>, v</i>2<i>,</i> <i>· · · , vr+1</i>


<i>trong đó mọi đỉnh đều phân biệt ngoại trừ v</i>1 <i>= vr+1</i> được gọi là


một<i><b>chu trình</b></i>.


<i>Vì nó có r đỉnh phân biệt và r cạnh nên ta cũng thường gọi nó là</i>


<i>r-<b>chu trình</b></i>, hay chu trình<i><b>độ dài</b></i> <i>r.</i>


<i>a</i>



<i>e</i> <i>b</i>


<i>d</i> <i>c</i>


</div>
<span class='text_page_counter'>(127)</span><div class='page_container' data-page=127>

Bài tập


▶ Hình dưới đây thể hiện các địa điểm thú vị trên đảo Wanda và
đường đi giữa chúng.


▶ Hãy tìm đường đi trên đảo để thăm mỗi địa điểm đúng một
lần và trở về vị trí xuất phát.


<i>p</i> <i>q</i>


<i>s</i>


<i>t</i>
<i>r</i>


<i>u</i>


</div>
<span class='text_page_counter'>(128)</span><div class='page_container' data-page=128>

Bài tập


Hãy tìm cách để đi hết các con đường, mỗi đường đúng một lần.
Địa điểm bắt đầu và kết thúc có thể khác nhau.


<i>p</i> <i>q</i>


<i>s</i>



<i>t</i>
<i>r</i>


<i>u</i>


</div>
<span class='text_page_counter'>(129)</span><div class='page_container' data-page=129>

Định nghĩa


▶ Chu trình chứa mọi đỉnh của đồ thị gọi là <i><b>chu trình</b></i>


<i><b>Hamilton</b></i>.


▶ Hành trình dùng mỗi cạnh đúngmột lần gọi là<i><b>hành trình</b></i>


<i><b>Euler</b></i>.


</div>
<span class='text_page_counter'>(130)</span><div class='page_container' data-page=130>

Bài tập


Tìm chu trình Hamilton của đồ thị tạo bởi các đỉnh và cạnh của
khối lập phương.


<b>10.7 Planar Graphs 719</b>



<b>FIGURE 2</b>

<b>The</b>


<b>Graph K</b>

<b><sub>4</sub></b>

<b>.</b>



<b>FIGURE 3</b>

K

<b><sub>4</sub></b>

<b>Drawn</b>


<b>with No Crossings.</b>



<b>FIGURE 4</b>

<b>The</b>


<b>Graph Q</b>

<b><sub>3</sub></b>

<b>.</b>




<b>FIGURE 5</b>

<b>A Planar</b>


<b>Representation of Q</b>

<b><sub>3</sub></b>

<b>.</b>



<b>DEFINITION 1</b>

<i>A graph is called planar if it can be drawn in the plane without any edges crossing (where</i>



a crossing of edges is the intersection of the lines or arcs representing them at a point other


<i>than their common endpoint). Such a drawing is called a planar representation of the graph.</i>



A graph may be planar even if it is usually drawn with crossings, because it may be possible


to draw it in a different way without crossings.



<b>EXAMPLE 1</b>

Is K

<sub>4</sub>

(shown in Figure 2 with two edges crossing) planar?



<i>Solution:</i>

K

<sub>4</sub>

is planar because it can be drawn without crossings, as shown in Figure 3.



<b>EXAMPLE 2</b>

Is Q

<sub>3</sub>

, shown in Figure 4, planar?



<i>Solution:</i>

Q

<sub>3</sub>

is planar, because it can be drawn without any edges crossing, as shown in



Figure 5.



We can show that a graph is planar by displaying a planar representation. It is harder to


show that a graph is nonplanar. We will give an example to show how this can be done in an ad


hoc fashion. Later we will develop some general results that can be used to do this.



<b>EXAMPLE 3</b>

Is K

<sub>3,3</sub>

, shown in Figure 6, planar?



<i>Solution:</i>

Any attempt to draw K

<sub>3,3</sub>

in the plane with no edges crossing is doomed. We now




show why. In any planar representation of K

<sub>3,3</sub>

<i>, the vertices v</i>

<sub>1</sub>

<i>and v</i>

<sub>2</sub>

must be connected to both



<i>v</i>

<sub>4</sub>

<i>and v</i>

<sub>5</sub>

. These four edges form a closed curve that splits the plane into two regions, R

<sub>1</sub>

and



R

<sub>2</sub>

<i>, as shown in Figure 7(a). The vertex v</i>

<sub>3</sub>

is in either R

<sub>1</sub>

or R

<sub>2</sub>

<i>. When v</i>

<sub>3</sub>

is in R

<sub>2</sub>

, the inside



<i>of the closed curve, the edges between v</i>

3

<i>and v</i>

4

<i>and between v</i>

3

<i>and v</i>

5

separate R

2

into two



subregions, R

<sub>21</sub>

and R

<sub>22</sub>

, as shown in Figure 7(b).



<i>v</i><sub>1</sub> <i>v</i><sub>2</sub>


<i>v</i>6


<i>v</i><sub>3</sub>


<i>v</i>5


<i>v</i>4


<b>FIGURE 6</b>

<b>The Graph K</b>

<b>3,3</b>

<b>.</b>



<i>v</i>1
<i>v</i><sub>4</sub>
<i>v</i>5
<i>v</i><sub>2</sub>
<i>v</i><sub>1</sub>
<i>v</i><sub>4</sub>
<i>v</i><sub>5</sub>
<i>v</i><sub>2</sub>


<i>v</i><sub>3</sub>


<i>R</i>2 <i>R</i>1 <i>R</i>1


<i>R</i><sub>21</sub>


(a) (b)


<i>R</i><sub>22</sub>


</div>
<span class='text_page_counter'>(131)</span><div class='page_container' data-page=131>

Bài tập


Năm tới, Dr Chunner và Dr Dodder định đi thăm đảo Mianda. Các
địa điểm hấp dẫn và đường đi nối giữa chúng được biểu diễn bởi
đồ thị có danh sách kề là


0 1 2 3 4 5 6 7 8


1 0 1 0 3 0 1 0 1


3 2 3 2 5 4 5 2 3


5 6 7 4 6 7 6 5


7 8 8 8 8 7


▶ Liệu họ có thể tìm đường đi trên đảo để thăm mỗi địa điểm
đúng một lần và trở về vị trí xuất phát?


▶ Liệu họ có thể tìm cách để đi hết các con đường, mỗi đường


đúng một lần; địa điểm bắt đầu và kết thúc có thể khác nhau?


</div>
<span class='text_page_counter'>(132)</span><div class='page_container' data-page=132>

Cây



Trần Vĩnh Đức


HUST


Ngày 24 tháng 7 năm 2018


</div>
<span class='text_page_counter'>(133)</span><div class='page_container' data-page=133>

Tài liệu tham khảo



▶ <i>Norman L. Biggs, Discrete Mathematics, Oxford University</i>
Press, 2002.


▶ <i>L. Lovász, J. Pelikán, K. Vesztergombi, Discrete Mathematics:</i>


<i>Elementary and Beyond, Springer-Verlag New York, 2003.</i>


▶ <i>K. H. Rosen, Toán học rời rạc ứng dụng trong tin học.</i>


</div>
<span class='text_page_counter'>(134)</span><div class='page_container' data-page=134>

Nội dung



Một số tính chất của cây


</div>
<span class='text_page_counter'>(135)</span><div class='page_container' data-page=135>

Định nghĩa


<i>Ta nói rằng đồ thị T là một<b>cây</b></i> nếu nó có hai tính chất:
<b>(T1)</b> <i>T liên thơng;</i>



<b>(T2)</b> <i>T khơng có chu trình.</i>


Ví dụ


</div>
<span class='text_page_counter'>(136)</span><div class='page_container' data-page=136>

<i>Các cây với 1, 2 hoặc 3 đỉnh</i>



</div>
<span class='text_page_counter'>(137)</span><div class='page_container' data-page=137>

Có hai cây với 4 đỉnh



</div>
<span class='text_page_counter'>(138)</span><div class='page_container' data-page=138>

Có ba cây với 5 đỉnh



</div>
<span class='text_page_counter'>(139)</span><div class='page_container' data-page=139>

Bài tập


Ta biết rằng có sáu cây (đơi một khơng đẳng cấu) với sáu đỉnh;
hãy vẽ chúng.


</div>
<span class='text_page_counter'>(140)</span><div class='page_container' data-page=140>

Mệnh đề


<i>Nếu T = (V, E) là một cây với ít nhất hai đỉnh, thì với mỗi cặp</i>
<i>đỉnh x, y có duy nhất một đường đi từ x tới y.</i>


Chứng minh.


<i>Vì T liên thơng nên có đường đi từ x tới y. Nếu có đường đi khác</i>
<i>từ x tới y, vậy thì ta có chu trình</i>


<i>x</i>


<i>y</i>


Mâu thuẫn với định nghĩa của cây.



</div>
<span class='text_page_counter'>(141)</span><div class='page_container' data-page=141>

Bài tập


Hãy chứng minh rằng tính chất:


<b>(T3)</b> <i>với mỗi cặp đỉnh x, y có duy nhất một đường đi từ x tới y;</i>


kéo theo cả hai tính chất:
<b>(T1)</b> <i>T liên thơng; và</i>


<b>(T2)</b> <i>T khơng có chu trình.</i>


</div>
<span class='text_page_counter'>(142)</span><div class='page_container' data-page=142>

Mệnh đề


<i>Nếu T = (V, E) là một cây với ít nhất hai đỉnh, thì đồ thị thu</i>
<i>được từ T bằng cách xóa đi một cạnh bất kỳ sẽ có hai thành phần</i>
liên thông, mỗi thành phần là một cây.


</div>
<span class='text_page_counter'>(143)</span><div class='page_container' data-page=143>

Mệnh đề


<i>Nếu T = (V, E) là một cây thì<sub>|E| = |V| − 1.</sub></i>


1


2 3 4


5 6 7 8


9



</div>
<span class='text_page_counter'>(144)</span><div class='page_container' data-page=144>

Chứng minh bằng quy nạp mạnh


<i>Đặt P(n) = “Cây với n đỉnh có n<sub>− 1 cạnh”</sub></i>


Bước cơ sở:<i>P(1) đúng. Tại sao?</i>


Bước quy nạp:<i>Giả sử P(1),<sub>· · · , P(k) đều đúng để chứng minh</sub></i>


<i>P(k + 1).</i>


▶ <i>Xét T là cây với</i> <i>|V| = k + 1 và xét uv là một cạnh của T.</i>


▶ <i>Xóa cạnh uv khỏi T ta được hai cây T</i>1 <i>= (V</i>1<i>, E</i>1) và


<i>T</i>2 <i>= (V</i>2<i>, E</i>2), ta có


<i>|V</i>1<i>| + |V</i>2<i>| = |V|,</i> <i>|E</i>1<i>| + |E</i>2<i>| = |E| − 1.</i>


▶ Áp dụng giả thiết quy nạp ta được


<i>|E| = |E</i>1<i>| + |E</i>2<i>| + 1</i>


= (<i>|V</i>1<i>| − 1) + (|V</i>2<i>| − 1) + 1</i>
=<i>|V| − 1.</i>


</div>
<span class='text_page_counter'>(145)</span><div class='page_container' data-page=145>

Định lý


<i>Nếu T = (V, E) là một cây với ít nhất hai đỉnh, vậy thì:</i>


<b>(T3)</b> <i>với mỗi cặp đỉnh x, y có duy nhất một đường đi từ x tới y;</i>



<b>(T4)</b> <i>đồ thị thu được từ T bằng cách xóa đi một cạnh bất kỳ sẽ có</i>
hai thành phần liên thơng, mỗi thành phần là một cây;


<b>(T5)</b> <i><sub>|E| = |V| − 1.</sub></i>


</div>
<span class='text_page_counter'>(146)</span><div class='page_container' data-page=146>

Bài tập


<i>Xét cây T = (V, E) với<sub>|V| ≥ 2. Hãy chứng minh rằng T có ít nhất</sub></i>
hai đỉnh bậc 1.


</div>
<span class='text_page_counter'>(147)</span><div class='page_container' data-page=147>

Bài tập


<i>Xét T = (V, E) là cây với</i> <i><sub>|V| ≥ 2. Hãy dùng tính chất</sub></i>
<b>(T5)</b> <i><sub>|E| = |V| − 1;</sub></i>


<i>để chứng minh rằng T có ít nhất hai đỉnh bậc 1.</i>


</div>
<span class='text_page_counter'>(148)</span><div class='page_container' data-page=148>

Bài tập


<i>Ta nói rằng đồ thị F là một<b>rừng</b></i> nếu nó có tính chất:
<b>(T2)</b> <i>F khơng có chu trình.</i>


<i>Hãy chứng minh rằng nếu F = (V, E) là một rừng với c thành</i>
phần liên thơng thì


<i>|E| = |V| − c.</i>


</div>
<span class='text_page_counter'>(149)</span><div class='page_container' data-page=149>

Định lý



<i>Xét đồ thị T = (V, E). Các khẳng định sau đây là tương đương</i>
nhau:


<b>1.</b> <i>T là cây;</i>


<b>2.</b> <i>T không chứa chu trình và|E| = |V| − 1;</i>


<b>3.</b> <i>T liên thơng và</i> <i><sub>|E| = |V| − 1;</sub></i>


<b>4.</b> <i>T là đồ thị liên thơng, nhưng nếu xóa đi một cạnh bất kỳ thì</i>


đồ thị thu được là khơng liên thơng;


<b>5.</b> <i>Hai đỉnh khác nhau bất kỳ của T được nối với nhau bởi đúng</i>
một đường;


<b>6.</b> <i>T khơng chứa chu trình, nhưng nếu ta thêm một cạnh nối hai</i>


<i>đỉnh không kề nhau trong T thì đồ thị nhận được có đúng</i>
một chu trình.


</div>
<span class='text_page_counter'>(150)</span><div class='page_container' data-page=150>

Bài tập


Hãy chứng minh định lý trước.


</div>
<span class='text_page_counter'>(151)</span><div class='page_container' data-page=151>

Nội dung



Một số tính chất của cây


</div>
<span class='text_page_counter'>(152)</span><div class='page_container' data-page=152>

Câu hỏi



<i>Có bao nhiêu cây với n đỉnh?</i>


</div>
<span class='text_page_counter'>(153)</span><div class='page_container' data-page=153>

Câu hỏi


Hai cây này có trùng nhau?


</div>
<span class='text_page_counter'>(154)</span><div class='page_container' data-page=154>

Cây gán nhãn



▶ Ta cố định các đỉnh của cây, mỗi đỉnh được gán một nhãn.


▶ Hai cây là giống nhau nếu và chỉ nếu chúng có cùng tập cạnh.


</div>
<span class='text_page_counter'>(155)</span><div class='page_container' data-page=155>

Ví dụ


Hốn đổi nhãn 2 và 4 của cây gán nhãn dưới đây cho ta một cây
gán nhãn khác.


</div>
<span class='text_page_counter'>(156)</span><div class='page_container' data-page=156>

Bài tập


<i>Tìm số cây gán nhãn với 2, 3, 4, và 5 đỉnh?</i>


</div>
<span class='text_page_counter'>(157)</span><div class='page_container' data-page=157>

Định lý (Cayley)


<i>Số cây gán nhãn với n đỉnh là nn−2</i>.


Trong phần còn lại của mục này, ta sẽ đi chứng minh định lý
Cayley.


</div>
<span class='text_page_counter'>(158)</span><div class='page_container' data-page=158>

Lưu trữ cây: dùng ma trận kề




0 0 1 1 0 0 0 0 0 0


0 0 0 0 0 0 1 0 0 0


1 0 0 0 1 0 1 0 0 0


1 0 0 0 0 0 0 0 0 0


0 0 1 0 0 0 0 0 0 0


0 0 0 0 0 0 1 0 0 0


0 1 1 0 0 1 0 0 0 0


0 0 0 0 0 0 0 0 0 1


0 0 0 0 0 0 0 0 0 1


0 0 0 0 0 0 0 1 1 0


</div>
<span class='text_page_counter'>(159)</span><div class='page_container' data-page=159>

Mệnh đề


<i>Số lượng cây gán nhãn với n đỉnh phải không nhiều hơn 2(n</i>2<i><sub>−n)/2</sub></i>


.
Tại sao?


</div>
<span class='text_page_counter'>(160)</span><div class='page_container' data-page=160>

Lưu trữ cây: dùng danh sách cạnh




7 8 9 6 3 0 2 6 6


9 9 2 2 0 2 4 1 5


</div>
<span class='text_page_counter'>(161)</span><div class='page_container' data-page=161>

Mệnh đề


<i>Số lượng cây gán nhãn với n đỉnh phải ít hơn 22n log</i><sub>2</sub><i>n</i><sub>.</sub>


Tại sao?


</div>
<span class='text_page_counter'>(162)</span><div class='page_container' data-page=162>

Lưu trữ cây: dùng Father code



▶ Cố định một đỉnh làm gốc (ví dụ đỉnh có nhãn nhỏ nhất).


▶ Liệt kê các cạnh giống như lưu trữ dùng danh sách cạnh (theo
hai dòng); tuy nhiên


▶ với mỗi cạnh, đỉnh ở dịng dưới ln là đỉnh gần gốc hơn (hay
cịn gọi là cha của) đỉnh ở dòng trên, và


▶ các đỉnh ở trên được sắp thứ tự.


</div>
<span class='text_page_counter'>(163)</span><div class='page_container' data-page=163>

Father code: Ví dụ



1 2 3 4 5 6 7 8 9


6 0 0 2 6 2 9 9 2


Câu hỏi



Tại sao dòng đầu tiên lại là các
<i>số 1, 2, 3, 4, 5, 6, 7, 8, 9?</i>


</div>
<span class='text_page_counter'>(164)</span><div class='page_container' data-page=164>

Father code



▶ <i>Nếu cây có n đỉnh thì dịng đầu tiên ln là 1, 2, . . . , n<sub>− 1.</sub></i>


▶ Tại sao số 0 khơng xuất hiện ở dịng đầu tiên?


▶ Vậy ta có thể xóa dịng đầu tiên.


▶ Father code là dòng thứ 2.


</div>
<span class='text_page_counter'>(165)</span><div class='page_container' data-page=165>

Bài tập


Xét các ”mã” sau:


1. <i>(0, 1, 2, 3, 4, 5, 6, 7);</i>


2. <i>(7, 6, 5, 4, 3, 2, 1, 0);</i>


3. <i>(0, 0, 0, 0, 0, 0, 0, 0);</i>


4. <i>(2, 3, 1, 2, 3, 1, 2, 3).</i>


Những mã nào ở trên có thể là ”father codes” của cây?


</div>
<span class='text_page_counter'>(166)</span><div class='page_container' data-page=166>

Mệnh đề


<i>Số lượng cây gán nhãn với n đỉnh phải không nhiều hơn nn−1</i>.



</div>
<span class='text_page_counter'>(167)</span><div class='page_container' data-page=167>

Lưu trữ cây: dùng Prüfer code mở rộng



Thuật tốn tính Prüfer code mở rộng từ cây


<b>1.</b> Nếu cây khơng có cạnh nào thì thuật
tốn dừng.


<b>2.</b> <i>Tìm đỉnh u có bậc 1 và có nhãn nhỏ nhất</i>
khác 0.


<b>3.</b> <i>Gọi cạnh có đầu mút u là<sub>{u, v}. Ghi ra</sub></i> <i>u<sub>v</sub></i>.


<b>4.</b> <i>Xóa đỉnh u và cạnh</i> <i><sub>{u, v} khỏi cây.</sub></i>


<b>5.</b> Quay lại bước 1.


8.4 How to Store Trees 151


0
1
5 2
6 3
7
4


FIGURE 8.5. A tree reconstructed from its Prăufer code


How does the first row start? Remember that this is the node that we
delete in the first step; by the rule of constructing the Prăufer code, this is


the node with degree 1 with smallest label. Could this node be node 1? No,
because then we would have to delete it in the first step, and it could no
longer occur, but it does. By the same token, no number occurring in the
second row could be a leaf of the tree at the beginning. This rules out 2, 3,
and 4.


What about 5? It does not occur in the second row; does this mean that
it is a leaf of the original tree? The answer is yes; otherwise, 5 would have
been the father of some other node, and it would have been written in
the second row when this other node was deleted. Thus 5 was a leaf with
smallest label, and the first row of the extended Prăufer code must start
with 5.


Let’s try to figure out the next entry in the first row, which is, as we
know, the leaf with smallest label of the tree after 5 was deleted. The node
1 is still ruled out, since it occurs later in the second row ; but 2 does not
occur again, which means (by the same argument as before) that 2 was the
leaf with smallest label after 5 was deleted. Thus the second entry in the
first row is 2.


Similarly, the third entry must be 4, since all the smaller numbers either
occur later or have been used already. Continuing in a similar fashion, we
get that the full array must have been


5 2 4 6 7 3 1
2 4 0 3 3 1 0
This corresponds to the tree in Figure 8.5


Proof. [of Lemma 8.4.1] The considerations above are completely general,
and can be summed up as follows:



Each entry in the first row of the extended Prăufer code is the
smallest integer that does not occur in the first row before it,
nor in the second row below or after it.


</div>
<span class='text_page_counter'>(168)</span><div class='page_container' data-page=168>

Prüfer code mở rộng



1 3 4 5 6 7 8 9 2


6 0 2 6 2 9 9 2 0


Câu hỏi


Tại sao vị trí cuối ở hàng dưới
luôn là 0?


</div>
<span class='text_page_counter'>(169)</span><div class='page_container' data-page=169>

Bổ đề


Hàng đầu tiên của một Prüfer code mở rộng có thể tính được từ
hàng thứ hai.


</div>
<span class='text_page_counter'>(170)</span><div class='page_container' data-page=170>

Ví dụ


Giả sử ta có một Prüfer code mở rộng cịn thiếu hàng trên như sau:


<i>x</i><sub>1</sub>


2 4 0 3 3 1 0


<i>Đỉnh x</i>1 phải thỏa mãn ba điều kiện:



1. <i>x</i><sub>1</sub><i><sub>∈ {0, 1, . . . , 7}. Tại sao?</sub></i>


2. <i>x</i><sub>1</sub> là đỉnh bậc 1, có nhãn nhỏ nhất khác 0.


3. <i>khi xây dựng dãy từ cây, x</i>1 bị xóa khỏi cây ở bước đầu tiên.


<i>Điều kiện 3 chỉ ra rằng x</i><sub>1</sub> sẽ không xuất hiện trong hàng 2. Tại
<i>sao? Từ điều kiện 2, ta được x</i>1 = 5. Tại sao?


</div>
<span class='text_page_counter'>(171)</span><div class='page_container' data-page=171>

Ví dụ


Tiếp tục ví dụ trước, bây giờ ta có:


5 <i>x</i><sub>2</sub>


2 4 0 3 3 1 0


<i>Đỉnh x</i>2 phải thỏa mãn ba điều kiện:


1. <i>x</i><sub>2</sub><i><sub>∈ {0, 1, . . . , 7}. Tại sao?</sub></i>


2. <i>x</i><sub>2</sub> là đỉnh bậc 1, có nhãn nhỏ nhất khác 0 và 5.


3. <i>khi xây dựng dãy từ cây, x</i>2 bị xóa khỏi cây ở bước thứ hai.


<i>Vậy x</i><sub>2</sub> = 2.


</div>
<span class='text_page_counter'>(172)</span><div class='page_container' data-page=172>

Bài tập



Hãy hoàn thành nốt hàng trên của Prüfer code mở rộng sau


5 2


2 4 0 3 3 1 0


</div>
<span class='text_page_counter'>(173)</span><div class='page_container' data-page=173>

Khẳng định


Mỗi phần tử ở hàng đầu tiên của Prüfer code mở rộng là số
nguyên nhỏ nhất thỏa mãn:


▶ ở hàng đầu tiên, số này khơng xuất hiện trước nó;


▶ ở hàng thứ hai, số này khơng xuất hiện ở dưới nó hoặc phía
sau nó.


Ví dụ


/


1 3/ 4/ <b>?</b>


6 0 2 6/ 2/ 9/ 9/ 2/ 0/


</div>
<span class='text_page_counter'>(174)</span><div class='page_container' data-page=174>

Prüfer code



▶ Ta khơng cần lưu trữ tồn bộ Prüfer code mở rộng, mà


▶ <i>ta chỉ cần lưu tữ dãy gồm n<sub>− 2 phần tử của</sub></i>hàng thứ hai.



▶ Dãy này gọi là<i><b>Prüfer code</b></i> của cây.


▶ <i>Vậy thì, Prüfer code là một dãy số độ dài n− 2, với mỗi phần</i>
<i>tử của nó là một số nguyên từ 0 đến n<sub>− 1.</sub></i>


</div>
<span class='text_page_counter'>(175)</span><div class='page_container' data-page=175>

Bổ đề


<i>Mọi dãy có độ dài n<sub>− 2 gồm các số nguyên giữa 0 và n − 1 đều là</sub></i>
<i>Prüfer code của một cây n đỉnh nào đó.</i>


Ta đã hồn thành chứng minh định lý sau chưa?


Định lý (Cayley)


<i>Số cây gán nhãn với n đỉnh là nn−2</i><sub>.</sub>


</div>
<span class='text_page_counter'>(176)</span><div class='page_container' data-page=176>

Bài tập (Lập trình)


Viết chương trình nhập vào một dãy là mã Prüfer của một cây và
in ra cây đó. Bạn có thể hiện cây ở dạng danh sách cạnh, hoặc sử
dụng công cụ Graphviz để vẽ tự động.


</div>
<span class='text_page_counter'>(177)</span><div class='page_container' data-page=177>

Cài đặt Prufer Code



1. Version 1


2. Version 2


3. Version 3



</div>
<span class='text_page_counter'>(178)</span><div class='page_container' data-page=178>

màu

đỉnh của đồ thị



Trần Vĩnh Đức


HUST


Ngày 24 tháng 7 năm 2018


</div>
<span class='text_page_counter'>(179)</span><div class='page_container' data-page=179>

Tài liệu tham khảo



▶ <i>Norman L. Biggs, Discrete Mathematics, Oxford University</i>
Press, 2002.


</div>
<span class='text_page_counter'>(180)</span><div class='page_container' data-page=180>

Nội dung



Định nghĩa và ví dụ


Thuật tốn tham lam tơ màu đỉnh


Đồ thị hai phần


</div>
<span class='text_page_counter'>(181)</span><div class='page_container' data-page=181>

Ví dụ


<i>Trường BK muốn xếp giờ học cho sáu môn học v</i>1<i>, v</i>2<i>, v</i>3<i>, v</i>4<i>, v</i>5<i>, v</i>6
biết rằng có một vài sinh viên học các môn :


<i>v</i>1 <i>và v</i>2, <i>v</i>1 <i>và v</i>4, <i>v</i>3 <i>và v</i>5, <i>v</i>2 <i>và v</i>6,


<i>v</i><sub>4</sub> <i>và v</i><sub>5</sub>, <i>v</i><sub>5</sub> <i>và v</i><sub>6</sub>, <i>v</i><sub>1</sub> <i>và v</i><sub>6</sub>.



<i>v</i><sub>1</sub>


<i>v</i><sub>2</sub>


<i>v</i>3


<i>v</i>4


<i>v</i>5


<i>v</i><sub>6</sub>


</div>
<span class='text_page_counter'>(182)</span><div class='page_container' data-page=182>

Xếp lịch học



<i>v</i>1


<i>v</i>2


<i>v</i><sub>3</sub>


<i>v</i><sub>4</sub>
<i>v</i><sub>5</sub>


<i>v</i>6


Tiết 1 Tiết 2 Tiết 3 Tiết 4


<i>v</i><sub>1</sub> <i>và v</i><sub>3</sub> <i>v</i><sub>2</sub> <i>và v</i><sub>4</sub> <i>v</i><sub>5</sub> <i>v</i><sub>6</sub>


</div>
<span class='text_page_counter'>(183)</span><div class='page_container' data-page=183>

Xếp lịch học




▶ Ta tìm cách phân hoạch tập đỉnh thành 4 phần sao cho khơng
phần nào chứa cặp đỉnh kề nhau.


▶ Một cách hình thức, đây là một hàm


<i>c :</i> <i>{v</i>1<i>, v</i>2<i>, v</i>3<i>, v</i>4<i>, v</i>5<i>, v</i>6<i>} −→ {1, 2, 3, 4}</i>
gán mỗi đỉnh với một giờ học.


▶ Không mất tổng quát ta dùng các số nguyên dương cho các
màu.


</div>
<span class='text_page_counter'>(184)</span><div class='page_container' data-page=184>

Định nghĩa


Một cách<i><b>tô màu</b>đỉnh của đồ thị G = (V, E) là một hàm</i>


<i>c : V<sub>−→ N</sub></i>


thỏa mãn tính chất : Nếu<i>{x, y} ∈ E thì c(x) ̸= c(y).</i>


<i>v</i><sub>1</sub>


<i>v</i><sub>2</sub>


<i>v</i>3


<i>v</i>4


<i>v</i>5



<i>v</i><sub>6</sub>


</div>
<span class='text_page_counter'>(185)</span><div class='page_container' data-page=185>

Định nghĩa


<i><b>Sắc số</b>của đồ thị G, ký hiệu là χ(G), là số ngun k nhỏ nhất</i>


<i>thỏa mãn có một cách tơ màu G dùng k màu.</i>


<i>Nói cách khác, χ(G) = k nếu và chỉ nếu có một cách tơ màu c từ</i>


<i>V tới tập</i> <i><sub>{1, 2, . . . , k}, và k là số nguyên nhỏ nhất thỏa mãn tính</sub></i>


chất này.


Ví dụ


Tìm sắc số của đồ thị


<i>v</i>1


<i>v</i>2


<i>v</i><sub>3</sub>


<i>v</i>4


<i>v</i><sub>5</sub>
<i>v</i>6


</div>
<span class='text_page_counter'>(186)</span><div class='page_container' data-page=186>

Tìm số màu




Để chứng minh rằngsắc số <i>của một đồ thị là k thì ta phải:</i>


1. <i>tìm một cách tơ màu dùng k màu;</i>


2. <i>chứng minh rằng khơng có cách tơ màu nào dùng ít hơn k</i>
màu.


</div>
<span class='text_page_counter'>(187)</span><div class='page_container' data-page=187>

Bài tập


Tìm sắc số của các đồ thị sau:
<b>(i)</b> <i>đồ thị đầy đủ Kn</i>;


<b>(ii)</b> <i>đồ thị vòng C<sub>2r</sub></i>;
<b>(iii)</b> <i>đồ thị vòng C2r+1</i>;


</div>
<span class='text_page_counter'>(188)</span><div class='page_container' data-page=188>

Bài tập


Tìm sắc số của các đồ thị sau:


</div>
<span class='text_page_counter'>(189)</span><div class='page_container' data-page=189>

Bài tập


<i>Hãy mô tả tất cả các đồ thị G có χ(G) = 1.</i>


</div>
<span class='text_page_counter'>(190)</span><div class='page_container' data-page=190>

Nội dung



Định nghĩa và ví dụ


Thuật tốn tham lam tơ màu đỉnh



Đồ thị hai phần


</div>
<span class='text_page_counter'>(191)</span><div class='page_container' data-page=191>

Bài toán


<i>Cho đồ thị G. Hãy tìm χ(G).</i>


là bài tốn khó. Người ta chưa biết thuật tốn “nhanh” nào để
giải nó, và hầu hết mọi người đều tin rằng khơng có thuật tốn
như vậy.


</div>
<span class='text_page_counter'>(192)</span><div class='page_container' data-page=192>

Thuật toán tham lam


<b>1.</b> <i>Sắp thứ tự các đỉnh theo thứ tự nào đó: v</i><sub>1</sub><i>, v</i>2<i>,· · · , vn</i>.


<b>2.</b> <i>for i = 1, 2, . . . , n :</i>


<b>3.</b> Gán màuhợp lệ nhỏ nhất <i>cho vi</i>.


</div>
<span class='text_page_counter'>(193)</span><div class='page_container' data-page=193>

Bài tập


Dùng thuật tốn tham lam để tơ màu đồ thị sau:


<i>v</i>1


<i>v</i>2


<i>v</i>3


<i>v</i><sub>4</sub>
<i>v</i>5



<i>v</i>6


</div>
<span class='text_page_counter'>(194)</span><div class='page_container' data-page=194>

Bài tập


Tìm một cách sắp thứ tự các đỉnh để thuật tốn tham lam tơ màu
đồ thị sau dùng ít màu nhất có thể.


</div>
<span class='text_page_counter'>(195)</span><div class='page_container' data-page=195>

Bài tập


Tìm một cách sắp thứ tự các đỉnh để thuật tốn tham lam tơ màu
đồ thị sau dùng ít màu nhất có thể.


</div>
<span class='text_page_counter'>(196)</span><div class='page_container' data-page=196>

Mệnh đề


<i>Nếu mọi đỉnh trong G đều có bậc<sub>≤ k, thì</sub></i> thuật tốn tham lam


<i>dùng nhiều nhất k + 1 màu.</i>


<i>Thử chứng minh bằng quy nạp theo k</i>


<i>Đặt P(k) = “nếu mọi đỉnh trong G đều có bậc≤ k thì thuật tốn</i>
<i>tham lam dùng nhiều nhất k + 1 màu”</i>


Bước cơ sở : <i>P(0) đúng. Tại sao?</i>


Bước quy nạp : <i>Giả sử P(k) đúng để chứng minh P(k + 1) !!!</i>


</div>
<span class='text_page_counter'>(197)</span><div class='page_container' data-page=197>

Chứng minh bằng quy nạp theo số đỉnh




<i>Đặt P(n) = “Đồ thị G vớin đỉnh</i> <i>và bậc mọi đỉnh trong G đều</i>


<i>≤ k thì thuật tốn tham lam dùng nhiều nhất k + 1 màu.”</i>


Bước cơ sở : <i>P(1) đúng vì G khơng có cạnh nào.</i>


Bước quy nạp : <i>Giả sử P(n) đúng để chứng minh P(n + 1).</i>


▶ <i>Xét G là đồ thị bất kỳ với n + 1 đỉnh và có bậc lớn nhất<sub>≤ k.</sub></i>


▶ <i>Sắp xếp các đỉnh theo thứ tự nào đó: v</i>1<i>, v</i>2<i>, . . . , vn, vn+1</i>.


▶ <i>Xóa đỉnh vn+1</i> <i>khỏi G ta thu được đồ thị G′</i>.


▶ <i>Đồ thị G′</i> cũng có bậc lớn nhất <i><sub>≤ k. Tại sao?</sub></i>


▶ <i>Theo quy nạp, thuật tốn tham lam tơ màu G′</i> dùng nhiều
<i>nhất k + 1 màu.</i>


</div>
<span class='text_page_counter'>(198)</span><div class='page_container' data-page=198>

Chứng minh (tiếp)



<i>vn+1</i>


<i>u</i>1


<i>u</i><sub>2</sub>


..
.



<i>uℓ</i>


<i>vn+1</i> <i>có ℓ≤ k hàng xóm</i>


▶ <i>Thêm đỉnh vn+1</i> <i>và các cạnh liên quan vào lại G′</i> <i>để được G.</i>


▶ <i>Đỉnh vn+1</i> có<i>≤ k hàng xóm. Tại sao?</i>


▶ Vậy tồn tại một màu hợp lệ trong <i><sub>{1, 2, . . . , k + 1} để tơ cho</sub></i>


<i>vn+1</i>.


▶ <i>Vậy thuật tốn tham lam tô màu G dùng không quá k + 1</i>


màu.

3



</div>
<span class='text_page_counter'>(199)</span><div class='page_container' data-page=199>

Bài tập


Một đồ thị có<i><b>độ rộng</b></i> <i>k<sub>− 1 nếu các đỉnh có nó có thể được sắp</sub></i>


xếp thành dãy


<i>v</i>1<i>, v</i>2<i>,· · · , vn</i>


<i>sao cho mỗi đỉnh vi</i> <i>có cạnh nối với nhiều nhất k− 1 đỉnh đứng</i>


trước nó.


Hãy dùng quy nạp để chứng minh rằng mọi đồ thị với độ rộng nhỏ
<i>hơn hoặc bằng k<sub>− 1 đều có thể tơ bằng k màu.</sub></i>



</div>
<span class='text_page_counter'>(200)</span><div class='page_container' data-page=200>

Mệnh đề


<i>Cho G là đồ thị với mọi đỉnh đều có bậc≤ k. Nếu G liên thơng và</i>
khơng<i>chính quy, vậy thì χ(G)<sub>≤ k.</sub></i>


Hình:Đồ thị này có độ rộng 2. Tại sao?


</div>

<!--links-->

×