Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
com
m
to be constructed.
such a thing?)
.co
(c) Are there unsolvable problems? (And
2. Proof by Contradiction
how can you know that a problem is
unsolvable without trying to solve it?) • Strategy: Assume the statement is false
es
(d) What is an algorithm? and show that this leads to a contradiction.
(e) What is a computer?
ag
2. Its tools are applied all over the place in 3. Proof by Induction
• Used to prove that all elements of some
ep
computer science.
3. In its own cryptic way, it is fun after all. infinite set have a certain property.
• For now, consider only the infinite set, N, of
gl
oo natural numbers.
• Strategy: If P is the property under
0. Some Mathematical Creatures! consideration, then
.g
notions that we talk about. Definition should -- Prove that, for k ∈ N, P(k) implies
ui
be precise; as precise as, for example, P(k + 1). This is called the induction step.
Java class definition. -- The assumption that P(k) is true is
ts
Proofs
• A proof is a logical argument that a
statement is true.
• It is a sequence of statements; each
statement follows from previous
statements, definitions, or already-proven
results.
-As you will see, writing a proof is
pretty much like writing a program.)
Theory of Computation 1
Introduction to languages http://zain.tp.googlepages.com
1.1 Alphabets
An alphabet is a nonempty finite set of symbols.
A symbol is an abstract entity that we shall
not formally define; we shall rely on
intuition.
Alphabets are typically denoted by the
uppercase Greek letters Σ and Γ.
m
.co
es
ag
Prefixes
ep
1.1.1 Strings
gl
oo
A string over an alphabet is a k-tuple (i.e., finite
sequence) of symbols from the alphabet.
.g
notation.
Suffixes
ui
ts
ou
nd
ha
://
Substrings
Theory of Computation 2
Introduction to languages http://zain.tp.googlepages.com
1.2 Languages
m
A language may be an empty set (called
the empty language); an alphabet is
.co
nonempty by definition.
A language may be infinite; an alphabet is
es
finite by definition.
ag
Examples
ep
gl
oo
.g
te
ui
ts
ou
nd
ha
S1 U S1 = {s: s ∈ S1 ∨ s ∈ S2}
• Kleene Star
ht
Theory of Computation 3