1. Trang chủ
  2. » Luận Văn - Báo Cáo

báo cáo giữa kì môn cấu trúc rời rạc

27 2 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

BÁO CÁO ĐƯỢC HOÀN THÀNHTẠI TRƯỜNG ĐẠI HỌC TÔN ĐỨC THẮNGTôi xin cam đoan đây là sản phẩm báo cáo của riêng tôi và được sự hướngdẫn của ThS Nguyễn Lâm.. Các nội dung nghiên cứu, kết quả tr

Trang 1

BÁO CÁO GIỮA KÌ MÔN CẤU TRÚC RỜI RẠC

Người hướng dẫn: TS NGUYỄN LÂMNgười thực hiện: NGUYỄN VŨ THANH LIÊM - 52200206

Lớp : 22050301Khoá : 26

THÀNH PHỐ HỒ CHÍ MINH, NĂM 2024

Trang 2

BÁO CÁO GIỮA KÌ MÔN CẤU TRÚC RỜI RẠC

Người hướng dẫn: ThS NGUYỄN LÂMNgười thực hiện: NGUYỄN VŨ THANH LIÊM - 52200206Lớp : 22050301Khoá : 26

THÀNH PHỐ HỒ CHÍ MINH, NĂM 2024

Trang 4

BÁO CÁO ĐƯỢC HOÀN THÀNHTẠI TRƯỜNG ĐẠI HỌC TÔN ĐỨC THẮNG

Tôi xin cam đoan đây là sản phẩm báo cáo của riêng tôi và được sự hướngdẫn của ThS Nguyễn Lâm Các nội dung nghiên cứu, kết quả trong đề tài này làtrung thực và chưa công bố dưới bất kỳ hình thức nào trước đây Những số liệutrong các bảng biểu phục vụ cho việc phân tích, nhận xét, đánh giá được chínhtác giả thu thập từ các nguồn khác nhau có ghi rõ trong phần tài liệu tham khảo.

Ngoài ra, trong báo cáo còn sử dụng một số nhận xét, đánh giá cũng nhưsố liệu của các tác giả khác, cơ quan tổ chức khác đều có trích dẫn và chú thíchnguồn gốc.

Nếu phát hiện có bất kỳ sự gian lận nào tôi xin hoàn toàn chịu tráchnhiệm về nội dung báo cáo của mình Trường đại học Tôn Đức Thắng không

liên quan đến những vi phạm tác quyền, bản quyền do tôi gây ra trong quá trìnhthực hiện (nếu có).

TP Hồ Chí Minh, ngày 03 tháng 04 năm 2024 Tác giả

(ký tên và ghi rõ họ tên)

Nguyễn Vũ Thanh Liêm

Trang 5

PHẦN XÁC NHẬN VÀ ĐÁNH GIÁ CỦA GIẢNG VIÊNPhần xác nhận của GV hướng dẫn

Tp Hồ Chí Minh, ngày tháng năm (kí và ghi họ tên)

Phần đánh giá của GV chấm bài

Tp Hồ Chí Minh, ngày tháng năm (kí và ghi họ tên)

Trang 6

1.3.6 A valid argument with a false premise and a false conclusion 10

1.3.7 Sound and unsound arguments 11

Trang 8

DANH MỤC CÁC BẢNG BIỂU, HÌNH VẼ, ĐỒ THỊDANH MỤC HÌNH

Hình 3.1 Cơ sở tri thức (Knowledge base) 19

Bảng 2.2 Bảng chân trị mệnh đề ~ (p ~ (q r)) ~ (~q (p ∨ ∧ ∧ ∨ ∨ q)) 16

Bảng 2.3 Bảng chân trị mệnh đề (r q) ~ (q ∧ ∧ ∨ p) 16

Bảng 2.4 Bảng chân trị ~ (p ~ (q r)) ~ (~q (p q)) ≡ (r q) ~ (q p) 17∨ ∧ ∧ ∨ ∨ ∧ ∧ ∨

