+ All Categories
Home > Documents > 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

Date post: 21-Jan-2016
Category:
Upload: joshua-pope
View: 231 times
Download: 0 times
Share this document with a friend
Popular Tags:
33
310409-THEORY OF COMPUTATION Komate AMPHAWAN 1
Transcript
Page 1: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

1

310409-THEORY OF COMPUTATION

Komate AMPHAWAN

Page 2: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

2

Page 3: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

3

DESCRIPTION-1

• Studies concepts of: grammars, automata, languages, computability and complexity

Page 4: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

4

DESCRIPTION-2

• the relationship between automata and various classes of languages

• Turing machine and equivalent models of computation

• the Chomsky hierarchy context-free grammar, push-down automata,

• Pumping lemmas and variants, closure properties and decision properties; parsing algorithms.

Page 5: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

5

Computability

• What is “Computation”?• What is Computable?

Problem of determining whether a mathematical statement is true or false.

Page 6: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

6

Evaluation and Grading

• Midterm exam 40%• Final exam 40%• Quiz 10%• Class attendance 10%

Page 7: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

7

Text-1

• “Introduction to Languages and the Theory of Computation”—John C. Martin,4ed, 2010.

Page 8: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

8

Text-2

• “Introduction to the Theory of Computation”—Michael Sipser, 2ed, 2005.

Page 9: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

9

Main topic

• We shall study different types of theoretical machines that are mathematical models for actual physical processes.

Page 10: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

10

Machine Model-1

Page 11: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

11

Machine Model-2

Page 12: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

12

Machine Model-3

Page 13: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

13

Prerequisites

• Set Theory• Relations and Functions Relations �

and Functions• Elementary Graph Theory• Boolean Logic• Proof Mechanisms

Page 14: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

14

REVIEW… ON BASIC MATHEMATICS

Page 15: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

15

SET

Page 16: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

16

Sets-1

• A set is a collection of "things," called the elements or members of the set.

• It is essential to have a criterion for determining, for any given thing, whether it is or is not a member of the given set.

• This criterion is called the membership criterion of the set.

Page 17: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

17

Sets-2

• There are two common ways of indicating the members of a set: List all the elements, e.g. {a, e, i, o, u} Provide some sort of an algorithm or

rule, such as a grammar

Page 18: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

18

Sets-3

• Notation: To indicate that x is a member of set S, we write

x  S We denote the empty set (the set with no

members) as { } or  If every element of set A is also an element of

set B, we say that A is a subset of B, and write A  B

If every element of set A is also an element of set B, but B also has some elements not contained in A, we say that A is a proper subset of B, and write A  B

Page 19: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

19

Operations on Sets

• The union of sets A and B, written A  B, is a set that contains everything that is in A, or in B, or in both.

• The intersection of sets A and B, written A  B, is a set that contains exactly those elements that are in both A and B.

• The set difference of set A and set B, written A - B, is a set that contains everything that is in A but not in B.

Page 20: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

20

Additional terminology

• The cardinality of a set A, written |A|, is the number of elements in a set A.

• The powerset of a set Q, written 2Q, is the set of all subsets of Q. The notation suggests the fact that a set containing n elements has a powerset containing 2n elements.

• Two sets are disjoint if they have no elements in common, that is, if A  B = .

Page 21: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

21

RELATIONS AND FUNCTIONS

Page 22: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

22

Relations and Functions-1

• A relation on sets S and T is a set of ordered pairs (s, t), where s  S (s is a member of S), t   T, S and T need not be different, The set of all first elements (s) is

the domain of the relation, and The set of all second elements is

the range of the relation.

Page 23: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

23

Relations and Functions-2

• A relation is a function iff every element of S occurs once and only once as a first element of the relation.

• A relation is a partial function iff every element of S occurs at most once as an element of the relation.

Page 24: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

24

GRAPHS

Page 25: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

25

Graph-1

• A graph consists of two sets A set V of vertices (or nodes), and A set E of edges (or arcs).

• An edge consists of a pair of vertices in V. If the edges are ordered, the graph is a digraph (a contraction of "directed graph").

Page 26: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

26

Graph-2

• A walk is a sequence of edges, where the finish vertex of each edge is the start vertex of the next edge. Example: (a, e), (e, i), (i, o), (o, u).

• A path is a walk with no repeated edges.

• A simple path is a path with no repeated vertices.

Page 27: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

27

TREES

Page 28: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

28

Trees-1

• A tree is a kind of digraph: It has one distinguished vertex called

the root; There is exactly one path from the root

to each vertex; and The level of a vertex is the length of the

path to it from the root.

Page 29: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

29

Trees-2

• Terminology:• if there is an edge from A to B, then A

is the parent of B, and B is the child of A.

• A leaf is a node with no children.• The height of a tree is the largest

level number of any vertex.

Page 30: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

30

PROOF TECHNIQUES

Page 31: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

31

Importance

• Because this is a formal subject, the textbook is full of proofs

• Proofs are encapsulated understanding

• You may be asked to learn a very few important proofs

Page 32: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

32

Proof by induction

• Prove something about P1 (the basis)

• Prove that if it is true for Pn, then it is true for Pn+1 (the inductive assumption)

• Conclude that it is true for all P

Page 33: 310409-THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.

33

Proof by contradiction

• also called reduction ad absurdum• Assume some fact P is false• Show that this leads to a

contradiction• Conclude P must be true


Recommended