Theory of computation 605401 1. Introduction theory of computation: It comprises the fundamental mathematical properties of computer hardware, software,

Slides:



Advertisements
Similar presentations
Chapter 2 Revision of Mathematical Notations and Techniques
Advertisements

Sets and its element A set is a collection of well-defined and well-distinguished objects. The objects that make up a set are called the members or elements.
Formal Languages Languages: English, Spanish,... PASCAL, C,... Problem: How do we define a language? i.e. what sentences belong to a language? e.g.Large.
YES-NO machines Finite State Automata as language recognizers.
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
Formal Languages and Automata Theory Applied to Transportation Engineering Problem of Incident Management Neveen Shlayan Ph.D. Candidate.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
Topics Automata Theory Grammars and Languages Complexities
Copyright © Cengage Learning. All rights reserved.
Welcome to Honors Intro to CS Theory Introduction to CS Theory (Honors & Traditional): - formalization of computation - various models of computation (increasing.
CS/IT 138 THEORY OF COMPUTATION Chapter 1 Introduction to the Theory of Computation.
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
CSC312 Automata Theory Lecture # 2 Languages.
CSC312 Automata Theory Lecture # 2 Languages.
Costas Busch - LSU1 Languages. Costas Busch - LSU2 Language: a set of strings String: a sequence of symbols from some alphabet Example: Strings: cat,
L ECTURE 1 T HEORY OF A UTOMATA. P RAGMATICS  Pre-Requisites  No Pre-Requisite  Text book  Introduction to Computer Theory by Daniel I.A. Cohen 
1 Chapter 1 Automata: the Methods & the Madness Angkor Wat, Cambodia.
Lecture Two: Formal Languages Formal Languages, Lecture 2, slide 1 Amjad Ali.
Introduction to Theory of Automata
By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String 
Two examples English-Words English-Sentences alphabet S ={a,b,c,d,…}
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 Chapter 1 Introduction to the Theory of Computation.
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
CS 3813: Introduction to Formal Languages and Automata
Welcome to Honors Intro to CS Theory Introduction to CS Theory (Honors & Traditional): - formalization of computation - various models of computation (increasing.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Lecture 5 Regular Expressions CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Strings and Languages CS 130: Theory of Computation HMU textbook, Chapter 1 (Sec 1.5)
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2010.
Introduction Episode 0 What is TOC (Theory of Computation) about? Giorgi Japaridze Theory of Computability Subject: The fundamental mathematical properties.
CSC312 Automata Theory Lecture # 3 Languages-II. Formal Language A formal language is a set of words—that is, strings of symbols drawn from a common alphabet.
CS 203: Introduction to Formal Languages and Automata
Recursive Definations Regular Expressions Ch # 4 by Cohen
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
November 2003Computational Morphology III1 CSA405: Advanced Topics in NLP Xerox Notation.
Strings and Languages Denning, Section 2.7. Alphabet An alphabet V is a finite nonempty set of symbols. Each symbol is a non- divisible or atomic object.
Introduction Why do we study Theory of Computation ?
Introduction Why do we study Theory of Computation ?
Set, Alphabets, Strings, and Languages. The regular languages. Clouser properties of regular sets. Finite State Automata. Types of Finite State Automata.
Lecture 03: Theory of Automata:2014 Asif Nawaz Theory of Automata.
1 Let S = { π : π is a permutation of {1, 2, 3, …, n} for some integer n ≥ 1 }. (a) List the elements of S for n= 1, 2, and 3. (b) Prove that the set S.
MA/CSSE 474 Theory of Computation How many regular/non-regular languages are there? Closure properties of Regular Languages (if there is time) Pumping.
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
Lecture 01: Theory of Automata:2013 Asif Nawaz Theory of Automata.
MA/CSSE 474 Theory of Computation Regular Expressions Intro.
Introduction Why do we study Theory of Computation ?
Lecture #2 Advanced Theory of Computation. Languages & Grammar Before discussing languages & grammar let us deal with some related issues. Alphabet: is.
Topic 3: Automata Theory 1. OutlineOutline Finite state machine, Regular expressions, DFA, NDFA, and their equivalence, Grammars and Chomsky hierarchy.
Alphabet, String, Language. 2 Alphabet and Strings An alphabet is a finite, non-empty set of symbols. –Denoted by  –{ 0, 1 } is a binary alphabet. –{
Introduction Chapter 0.
Introduction to the Theory of Computation
Why do we study Theory of Computation ?
Lecture 1 Theory of Automata
CIS Automata and Formal Languages – Pei Wang
Languages Prof. Busch - LSU.
Languages Costas Busch - LSU.
Computer Science Department
Jaya Krishna, M.Tech, Assistant Professor
INTRODUCTION TO THE THEORY OF COMPUTATION
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
Introduction Chapter 0.
Introduction Reading: Sections 1.5 – 1.7.
Chapter 1 Introduction to the Theory of Computation
CSC312 Automata Theory Lecture # 2 Languages.
Languages Fall 2018.
Introduction and Chapter One: Fundamentals
Presentation transcript:

Theory of computation

Introduction theory of computation: It comprises the fundamental mathematical properties of computer hardware, software, and certain applications thereof. In studying this subject we – seek to determine what can and cannot be computed, – how quickly, – on which type of computational model. 2

Introduction Theory is relevant to student because it shows him – a new, simpler, and more elegant side of computers, which we normally consider to be complicated machines. – The best computer designs and applications are conceived with elegance in mind. – A theoretical course can heighten your aesthetic sense and help you build more beautiful systems.

Mathematical Notions and Terminology As in any mathematical subject, we begin with a discussion of the basic mathematical objects, tools, and notation that we expect to use. Set {7, 21, 57} A set is a group of objects represented as a unit. Sets may contain any type of object numbers, symbols, and even other sets. The objects in a set called elements/members. Sets may be described formally in several ways. One way is by listing a set's elements inside braces. Set {7, 21, 57} A set is a group of objects represented as a unit. Sets may contain any type of object numbers, symbols, and even other sets. The objects in a set called elements/members. Sets may be described formally in several ways. One way is by listing a set's elements inside braces.

Set {7, 21, 57}, contains the elements 7, 21, and 57. A = {1, 2, 4, 8}, A is the set whose elements are 1, 2, 4, and 8 The symbols  denote set membership The symbols  denote non-membership We write 7  {7, 21, 57} 8  {7, 21, 57} The symbols  denote set membership The symbols  denote non-membership We write 7  {7, 21, 57} 8  {7, 21, 57} For any set A, x is an element of A is written x ∈ A, x is not an element of A is written x  A For any set A, x is an element of A is written x ∈ A, x is not an element of A is written x  A

For two sets A and B A is a subset of B A  B, if every member of A is a member of B. A is a subset of B A  B, if every member of A is a member of B. A is not a subset of B, A  B, if A is a subset of B and not equal to B. there is at least one element of A that is not an element of B. A is not a subset of B, A  B, if A is a subset of B and not equal to B. there is at least one element of A that is not an element of B.

Set The order of describing a set doesn't matter, nor does repetition of its members. We get the same set by writing {57, 7, 7, 7, 21}. If we do want to take the number of occurrences of members into account we call the group a multiset instead of a set. Thus {7} and {7, 7} are different as multisets but identical as sets. The order of describing a set doesn't matter, nor does repetition of its members. We get the same set by writing {57, 7, 7, 7, 21}. If we do want to take the number of occurrences of members into account we call the group a multiset instead of a set. Thus {7} and {7, 7} are different as multisets but identical as sets.

Set An infinite set contains infinitely many elements. We cannot write a list of all the elements of an infinite set, so we sometimes use the ".." notation to mean, "continue the sequence forever." Thus we write the set of natural numbers X as {1,2,3,...}. An infinite set contains infinitely many elements. We cannot write a list of all the elements of an infinite set, so we sometimes use the ".." notation to mean, "continue the sequence forever." Thus we write the set of natural numbers X as {1,2,3,...}.

Set The set of integers Z is written {..., -2, -1,0, 1,2,... }. Exp. B = {0, 3, 6, 9,... } Exp. C = {13, 14, 15,..., 71} the empty set, the set with no elements, is denoted by ∅. The set with 0 members is called the empty set. The set of integers Z is written {..., -2, -1,0, 1,2,... }. Exp. B = {0, 3, 6, 9,... } Exp. C = {13, 14, 15,..., 71} the empty set, the set with no elements, is denoted by ∅. The set with 0 members is called the empty set.

Formal Languages A formal language is an abstraction of the general characteristics of programming languages. A formal language consists of a set of symbols and some rules of formation by which these symbols can be combined into entities called sentences. A formal language is the set of all strings permitted by the rules of formation. – 1. A Formal Language is a set of words, i.e. finite strings of letters, symbols, or tokens. The set from which these letters are taken is called the alphabet over which the language is defined. – 2. A formal language is often defined by means of a formal grammar (also called its formation rules). 10

11 Alphabet and Strings An alphabet is a finite set of symbols, non-empty set of symbols. – { 0, 1 } is a binary alphabet. – { A, B, …, Z, a, b, …, z } is an English alphabet. A string over an alphabet  is a sequence of any number of symbols from . – 0, 1, 11, 00, and are strings over { 0, 1 }. – Cat, CAT, and compute are strings over the English alphabet.

12 Empty String An empty string, denoted by є, is a string containing no symbol. (zero occurrences of symbols). є is a string over any alphabet.

13 Length The length of a string x, denoted by length(x), |x|, is the number of positions of symbols in the string. |automata| = 8 |computation| = 11 |ε| = 0, Let Σ = { a, b, …, z } X=01101, |x|=5 Y=110, |y|=3 x(i), denotes the symbol in the i th position of a string x, for 1  i  |x|.

String Operations: Power Power of an alphabet: Σ k :The set of strings of length k. Ex: Σ={a} Σ 0 ={є} Σ 1 ={a} Σ 2 ={aa} Σ 3 ={aaa} … Ex: Σ={0,1}, the binary alphabet Σ 0 ={є} Σ 1 ={0,1} Σ 2 ={00,01,10,11} Σ 3 ={000,001,010,011,100,101,110,111} 14

15 Σ *: Kleene star The set of strings created from any number (0 or 1 or …) of symbols in an alphabet  is denoted by  *. That is,  * =  0  i – Let  = { 0, 1 }. –  * = {є, 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, … }.

16 Σ + = K leene plus The set of strings created from at least one symbol (1 or 2 or …) in an alphabet  is denoted by  +. That is,  + =  1  i = 0..   i -  0 = 0..   i - {  } Let  = { 0, 1 }.  + = { 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, … }.  * and  + are infinite sets.

17 Languages A language over an alphabet Σ is a set of strings over Σ. (set of strings) A set of strings all of which are chosen from some Σ*. If Σ is an alphabet, and L e ⊆ Σ*, then L is a language over Σ. – Let Σ = {0, 1} be the alphabet. – L e = {  Σ * | the number of 1 ’ s in  is even}. – , 0, 00, 11, 000, 110, 101, 011, 0000, 1100, 1010, 1001, 0110, 0101, 0011, … are in L e

Example 1.the set of strings of 0’s and 1’s with an equal number of each. {є,01,10,0011,0101,1001,0110,….} 2. The set of binary numbers whose value is prime {10,11,101,111,1011,…..} 3. The language of all strings consisting of n 0’s followed by n 1’s, for some n ≥0: {є, 01,0011,000111, ,……} 18

Example 4. The language of all strings consisting of n 0’s followed by 2*n 1’s, for some n >0: {011,001111, , ,……} 5. The empty language, with no strings: ∅ 6. {є}, the language consisting of only the empty string (has one string). Note: ∅ ≠ {є} 7. The set of strings with length ≥2, of 0’s or 1’s: {01,10,00,11,000,101,111,……} 19

Example 8. The set of strings with length <5 of 0’s and 1’s: {є,0,1,00,01,10,11,000,001,010,011,100,101,110,111,0000,0001,0010, 0011,0100,0101, 0110,0111,1000,1001,1010,1011,1100, 1101, 1110,1111} 9. The set of all strings over {a,b} in which each string begins with a and has even length: {aa,ab,aaaa,aaab,aaba,abaa,aabb,abab,…} 10. The set of all strings over {a,b} in which each occurrence of b is immediately preceded by an a: {є,a,aa,ba,aba,aaa,baa,aaaa, aaba,baba,…} 20

21 Concatenation The concatenation of strings x and y, denoted by x  y or x y, is a string z such that: – z ( i ) = x ( i ) for 1  i  | x| – z ( i ) = y ( i ) for |x|< i  | x|+|y| Exp. automata  computation = automatacomputation x=a1a2…ai, y=b1b2….bj |xy|=i+j; xy=a1a2…aib1b2…bj x=01101, y=011 = xy= yx=?

22 Concatenation The concatenation of string x for n times, where n  0, is denoted by x n – x 0 =  – x 1 = x – x 2 = x x – x 3 = x x x – …– …