Trang 9

PHẦN 1

1.1 Vấn đề 1: Password

Gọi các vị từ:

xH = số x có trong mật khẩuxF = x là số đầu tiên của mật khẩuxS = x là số thứ hai của mật khẩuxT = x là số thứ 3 của mật khẩuTrong đó: x {1, 2, …, 8, 9}∈

Ta có các giả thiết:

472: one number is correct but in an incorrect position.4H ~4F7H ~7S2H ~2T4H (7H 2H)⊕ ⊕b 581: one number is correct but in an incorrect position.

5H ~5F8H ~8S1H ~1T5H (8H 1H)⊕ ⊕c 483: one number is correct and in the correct position.

4H 4F8H 8S3H 3T4H (8H 3H)⊕ ⊕d 317: two numbers are correct but in incorrect positions.

3H ~3F

Trang 10

1H ~1S7H ~7T

((3H 1H) (3H 7H)) (1H 7H)∧ ⊕ ∧ ⊕ ∧e 956: all numbers are incorrect.

~9H~5H~6HGiả sử 4H đúng:

Trang 12

Vậy: mật khẩu là 123.

1.2 Vấn đề 2: Conditional statements

1.2.1 Câu a- Mệnh đề đảo:

“If a man, whose life is one long sin against mankind, then he holds a beliefwhich he was taught in childhood or persuaded of afterwards, keeps down and pushesaway any doubts which arise about it in his mind, purposely avoids the reading ofbooks and the company of men that call in question or discuss it, and regards asimpious those questions which cannot easily be asked without disturbing it.”

- Mệnh đề nghịch đảo:

“If a man does not hold a belief which he was taught in childhood or persuadedof afterwards, or does not keep down or push away any doubts which arise about it inhis mind, or does not purposely avoid the reading of books or the company of men thatcall in question or discuss it, or does not regard as impious those questions whichcannot easily be asked without disturbing it - then the life of that man is not one longsin against mankind.”

- Mệnh đề phản đảo:

“If a man, whose life is not one long sin against mankind, then he does not holda belief which he was taught in childhood or persuaded of afterwards, or does not keepdown and push away any doubts which arise about it in his mind, or does not purposelyavoid the reading of books and the company of men that call in question or discuss it,or does not regard as impious those questions which cannot easily be asked withoutdisturbing it.”

- Mệnh đề phủ định:

“A man holding a belief which he was taught in childhood or persuaded ofafterwards, keeps down and pushes away any doubts which arise about it in his mind,purposely avoids the reading of books and the company of men that call in question or

Trang 13

discuss it, and regards as impious those questions which cannot easily be asked withoutdisturbing it but the life of that man is not one long sin against mankind.”

1.2.2 Câu b- Mệnh đề đảo:

“If the planet could feed twice its present population, then existing agriculturalknowledge were everywhere applied.”

“If the colonists' descendants reached the population ceiling of 10 millionpeople within a thousand years, then the initial colonists had consisted of only 100people and their numbers had increased at a rate of only 1.1 percent per year.”

- Mệnh đề nghịch đảo:

“If the initial colonists had not consisted of only 100 people or their numbershad not increased at a rate of only 1.1 percent per year, then the colonists' descendantswould not have reached that population ceiling of 10 million people within a thousandyears.”

- Mệnh đề phản đảo:

Trang 14

“If the colonists' descendants did not reach the population ceiling of 10 millionpeople within a thousand years, then the initial colonists had not consisted of only 100people or their numbers had not increased at a rate of only 1.1 percent per year.”

- Mệnh đề phủ định:

“The initial colonists had consisted of only 100 people and their numbers hadincreased at a rate of only 1.1 percent per year, and the colonists' descendants did notreach that population ceiling of 10 million people within a thousand years.”

1.2.4 Câu d- Mệnh đề đảo:

