BCS2143 – Theory of Computer Science

Slides:



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

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Theoretical Computer Science COMP 335 Fall 2004
1 CSCI 2400 section 3 Models of Computation Instructor: Costas Busch.
Introduction to CS Theory Lecture 1 – Introduction Piotr Faliszewski
 2004 SDU Introduction to the Theory of Computation My name: 冯好娣 My office: 计算中心 430
CS355 - Theory of Computation Lecture 2: Mathematical Preliminaries.
Introduction Chapter 0. Three Central Areas 1.Automata 2.Computability 3.Complexity.
CSE 3813 Introduction to Formal Languages and Automata Chapter 8 Properties of Context-free Languages These class notes are based on material from our.
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
1 Chapter 1 Automata: the Methods & the Madness Angkor Wat, Cambodia.
Mathematical Preliminaries Strings and Languages Preliminaries 1.
1 Chapter 1 Introduction to the Theory of Computation.
CSCI 2670 Introduction to Theory of Computing Instructor: Shelby Funk.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Fall 2005Costas Busch - RPI1 Mathematical Preliminaries.
Prof. Busch - LSU1 Mathematical Preliminaries. Prof. Busch - LSU2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Language: Set of Strings
CSC312 Automata Theory Lecture # 1 Introduction.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Mathematical Preliminaries
THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.
Introduction Episode 0 What is TOC (Theory of Computation) about? Giorgi Japaridze Theory of Computability Subject: The fundamental mathematical properties.
CS 203: Introduction to Formal Languages and Automata
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Chapter 8 Properties of Context-free Languages These class notes are based on material from our textbook, An Introduction to Formal Languages and Automata,
1 Mathematical Preliminaries. 2 Sets Functions Relations Graphs Proof Techniques.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 0 Introduction Some slides are in courtesy of Prof.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapter 1 INTRODUCTION TO THE THEORY OF COMPUTATION.
Chapter 4 Introduction to Set Theory
Foundations of Computing Science
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Introduction Chapter 0.
Formal Language & Automata Theory
Introduction to the Theory of Computation
Context-Free Grammars: an overview
Formal Modeling Concepts
Lecture 1 Theory of Automata
Welcome to Automata Theory Course
CSE 105 theory of computation
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CSE 105 theory of computation
Computer Science Department
Jaya Krishna, M.Tech, Assistant Professor
Introduction to Automata Theory
Definition: Let G = (V, T, P, S) be a CFL
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
INTRODUCTION TO THE THEORY OF COMPUTATION
CHAPTER 2 Context-Free Languages
Introduction to Finite Automata
Advanced Algorithms Analysis and Design
CSCI-2400 Models of Computation.
Mathematical Preliminaries Strings and Languages
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
Mathematical Preliminaries
Introduction Chapter 0.
Chapter 1 Introduction to the Theory of Computation
CSE 105 theory of computation
Terminology and Symbols
CSE 105 theory of computation
Presentation transcript:

BCS2143 – Theory of Computer Science Introduction

Why do we talk about Theory of Computation? Techniques of Computer theory are necessary in the teaching of courses on computer design, artificial intelligence, the analysis of algorithms, and so forth. They can be applied in compiler design, natural language processing as well.

What we will talk about ? Divide into 2 parts Automata Theory Computability Theory

Contents Automata and Languages Regular Languages Nondeterminism Regular Expressions Nonregular Expressions Context-free Grammars Pushdown Automata Non-context-free Languages

Contents Computability Theory The Church-Turing Thesis Decidability Reducibility

Desirable Prerequisites Some mathematical maturity (what constitutes a correct proof, etc.) which would be evidenced by successful completion of linear algebra and discrete math. Familiarity with programming constructs such as recursion and looping and basic algorithm analysis.

Warning You are required to attend at least 80% of the course. Otherwise, you will be barred from sitting the final examination corresponding to the rules of the university college. Copy Assignment is strongly prohibited.

Textbooks main : Introduction to the Theory of Computation, Michael Sipser, Massachusetts Institute of Technology, Cengage Learning, 2013. addition: Introduction to Automata Theory, Languages and Computation J.E Hopcroft, Rajeev Motwani, J.D. Ullman (Pearson New International edition), Pearson Education, 2014.

Introduction What are the fundamental capabilities and limitations of computers ? Time has increased our ability to compute and have brought this question out. What are the answers in Computability Theory and Automata Theory ?

Computability Theory There are some problems which can’t be solved by computers, e.g., determining whether a mathematical statement is true or false. The objective of the Computability Theory is to classify the problems whether they are solvable by computers or not.

Automata Theory deals with the definitions and properties of mathematical models of computation. Finite Automata (FA) used in text processing, compilers and hardware design. Context-free Grammar (CFG) used in programming languages and artificial intelligence.

Mathematical Notions and Terminology Sets Functions and Relations Sequences and Tuples Graphs Trees Strings and Languages Boolean Logic Proof techniques

Sets Importance: languages are sets 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.

Sets 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

Sets 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

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.

Operations on Sets 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. The complement of a set A, written as -A or (better) A with a bar drawn over it, is the set containing everything that is not in A. This is almost always used in the context of some universal set U that contains "everything" (meaning "everything we are interested in at the moment"). Then -A is shorthand for U - A.

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, including empty set. Two sets are disjoint if they have no elements in common, that is, if AB = .

Sequences and Tuples A sequence of objects is a list of those objects in some order. Usually designate by writing the list within parenthesis, e.g. (3,2,5). may be finite or infinite. finite sequences called tuples. sequence with k elements is a k-tuple, e.g., (3,2,5) is a 3-tuple.

Cartesian product (Cross product) If A and B are two sets, the Cartesian product of A and B, written A x B, is the set of all pairs wherein the first element is a member of A and the second element is a member of B.

Relations and Functions Importance: need basic familiarity with the terminology 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.

Relations and Functions 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.

Graphs Importance: Automata are graphs. 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").

Graphs 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.

Trees Importance: Trees are used in some algorithms. 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.

Trees 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.

Strings and Languages Important : Strings of characters are fundamental building blocks in computer science. Alphabet over which the strings are defined, may vary with the application however, it is a finite set. Notations: use Greek letters  and  to designate alphabets.

Strings and Languages String over an alphabet is a finite sequence of symbols from that alphabet, written next to one another and not separated by commas. If  = {0,1}, then 0100101 is a string over . If w is a string over , the length of w, written |w| is the number of symbols that it contains. string of length zero is called empty string, .

Strings and Languages The reverse of w, written wR, is the string obtained by writing w in the opposite order. String z is a substring of w if z appears consecutively within w. If we have string x of length m and string y of length n, the concatenation of x and y written xy is x1…xmy1…yn. xk = xx…x : self-concatenated string k Language is a set of strings.

Boolean Logic AND (conjunction)  OR (disjunction)  NOT (negation)  XOR (exclusive or)  Equality  : 1 if both of its operands have the same value. Implication  : 0 if its first operand is 1 and the second operand is 0; otherwise 1.

Definitions, Theorems and Proofs Theorems and proofs are the heart and soul of mathematics and definitions are its spirit. Definitions describe the objects and notations that we use. Definition may be simple or complex, precision is essential. When defining some objects, we must make clear what constitutes that object and what does not A proof is a convincing logical argument that a statement is true. Proofs must be convincing in an absolute sense. A theorem is a mathematical statement proved true. Lemmas – statements that assist other proofs Corollaries – related statements that are easily proved.