Sie sind auf Seite 1von 7

Logistics

„ Available on the web.


CS 252 … LectureNotes
Theory of Computation … Assignments
… Schedule

Dr. Julie A. Adams

Logistics Course Work


„ Class time: Tu.– Thurs. 11:00 AM -12:15 PM
„ Location: Room 306, Featheringill Hall „ Homework
„ Instructor: Julie A. Adams … Best of ten of eleven assignments
… Office: Room 359, Jacobs Hall „ Exams
… Tele: 322-8481
… Two in-class exams
… E-mail: julie.a.adams@vanderbilt.edu
… Office Hours: … Final exam
„ Monday: 4 - 5 PM
„ Wednesday: 3 – 4 PM
„ By appointment
… Web page: www.vuse.vanderbilt.edu/~adamsja/courses/CS252-
08/index.html

1
Grading Scheme Academic Honesty
„ http://www.vanderbilt.edu/student_handbook/Honor_System.htm
„ Homework: 35%
„ In class Exams: 40% total (20% each)
„ What constitutes cheating?
„ Final Exam: 25%

Text Book and References Goals of the Course


„ Required Text: „ Introduce the concepts of Computer
… Introduction to the Theory of Computation, second Science Theory
edition, Michael Sipser
„ Increase your mathematical sophistication.
„ Other resources:
… Introduction to languages and the Theory of
Computation, John Martin.
… Introduction to Automata Theory, Languages, and
Computation, 3rd Edition, John Hopcroft, Rajeev
Motwani, and Jeffrey Ullman.

There may be supplementary lecture material.

2
Fundamental Questions Sets
„ Fundamental Questions of Computer „ A = {a, b, aa, bb} B = {a, b, ab, ba, aba}
Science: … Union
… Intersection
… What can and cannot be computed?
… Complement A
… What can and cannot be computed
efficiently?
„ C = {a, b}
… What is the power set of C?
In order to answer these questions we need a
universal model of computation.

Sets Sets
„ A = {2,13,15,25,37,49,55} „ A = {a, b}, B = {4, 5, 6}, C = {$, #}
… What is a subset of A?
… What is A x B (Cartesian or cross product)?
… What is a proper subset of A?
… What is A x B x C?
„ C = {2, 13, 5, 2, 6, 2, 2}
… What type of set is C?
… Is {2} identical to {2, 2, 2, 2}?
„ Common infinite sets
…N = {1,2,3,…}
…Z = {…, -2, -1, 0, 1, 2, …}

3
Functions Graphs
„ Let D and R be sets. A function f from D to R, „ What is the outdegree of node 4?
f:D →R, is a relation from D to R such that for
„ What is the indegree of node 4?
every d∈D, there exists a unique r∈R such that
<d, r> ∈f. If <d, r> ∈f, then f(d) = r. „ Define a directed path between two nodes
…D is the domain „ Is this graph strongly connected?
…R is the range
1 2

„ What defines a binary relationship as an 3 4


5
equivalence relation? 6
7
8

Graphs Languages
„ What is the degree of node 5? „ A language is a set of strings involving
… Is the degree of all the nodes equivalent? symbols from some alphabet.
„ Define a subgraph H „ An alphabet is a finite set of indivisible

„ Is this graph connected? objects usually denoted by Σ.


„ Is this graph a tree? „ Examples of alphabets:
1 2

3 4 … {0, 1}
5
6
7 … {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
8
w, x, y, z}
… {α, β, γ, δ}

4
Strings Languages
„ A string over Σ is finite (possibly empty) „ The set of all strings over Σ is denoted by
sequence of element of Σ. Σ*.
… For example, some strings over the alphabet … For example,
{0, 1} are: „ {0, 1}* = {Λ, 0, 1, 00, 01, 10, 11, 000, 001, …}
„ Λ, 0, 1, 10010011101, and 000000 „ {a}* = {Λ, a, aa, aaa, aaaa, aaaaa, …}

„ Λ denotes the null string. … What is the set of all strings for {a, b, c}*?
… The empty sequence of elements of Σ.

Strings Languages
… The following are not strings over {0, 1}. Why „ A language over Σ is a subset over Σ*.
not? … Examples of languages over {0, 1}:
„ 1021 „ {1, 010, 111000, 110}
„ 1111111111…
„ ∅

„ {Λ}
… Ifx is a string over Σ, |x| denotes the length of x: „ {0, 1}*
the number of alphabet symbols in the string. „ {x ∈{0, 1}* | |x| is even}
„ For example, |1| = 1, |10010011101| = 11, and „ {x ∈ {0, 1}* | x (viewed as an integer) is prime}
|00000| = 5.
„ Which of the above languages are infinite?
„ What is |Λ|?

5
Languages Operations on Strings
„ Since languages are sets of strings, new …x is a substring of y if an only if there exist
languages can be constructed using set w, z ∈Σ* such that wxz = y.
operations (for instance, union, intersection, and … x is a prefix of y if and only if there exists a
complementation). z ∈ Σ* such that xz = y.
„ If L is a language over Σ, then L (the complement … X is a suffix of y if and only if there exists a
of L) is Σ* - L. z ∈Σ* such that zx = y.

Operations on Strings Operations on Languages


„ Let x, y ∈ Σ* „ Operations of strings can be extended to
… xy is the concatenation of x and y. operations on languages.
„ For example, if x = ab and y = aabb, then xy = „ Let L, L1, L2 ⊆ Σ*.
abaabb.
… L1L2 ={ xy | x∈ L1, y ∈L2} is the concatenation
„ For all strings x, xΛ = Λx = x.
of languages L1 and L2.
… For an integer i, xi is the concatenation of i x’s.
„ What is {ab, a}{a, ba, aaaa}?
„ For example, if x = abb then x3 = abbabbabb.
„ For i an integer, Li is the concatenation of i L’s.
„ For all strings x, x0 = Λ.
„ What is {aa, b}3?

„ What is L0?

6
Operations on Languages
∞ ∞
… L* =U
i =0
Li and L+ = U
i =1
iL

„ The operation * is called kleene star.


„ Note: L+ = LL* = L*L

Das könnte Ihnen auch gefallen