“If no one was able to see anything that was happening down on the pavement,even beady-eyed Mrs Dursley, then they looked out of their window now.”

“The end of life (1) is death.Happniness is the end of life (2)Therefore, death is happniess.”

End of life (1) means ceasing to live End of life (2) means purpose.

Trang 15

1.3.2 Circular reasoning

“Opium induces sleep because it has a soporific quality.”The terms induces sleep and has a soporific quality mean exactly the same thing There is nothing that is sleep inducing and not have soporific qualities.

Therefore, the ground is not wet.”

The conclusion is false because the ground may be wet due to other reasons.

1.3.6 A valid argument with a false premise and a false conclusion

“All mamals can fly.Dogs are mamals.Therefore, dogs can fly.”

The argument is valid by modus ponen But the premise “All mamals can fly” isfalse, so is the conclusion.

1.3.7 Sound and unsound arguments

Trang 16

“Smoking is unhealthy because cigarettes are expensive.”The conclusion smoking is unhealthy is not incorrect although the premise

cigarettes are expensive is fallacious Hence, the argument is unsound.

Trang 17

ii ∀x, Triangle(x) → ~Orange(x) :

Lượng từ x đúng khi và chỉ khi vị từ Triangle(x) → ~Orange(x) đúng với mọi∀giá trị x.

Xét mọi giá trị x :

Trang 18

Với x = A2: Triangle(A2) → ~Orange(A2) đúngVới x = C2: Triangle(C2) → ~Orange(C2) đúngVới x = D8: Triangle(D8) → ~Orange(D8) đúngVới x = E4: Triangle(E4) → ~Orange(E4) đúngVậy: mệnh đề x, Triangle(x) → ~Orange(x) đúng.∀

iii ∃x such that Red(x) ∧ Triangle(x)

Lượng từ x đúng khi tồn tại một giá trị x làm cho vị từ Red(x) Triangle(x)∃ ∧đúng.

Với x = E4:

Red(E4) Triangle(E4) đúng∧

Vậy: mệnh đề x such that Red(x) Triangle(x) đúng.∃ ∧

iv ∃x such that ~Green(x) BelowOf(x, E4)∧

Lượng từ x đúng khi tồn tại một giá trị x làm cho vị từ ~Green(x) ∃ ∧BelowOf(x, E4) đúng.

Với x = F1:

~Green(F1) BelowOf(F1, E4) đúng∧

Vậy: mệnh đề x such that ~Green(x) BelowOf(x, E4) đúng∃ ∧

Trang 19

vi ∃x such that AboveOf(E5, x) LeftOf(x, E5)∧

Lượng từ x đúng khi tồn tại một giá trị x làm cho vị từ AboveOf(E5, x) ∃ ∧LeftOf(x, E5) đúng.

Với x = H2:

AboveOf(E5, H2) LeftOf(H2, E5) đúng∧

Vậy: mệnh đề x such that AboveOf(E5, x) LeftOf(x, E5) đúng.∃ ∧

vii There is a triangle x such that for all squares y, x is above y

Lượng từ x y đúng khi tồn tại một giá trị x thỏa Triangle(x) sao cho vị từ∃ ∀Square(y) → AboveOf(x, y) đúng với mọi giá trị y.

Với x = A2:

Triangle(A2) đúngXét mọi giá trị y:

Với y = C7: Square(C7) → AboveOf(A2, C7) đúngVới y = D3: Square(D3) → AboveOf(A2, D3) đúngVới y = F1: Square(F1) → AboveOf(A2, F1) đúngVới y = E6: Square(E6) → AboveOf(A2, E6) đúngVới y = G7: Square(G7) → AboveOf(A2, G7) đúng

Vậy: mênh đề ‘There is a triangle x such that for all squares y, x is above y’đúng.

viii For all circles x, there is a square y such that y is to the right of xLượng từ x y sai khi tồn tại một giá trị x thỏa Circle(x) làm cho vị từ∀ ∃Square(y) → RightOf(y, x) sai với mọi giá trị y.

