Russell’s paradox
R = {x|x is a set and x is not an element of itself}
If R is a member of R, then R is not a member of R
If R is not a member of R, then R is a member of R
problem)
It looks like that with a condition, say, C, there always exists a set
whose members satisfy the condition C.
Cartesian product of two non-empty sets A and B
AXB (Cartesian product of A and B)
BXA (Cartesian product of B and A)
AXB = {(x,y)|x is a member of A, y is a member of B}
k elements in AXB -> there are 2^k subsets of AXB -> 16 different relations from
A to B
AXA : Reflective if for ALL elements x in A, x R x, Symmetric if for ALL elements
x and y in A, if x R y then y R x, Transitive if for ALL elements x, y, and z in A,
if x R y, y R z, then x R z
Chapter 2 the logic of compound statments
compound statements(복합 명제) : using logical comnectives(논리 연결자) such as
AND, OR, ~, implies
truth value(진리값)
p is a propositional variable(명제 변수) : there are 2 possible truth values
If p is T then ~p is F
If p is F then ~p is T
p and q are propositional variables: there are 4 possible cases for p AND q [called
conjunction(접속사)] & for p OR q [called disjunction(분리)]
AND 하나라도 거짓이면 전체 거짓
OR 하나라도 참이면 참
Logical equivalence (논리적 동치)
tatutology(항진식) - always true
contradiction(모순식) - always false
T implies F : F, 나머지 T
contrapositive(대우) p->q is ~q->~p
converse(이) p->q is q->p
inverse(역) p->q is ~p->~q
biconditional(씽조건문) p<->q ≡ (p->q) and (q->p)
r is a sufficient condition(충분조건) for s means r->s
r is a necessary conditiong(필요조건) for s means ~r->~s
If p then q
p
Therefore q
argument = a sequence of statements
argument form = a sequence of statement forms
two valid argument forms
(1) Modus ponens
If p then q
p
Therefore 1
(2) Modus tollens
If p then q
~q
Therefore ~p
sound arguemnt(건전한 논증)- an argument with 2 properties(a valid argument &
premises are ture)
predicate(술어) : a sentence that contains a finite number of variable and becomes
a statement when specific values are substituted for the variables
truth set(진리집합)
∀ the universal quantifier(전체 양화사)
∃ the existential quantifier(존재 양화사)
Negations of quantified statements
the negation of ∀x in D Q(x) : ∃x in D such that ~Q(x)
the negation of ∃x in D such that Q(x) : ∀x in D ~Q(x)
The negation of a universal conditional statement
~(∀x if P(x) then Q(x)) ≡ ∃x in D such that P(x) AND ~Q(x)
Negations of multiply-quantified statements
~(∀x in D, ∃ y in E such that P(x,y)) ≡ ∃x in D such that ∀ y in E~P(x,y)
~(∃x in D, ∃ y in E such that P(x,y)) ≡ ∀x in D such that ∀ y in E~P(x,y)
Halting Problem
input – an arbitrary computer program P and an arbitrary input for P, a
output – if P(a) halts then yes
else no
theorem) there does not exist an algorithm that solves the Halting Problem
proof) by contradiction
Assume that the Halting Problem is solvable. Then there is an algorithm. Let’s call
this algorithm HALT.
HALT works as follows:
HALT(P,a)
if P(a) halts then return true
else return false
Then we can create a program called A as follows:
A(P)
If HALT(P,P) then fun forever
Now consider the following:
A(A)
There are 2 possibilities
(1) A(A) runs forever – in this case HALT(A,A) returns false
-> this means that A(A) halts according to the definition of the program A
(2) A(A) halts – in this case HALT(A,A) returns true
-> this means that A(A) runs forever according to the definition of the program A
So, there is a contradiction.
That is A(A) runs forever if and only if A(A) halts
Therefore the assumption that the Halting problem is solvable is false.
Logical consequence
Let U be a set of formulas and A a formula.
A is a logical consequence of U, denoted U⊨A, U⊨A, iff every model of U is a
model of A.
Equivalently, it is impossible that all formulas in U are true while A is false.
Theorem
Let T be a set of formulas.
T is closed under logical consequence if, for all formulas A, whenever A is a logical
consequence of T, A belongs to T.
A set of formulas that is closed under logical consequence is called a theory.
The elements of T are called theorems.
***********37-42
안하고 넘어감!
structure
a set endowed with a finite number of relations, functions, and constants.
P=NP question(finite structures)
The P=NP question asks whether we can decide in polynomial timewhether a given
finite graph is 3-colourable.
If the answer to the P=NP question were negative, then there would exist a sequence
of rather complicated graphsfor which no algorithm running in polynomial time in the
size of the graphcan decide whether the graph is 3-colourable or not.
P vs NP and Gödel’s Incompleteness Theorem
Gödel’s incompleteness theorem and the P vs NP problem share a common
philosophical theme: there is a fundamental gap between truth and our ability to
demonstrate it efficiently.
Gödel showed that in any sufficiently strong and sound formal system, there exist
statements that are true but not provablewithin the system. Similarly, P vs NP asks
whether every problem whose solution can be efficiently verifiedcan also be efficiently
solved. In both cases, verification is easier than construction.
However, the two results differ in nature. Gödel’s incompleteness theorem is a proven
result about the limits of formal logical systems, showing an absolute barrier to
provability. In contrast, P vs NP is a computational complexity questionconcerning
efficiency, and it remains an open problem. Gödel establishes impossibility, while P
vs NP asks whether such an impossibility exists.
P vs NP and the Halting Problem
The P vs NP problem and the Halting Problem are both concerned with the limits of
computation, but in different senses. The Halting Problem shows that there is no
algorithm that can decide, for every program, whether it halts. This establishes a clear
boundary of undecidability: some problems cannot be solved by any algorithm at all.
P vs NP, on the other hand, deals only with decidable problems. It asks whether
problems whose solutions can be verified in polynomial time can also be solved in
polynomial time. While the Halting Problem proves that certain problems are
fundamentally unsolvable, P vs NP asks whether certain problems are solvable but
inherently inefficient. Thus, the Halting Problem concerns whether a solution exists
algorithmically, whereas P vs NP concerns how efficiently a solution can be found.
Q1. Is the Traveling Salesman Problem a special type of the
Hamiltonian cycle problem?
답:
네, Traveling Salesman Problem(TSP)은 Hamiltonian cycle 문제의 특수한 형태이다.
Hamiltonian cycle 문제는 모든 정점을 정확히 한 번씩 방문하는 cycle의 존재 여부만을 묻
는 반면,
TSP는 각 간선에 비용이 주어지고, 그 cycle의 총 비용이 주어진 예산 BBB이하인지까지
함께 묻는다.
즉, TSP는 Hamiltonian cycle 문제에 비용 제약이 추가된 경우이다.
Q2. Is the Hamiltonian cycle problem a special type of the
Traveling Salesman problem?
답:
네, Hamiltonian cycle 문제는 Traveling Salesman Problem의 특수한 형태이다.
모든 간선의 비용을 동일하게 1로 두고, 예산 BBB를 정점의 개수로 설정하면,
TSP는 Hamiltonian cycle이 존재하는지를 묻는 문제와 동일해진다.
따라서 Hamiltonian cycle 문제는 TSP로 환원될 수 있는 특수한 경우이다.
한 줄 요약(암기용)
• TSP = Hamiltonian cycle + 비용 제약
• Hamiltonian cycle = TSP에서 모든 간선 비용이 동일한 경우