Chapter 0-1.pdf

‫ ز
ن ه و ه‬
‫ ‪ -‬‬
‫دا ‬
‫ل دوّم ل !‪١٣٨‬‬
‫ درس‬$%‫&ا‬
:
‫ ا‬$%& •
M. Sipser, ”Introduction to the Theory of Computation,” 2nd
Ed., Thompson Learning Inc., 2006.
:)* $%‫• &ا‬
P. Linz, “An Introduction to Formal Languages and
Automata,” 3rd Ed., Jones and Barlett Publishers, Inc.,
2001.
J.E. Hopcroft, R. Motwani and J.D. Ullman, “Introduction to
Automata Theory, Languages, and Computation,” 2nd Ed.,
Addison-Wesley, 2001.
P.J. Denning, J.B. Dennnis, and J.E. Qualitz, “Machines,
Languages, and Computation,” Prentice-Hall, Inc., 1978.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
‫‪ ,‬ده درس‬
‫• ت ‪١٠%‬‬
‫• *‪53‬ه‪31& 3* 4‬ط ‪ 01‬ت ‪١6%‬‬
‫• *‪ 53‬ه‪ &37 4‬درس ‪%86‬‬
‫• <ز&‪3‬ن ‪:‬ن ل ‪٣٠%‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫@‪=>?: 0‬‬
‫• دا‪ E‬رد ‪ 1 CD& 4>1‬اس ‪A& B‬‬
‫• ‪1‬ا‪3 & 0G =>?: 1 0AH 4‬ان *د؟‬
‫–‬
‫–‬
‫–‬
‫–‬
‫‪ I: 0J& K‬از * *‪ C&7 0‬د‪3‬ار‪< 4‬ن‬
‫‪ MN‬زدن را ‪0J& CL‬‬
‫ارا‪ 0D‬روش ه *‪ 0‬در ‪)7 Q3& ,RL‬د ‪ 13P‬دار>؛‬
‫ا‪U‬د از روش ه‪ 4‬د‪T‬‬
‫• *ر‪1‬ده‬
‫– ‪37 01‬ان &‪Y‬ل در ر&‪5‬ر‪ ،4‬ه>ف ا‪ V‬ا‪ 0* ,‬ر&‪3 1 =5‬ان‬
‫&‪.>1 V)&H Z%[& A‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫‪7‬و‪3& V‬رد ‪]1‬‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫@‪=>?: 0‬‬
‫@‪4^: 0A& 0‬‬
‫@‪ V& 0‬ه‬
‫&‪ A‬ر_‬
‫ا‪AUR‬‬
‫ر‪ 0‬ه‬
‫ز‪1‬ن ه‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫@‪4^: 0A& 0‬‬
‫• &‪ V‬ه ‪ D& 0G‬را & ‪3‬ا> ‪>* CL‬؟‬
‫• رد ‪ CD& 4>1‬در دو =و `‪ 0A& C1‬و ‪0A& C1`H‬‬
‫• &>ل ه‪1 4@ 4‬ا‪ V& 4‬ه‬
‫– ‪>` ,7 01‬ر>‪>& 4‬ل ه &> ‪3 V& RAM‬ر‪ b‬ا‪Aa‬ت ا‪0G 0* V‬‬
‫&‪ D‬را & ‪3‬ا> ‪ >* CL‬د‪3‬ار ا‪.,‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫@‪ V& 0‬ه‬
‫• و و‪ =c‬ه‪>& 4‬ل ه‪ 4‬ر_ &‪0A‬‬
‫– &>ل &‪& ,RL V‬ه‬
‫• در ‪:‬دازش &‪e&* ،V‬ه و ‪d‬ا‪ ,B L‬ا‪5T‬ار *ر‪1‬د دارد‪.‬‬
‫– &>ل &‪ 0: V‬ا‪4‬‬
‫• در ز‪1‬ن ه‪ 0&1 4‬ز‪ 4‬و ه‪3‬ش &‪* 73‬ر‪1‬د دارد‪.‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
Logic
fg& ‫اع‬3‫ا‬
C&* fg&
4>ُ& fg&
Propositional logic •
Predicate logic •
fg& Syntax
‫ه‬7 ‫اع‬3‫ه و ا‬K& ‫ اي از‬073k&
‫ه‬K&
{p, q, r, …}
‫و‬
‫ه‬7
{┐, ^, ν, →, ↔ }
Semantic
01 ،‫ر‬1 ‫ >اد &>ود‬01 ‫ اي از ده‬0RA‫اي د‬1 q‫>ول در‬% Q3 0* q&
.‫د‬3 q& ،‫ص‬P Syntax r ‫ها‬
‫ر‬
‫• ‪3&T‬ل ‪ :‬د‪ 0RA‬اي &>ود از ده ‪> 01‬اد &>ود ‪1‬ر ‪ 01‬ها‬
‫‪P Syntax r‬ص‬
‫• ‪ 073k& :Logical System‬اي از ا
‪3‬ل و `‪3‬ا‪ >7‬اج‬
‫• ا
‪3‬ل )‪5= :(axioms‬ار ه‪ q‬از &‪3& fg‬رد @ *‪ 0‬ه‪0‬‬
‫در‪ ,‬ا‪> ،,‬اد <[ &‪3 q‬ا> &>ود &>ود ‪.>1‬‬
‫• `‪3‬ا‪ >7‬اج‪3` :‬ا‪>7‬ي *‪ 0‬از ‪3 q& [< fd‬ان از دو =‪5‬ارۀ‬
‫در‪5= r 01 ,‬ارۀ در‪ ,‬د ر>‪.‬‬
‫ادا&‪0‬‬
‫• ا‪Aa‬ت ‪ :‬د‪ 0RA‬اي ا‪ ,‬از =‪5‬ار هي ‪ 03= 01 p1,p2,…,pk‬اي‬
‫*‪ q) >1 p1 0‬از ا
‪3‬ل و ‪ q) >1 p2‬از ا
‪3‬ل ‪1 >1‬‬
‫ا‪U‬د از ‪ p1‬و )‪ q‬از `‪3‬ا‪ >7‬اج ا‪Aa‬ت &‪3 q‬د و ‪ p3‬ه‪... Z‬‬
‫*‪ 01 0‬ا‪& V‬ا‪ r CL‬ا‪Aa‬ت ‪1‬اي ‪3 q& 0U= pk‬د‪.‬‬
‫• `‪5= : (theorem) 0x‬ار اي ا‪ 0* ,‬در &‪1 ،fg‬اي <ن‬
‫ا‪ qAa‬و‪3%‬د دا‪.>1 0‬‬
‫• &‪3&T : C&* H fg‬ل ه‪ q‬و‪3%‬د دارد *‪3 q 0‬ان <[ را‬
‫ا‪Aa‬ت *د‪.‬‬
‫> اج‬7‫ا‬3`
Modus ponens
P ‫هن‬1
Conjunction
‫رد‬3& 1 ‫ت‬Aa‫ا‬
‫اء‬N‫ا‬
.١
.٢
.٣
.8
.6
‫&‪ 073k‬ه‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫•‬
‫&‪3[U‬م &‪3x7 ،073k‬‬
‫‪ M‬و )ار اه‪> ,‬ارد‪.‬‬
‫در &‪ 073k‬ه‪) ،(multiset)0=>G 4‬ار اه‪ ,‬دارد‪.‬‬
‫ز&‪ ،073k‬ز &‪(proper subset){& 073k‬‬
‫&‪ 073k& ،[ 073k‬ه‪& 4‬ه‬
‫ا‪7‬ل رو‪ 073k& 4‬ه‪ :‬ا‪%‬ع‪ ،‬اا|‪Z& ،‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
Intuitive (Naïve) Set Theory
There are three basic concepts in set
theory:
• Membership
• Extension
• Abstraction
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Membership
Membership is a relation that holds between a set and an object
to mean “the object x is a member of the set A”, or “x belongs to
A”. The negation of this assertion is written
as an abbreviation for the proposition
One way to specify a set is to list its elements. For example, the set
A = {a, b, c}
consists of three elements. For this set A, it is true that
but
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Extension
The concept of extension is that two sets are identical
if and if only if they contain the same elements. Thus
we write A=B to mean
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Abstraction
Each property defines a set, and each set defines a
property
• If p(x) is a property then we can define a set A
• If A is a set then we can define a predicate p(x)
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Intuitive versus axiomatic set theory
• The theory of set built on the intuitive
concept of membership, extension, and
abstraction is known as intuitive (naïve)
set theory.
• As an axiomatic theory of sets, it is not
entirely satisfactory, because the principle
of abstraction leads to contradictions when
applied to certain simple predicates.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Russell’s Paradox
Let p(X) be a predicate defined as
P(X) = (X∉X)
Define set R as
R={X|p(X)}
• Is p(R) true?
• Is p(R) false?
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Gottlob Frege’s Comments
• The logician Gottlob Frege was the first to
develop mathematics on the foundation of set
theory. He learned of Russell Paradox while his
work was in press, and wrote, “A scientist can
hardly meet with anything more undesirable than
to have the foundation give way just as the work
is finished. In this position I was put by a letter
from Mr. Bertrand Russell as the work was nearly
through the press.”
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Power Set
The set of all subsets of a given set A is
known as the power set of A, and is
denoted by P(A):
P(A) = {B | B ⊆ A}
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Set Operation-Union
• The union of two sets A and B is
A ∪ B = {x | (x ∈ A) ∨ (x ∈ B)}
and consists of those elements in at least one of A
and B.
• If A1, …, An constitute a family of sets, their union is
= (A1 ∪ … ∪ An)
= {x| x ∈ Ai for some i, 1≤ i ≤ n}
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Set Operation-Intersection
• The union of two sets A and B is
A ∩ B = {x | (x ∈ A) (x ∈ B)}
and consists of those elements in at least one of A and B.
• If A1, …, An constitute a family of sets, their intersection is
= (A1 ∩ … ∩ An)
= {x| x ∈ Ai for all i, 1≤ i ≤ n}
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Set Operation-Complement
• The complement of a set A is a set Ac defined as:
Ac = {x | x A}
• The complement of a set B with respect to A, also
denoted as A-B, is defined as:
Ac = {x A | x B}
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Ordered Pairs and n-tuples
• An ordered pair of elements is written
(x,y)
where x is known as the first element, and y is known
as the second element.
• An n-tuple is an ordered sequence of elements
(x1, x2, …, xn)
And is a generalization of an ordered pair.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Ordered Sets and Set
Products
• By Cartesian product of two sets A and B, we mean
the set
A×B = {(x,y)|x∈A , y∈B}
• Similarly,
A1×A2×…An = {x1∈A1, x2∈A2, …, xn∈An}
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Relations
A relation ρ between sets A and B is a subset of A×B:
ρ ⊆ A×B
• The domain of ρ is defined as
Dρ = {x ∈ A | for some y ∈ B, (x,y) ∈ ρ}
• The range of ρ is defined as
Rρ = {y ∈ B | for some x ∈ A, (x,y) ∈ ρ}
• If ρ ⊆ A×A, then ρ is called a ”relation on A”.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Types of Relations on Sets
• A relation ρ is reflexive if
(x,x)∈ ρ, for each x∈A
• A relation ρ is symmetric if, for all x,y∈A
(x,y)∈ ρ implies (y,x)∈ ρ
• A relation ρ is antisymmetric if, for all x,y∈A
(x,y)∈ ρ and (y,x)∈ ρ implies x=y
• A relation ρ is transitive if, for all x,y,z∈A
(x,y)∈ ρ and (y,z)∈ ρ implies (x,z)∈ ρ
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Partial Order and
Equivalence Relations
• A relation ρ on a set A is called a
partial ordering of A if ρ is reflexive,
anti-symmetric, and transitive.
• A relation ρ on a set A is called an
equivalence relation if ρ is reflexive,
symmetric, and transitive.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Total Ordering
• A relation ρ on a set A is |of A if ρ is a
partial ordering and, for each pair of
elements (x,y) in A×A at least one of
(x,y)∈ρ or (y,x)∈ρ is true.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Inverse Relation
• For any relation ρ ⊆ A×B, the inverse of
ρ is defined by
ρ-1 = {(y,x) | (x,Y) ∈ ρ}
• If Dρ and Rρ are the domain and range
of ρ, then
Dρ-1 = Dρ and Rρ-1 = Rρ
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Equivalence Class
• Let ρ ⊆ A×A be an equivalence relation
on A. The equivalence class of an
element x is defined as
[x] = {y ∈ A | (x,y) ∈ ρ}
• An equivalence relation on a set
partitions the set.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Functions
A relation f ⊆ A× B is a function if it has the property
(x,y)∈ f and (x,z)∈ f implies y=z
• If f ⊆ A× B is a function, we write
f: A → B
and say that f maps A into B. We use the common notation
Y = f(x)
to mean (x,y) ∈ f.
• As before, the domain of f is the set
Df = {x∈ A | for some y∈ B, (x,y) ∈ f}
and the range of f is the set
Rf = {y∈ B | for some x ∈ A, (x,y) ∈ f}
• If Df ⊆ A, we say the function is a partial function; if Df = A, we say
that f is a total function.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Functions (continued)
• If x ∈ Df, we say that f is defined at x; otherwise
f is undefined at x.
• If Rf = B, we say that f maps Df onto B.
• If a function f has the property
f(x) = z and f(y) = z implies x = y
then f is a one-to-one function. If f: A → B is a
one-to-one function, f gives a one-to-one
correspondence between elements of its domain
and range.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Functions (continued)
• Let X be a set and suppose A ⊆ X. Define function
CA: X → {0,1}
such that CA(x) = 1, if x∈ A; CA(x) = 0, otherwise. CA(x) is called
the characteristic function of set A with respect to set X.
• If f ⊆ A× B is a function, then the inverse of f is the set
f-1 = {(y,x) | (x,y) ∈ f}
f-1 is a function if and only if f is one-to-one.
• Let f: A → B be a function, and suppose that X ⊆ A. Then the set
Y = f(X) = {y ∈ B | y = f(x) for some x ∈ X}
is known as the image of X under f.
• Similarly, the inverse image of a set Y included in the range of f is
f-1(Y) = {x ∈ A | y = f(x) for some y ∈ Y}
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Cardinality
• Two sets A and B are of equal cardinality, written as
|A| = |B|
if and only if there is a one-to-one function f: A → B
that maps A onto B.
• We write
|A| ≤ |B|
if B includes a subset C such that |A| = |C|.
• If |A| ≤ |B| and |A| ≠ |B|, then A has cardinality less
than that of B, and we write
|A| < |B|
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Cardinality (continued)
• Let J = {1, 2, …} and Jn = {1, 2, …, n}.
• A sequence on a set X is a function f: J → X. A
sequence may be written as
f(1), f(2), f(3), …
However, we often use the simpler notation
x1, x2, x3, ….,
xi ∈ X
• A finite sequence of length n on X is a function
f: Jn → X, usually written as
x1, x2, x3, …., xn,
xi ∈ X
• The sequence of length zero is the function f: → X.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Finite and Infinite Sets
• A set A is finite if |A| = |jn| for some
integer n≥0, in which case we say that A
has cardinality n.
• A set is infinite if it is not finite.
• A set X is denumerable if |X| = |j|. A set
is countable if it is either finite or
denumerable.
• A set is uncountable if it is not countable.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Some Properties
• Proposition: Every subset of J is countable.
Consequently, each subset of any denumerable
set is countable.
• Proposition: A function f: J → Y has a countable
range. Hence any function on a countable
domain has a countable range.
• Proposition: The set J × J is denumerable.
Therefore, A × B is countable for arbitrary
countable sets A and B.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Some Properties
• Proposition: The set A ∪ B is countable
whenever A and B are countable sets.
• Proposition: Every infinite set X is at least
denumerable ; that is |X| ≥ |J|.
• Proposition: The set of all infinite sequence on
{0, 1} is uncountable.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
Some Properties
• Proposition: (Schröder-Bernestein Theorem)
For any set A and B, if |A| ≥ |B| and |B| ≥ |A|,
then |A| = |B|.
• Proposition: (Cantor’s Theorem)
For any set X,
|X| < |P(X)|.
٨-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
‫&‪R31 fg‬‬
‫• &‪N‬د ‪ :R31‬در‪ ،(T),‬در‪(F),‬‬
‫• ا‪7‬ل ‪:R31‬‬
‫• `‪3‬ا‪B: ،4^: ,* ،% 01% :V‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫‪1 ،0x` ،‬هن‬
‫•‬
‫)‪(Definition‬‬
‫– ح &‪U‬ه *‪3P & 0‬اه‪ Z‬ا‪U‬د *‪.Z‬‬
‫– =‪5‬ار ه‪ 4‬ر_ ‪ 1‬اس ا‪U& V‬ه‪1 Z‬ن & ‪.>3‬‬
‫•‬
‫‪1‬هن)‪(Proof‬‬
‫– ا>ل &‪ & 0* Ng‬را &‪ 01 >7N‬در‪31 ,‬دن ‪5= r‬ار & *>‪.‬‬
‫•‬
‫`‪(Theorem)0x‬‬
‫– =‪5‬ار ا‪ 4‬ر_ *‪ 0‬در‪31 ,‬دن <ن ا‪Aa‬ت > ا‪.,‬‬
‫• ‪5= : (Lemma) ZR‬ار ا‪< [ 0* 4‬ن را ‪ 1‬ه>ف ا‪Aa‬ت =‪5‬ار ا‪ 4‬د ا‪Aa‬ت &‬
‫*‪.Z‬‬
‫• ‪5=:(Corollary) 0k‬ار ا‪ 0* 4‬در <ن ‪ I:‬از ا‪Aa‬ت ‪ 01 0x` r‬د= `‪C1‬‬
‫در‪ ,T‬ا‪.,‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫‪>:‬ا *دن ا‪Aa‬ت‬
‫• روش ‪ E:‬رو>‬
‫• روش &)‪3‬س‬
‫• &‪Y‬ل ‪{N‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫هن‬1 ‫اع‬3‫ا‬
(Proof by Construction)‫اب‬3%
‫د‬k‫ ا‬1 ‫ت‬Aa‫• ا‬
(Proof by Contradiction) P ‫هن‬1 •
(Induction) ‫ا‬N‫• ا‬
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬
‫ا‪AUR‬‬
‫• ا‪AUR‬‬
‫ ‪1‬‬
‫– &‪ 073k‬ا‪& 4‬ه ‪ ,‬و ‪ [H‬از ‪ ZD7‬ا‪ً 3&) AUR‬‬
‫∑ ‪ E Г‬داد & ‪3‬د(‬
‫– &‪Y‬ل‪:‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ر‪ 0‬ه‬
‫• ر‪0‬‬
‫–‬
‫–‬
‫–‬
‫–‬
‫د‪ 0RA‬ا‪& 4‬ه از ‪ r ZD7‬ا‪AUR‬‬
‫&‪Y‬ل‪:‬‬
‫‪3d‬ل ر‪ |ω| 1 0* ω 0‬ن داد & ‪3‬د >اد ‪3%3& ZD7‬د در ر‪0‬‬
‫ا‪.,‬‬
‫ر‪ (λ ε)[ 0‬ر‪ 0‬ا‪3d 1 4‬ل ‪ U‬ا‪.,‬‬
‫– ‪ r‬زر‪ (substring)0‬زد‪ 0RA‬ا‪3& ZD7 C& 4‬ا‪ R‬از ر‪0‬‬
‫ا‪.,‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ا‪7‬ل رو‪ 4‬ر‪ 0‬ه‬
‫• &‪3N‬ب ‪ r‬ر‪0‬‬
‫– &‪Y‬ل‪:‬‬
‫• ا‪R‬ق ر‪ 0‬ه‬
‫– &‪Y‬ل‪:‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ا‪7‬ل رو‪ 4‬ا‪AUR‬‬
‫• ‪:* 7‬‬
‫– &‪ 073k‬م ر‪ 0‬ه *‪ 0‬از ا‪ >R3 C1` ∑ 4AUR‬ه>‪.‬‬
‫• ‪:+ 7‬‬
‫– &‪ 073k‬م ر‪ 0‬ه ‪ 0* λ 5% 01‬از ا‪ >R3 C1` ∑ 4AUR‬ه>‪.‬‬
‫‪T‬ض *> }‪< . = {λ‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ز‪1‬ن ه‬
‫• ز‪1‬ن‬
‫– &‪ 073k‬ا‪ 4‬از ر‪ 0‬ه رو‪ r 4‬ا‪V& 4AUR‬‬
‫– ه ز‪1‬ن رو‪ r 4‬ا‪ ،∑ 4AUR‬ز &‪ 073k‬ا‪ 4‬از *∑ ا‪.,‬‬
‫– &‪Y‬ل‪:‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ا‪7‬ل رو‪ 4‬ز‪1‬ن ه‬
‫• ز‪1‬ن ه ‪P 73‬ص از &‪ 073k‬ه> و ا‪7‬ل رو‪ 073k& 4‬ه‬
‫در <ن ه ‪ C1` 5‬ا‪.,‬‬
‫– ا‪%‬ع‬
‫– اا|‬
‫– ‪C_U‬‬
‫– &‪Z‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ا‪7‬ل رو‪ 4‬ز‪1‬ن ه‬
‫• &‪3N‬ب ‪ r‬ز‪1‬ن‪:‬‬
‫– &‪Y‬ل‪:‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ا‪7‬ل رو‪ 4‬ز‪1‬ن ه‬
‫• ا‪R‬ق)‪ (Concatenation‬دو ز‪1‬ن‪:‬‬
‫– &‪Y‬ل‪:‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
‫ا‪7‬ل رو‪ 4‬ز‪1‬ن ه‬
‫•‬
‫‪* 7‬‬
‫)* ‪:(Kleene‬‬
‫– &‪ 073k‬م ر‪ 0‬ه *‪ 1 0‬ا‪R‬ق ر‪ 0‬ه‪ r 4‬ز‪1‬ن `‪ >R3 C1‬ه>‪.‬‬
‫– &‪Y‬ل‪:‬‬
‫• ‪ * 7 >& 5 + 7‬ا‪ 1 ,‬ا‪U V‬وت *‪ 0‬ر‪ λ 0‬در &‪C
L 073k‬‬
‫‪.,‬‬
‫ ز
ن ه و ه‬
‫دا*)( '&‪# $%‬‬
‫ل دوّم ‪٨!-٨٧‬‬
Gödel Numbering
• Let ∑ be an alphabet containing n objects. Let h: ∑ → Jn be an
arbitrary one-to-one correspondence. Define function f as:
f: ∑ → N
such that f(ε) =0; f(w.v) = n f(w) + h(v), for w∈ ∑ and v∈ ∑.
f is called a Gödel Numbering of ∑ .
*
*
*
• Proposition: ∑
*
is denumerable.
• Proposition: Any language on an alphabet is countable.
٨!-٨٧ ‫ل دوّم‬
# $%&' ()*‫دا‬
‫ ز
ن ه و ه‬