Với x = I1:

Circle(C9) đúngXét mọi giá trị y:

Trang 20

Với y = C7: Square(C7) → RightOf(C7, C9) saiVới y = D3: Square(D3) → RightOf(D3, C9) saiVới y = F1: Square(F1) → RightOf(F1, C9) saiVới y = E6: Square(E6) → RightOf(E6, C9) sai

Vậy: mệnh đề ‘For all circles x, there is a square y such that y is to the right ofx’ sai.

ix There is a circle x and there is a square y such that y is below xLương từ x y đúng khi tồn tại một cặp giá trị (x, y) sao cho các vị từ Circle∃ ∃(x) và Square(y) → BelowOf(y, x) đúng.

Với x = E5:

Circle(E5) đúng

Với y = G7: Square(G7) → BelowOf(G7, E5) đúng

Vậy: mệnh đề ‘There is a circle x and there is a square y such that y is below x’đúng.

x For all circles x and for all triangles y, x and y have the same colorLượng từ x x sai khi tồn tại một cặp giá trị (x, y) sao cho các vị từ Circle(x)∀ ∀đúng và Triangle(y) → ((Red(x) Red(y)) (Green(x) Green(y)) (Orange(x) ∧ ∨ ∧ ∨ ∧Orange(y)) sai.

Trang 21

a ‘It is windy but it isn’t raining’ : p ~r∧

d ‘Windiness is a necessary condition for rain’: r → pf ‘Whenever it is lightning, it will be thundering’: s → q

g ‘The necessary and sufficient condition for thundering is lightning’: q ↔ s

2.3 Vấn đề 6: Equivalence

~ (p ~ (q r)) ~ (~q (p q)) ≡ (r q) ~ (q p)∨ ∧ ∧ ∨ ∨ ∧ ∧ ∨2.3.1 Bảng chân trị

Trang 22

2.3.2 Các quy luật tương đương logic

Trang 23

Biến đổi vế trái ta được:

VT = ~ (p ~ (q r)) ~ (~q (p q)) ∨ ∧ ∧ ∨ ∨

= (~p (~q ~r)) (q (~p ~q)) ∧ ∨ ∧ ∧ ∧ (De Morgan’s laws)= (~p (q r)) ((q ~q) ~p)) ∧ ∧ ∧ ∧ ∧ (Associative laws)= (~p (q r)) (c ~p))∧ ∧ ∧ ∧ (Negation laws)

= (~p (q r)) c∧ ∧ ∧ (Universal bound laws)

Biến đổi vế phải ta được:VP = (r q) ~ (q p)∧ ∧ ∨

= (r q) (~q ~p)∧ ∧ ∧ (De Morgan’s laws)= (r ~p) (q ~q)∧ ∧ ∧ (Associative laws)= (r ~p) c∧ ∧ (Negation laws)

Từ (1) và (2) → VT = VP

Vậy: 2 mệnh đề ~ (p ~ (q r)) ~ (~q (p q)) và (r q) ~ (q p) tương∨ ∧ ∧ ∨ ∨ ∧ ∧ ∨đương logic.

Trang 25

Tổng hợp kết quả của các luật/sự kiện ta được các giá trị X như hình 3.4.3.1.2 Câu b

Hình 3.5 hello1.pl3.1.3 Câu c

Trang 26

Hình 3.6 hello2.pl

Trang 27

TÀI LIỆU THAM KHẢOTiếng Anh

1 Hansen, H V., & Pinto, R C (2010) Fallacies: Classical and contemporaryreadings Penn State Press.

2 Hahn, U (2011) The problem of circularity in evidence, argument, andexplanation Perspectives on Psychological Science 6, (2), 172-182.3 Petric, D (2020) Logical Fallacies On-line Article (preprint), doi 10,

Ngày đăng: 07/05/2024, 18:24

Xem thêm:

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN