Sei sulla pagina 1di 3

Introduction to languages http://zain.tp.googlepages.

com

Theory of Computation Proof Techniques

• Some of the commonly used proof


Why Study Theory of Computation! techniques in the theory of computation:
1. It purports to answer the following seemingly 1. Proof by Construction
simple questions.
• Used to prove that a particular type of
(a) What is a problem?
object exists.
(b) How do you determine the degree of
• The proof demonstrates how the object is
hardness of a given problem? (Is there

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

-- Prove that P(1) is true. This is called


• A definition describes the objects and the basis.
te

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

called the induction hypothesis.


ou

• A theorem is a specially interesting


statement proven true.
nd

• A lemma is a statement that is special only


ha

because proving it assists in proving


another, more significant statement.
• A corollary is a statement whose proof
://

follows from the proof of a theorem.


tp
ht

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. Formal Languages 1.1.3 Concatenation

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

Symbols of a string are usually written next to


one another, and not using the standard tuple-
te

notation.
Suffixes
ui
ts
ou
nd
ha
://

1.1.2 The Empty String

For any alphabet Σ


tp
ht

Substrings

Theory of Computation 2
Introduction to languages http://zain.tp.googlepages.com

1.2 Languages

For any alphabet Σ, any subset of Σ* is called a


language over Σ.
Note that
ƒ A language is a set of strings; an
alphabet is a set of symbols. (Although a
set of strings of length one would look like
an alphabet.)

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

1.2.1 Operations on Languages


• Concatenation
://

S1S2 = {s1s2: s1 ∈ S1, s2 ∈ S2


• Union
tp

S1 U S1 = {s: s ∈ S1 ∨ s ∈ S2}
• Kleene Star
ht

S* = {ε } U {s1s2 ...sn : ∀i, si ∈ S}

• All set operations: union, intersection,


difference.
• The concatenation of two languages, L1 and
L2, is the language

Theory of Computation 3

Potrebbero piacerti anche