CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN. Lecture 1: Introduction

Similar documents
COMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Logic and Discrete Mathematics. Section 2.5 Equivalence relations and partitions

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth

CSE 20 DISCRETE MATH. Fall

CS243, Logic and Computation Sets, functions, and languages

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Slides for Faculty Oxford University Press All rights reserved.

1. [5 points each] True or False. If the question is currently open, write O or Open.

THEORY OF COMPUTATION

CSE 20 DISCRETE MATH. Winter

CSC Discrete Math I, Spring Sets

Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

Relational Database: The Relational Data Model; Operations on Database Relations

CS3102 Theory of Computation Problem Set 2, Spring 2011 Department of Computer Science, University of Virginia

DISCRETE MATHEMATICS

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

2.1 Sets 2.2 Set Operations

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

1. Relations 2. Equivalence relations 3. Modular arithmetics. ! Think of relations as directed graphs! xry means there in an edge x!

Lecture 6,

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

This Lecture. We will first introduce some basic set theory before we do counting. Basic Definitions. Operations on Sets.

r=1 The Binomial Theorem. 4 MA095/98G Revision

ECS 20 Lecture 9 Fall Oct 2013 Phil Rogaway

Discrete Mathematics

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

CS 441 Discrete Mathematics for CS Lecture 24. Relations IV. CS 441 Discrete mathematics for CS. Equivalence relation

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

Theory Bridge Exam Example Questions Version of June 6, 2008

Theory of Computation

Introduction to Sets and Logic (MATH 1190)

Discrete Mathematics Lecture 4. Harper Langston New York University


CS100: DISCRETE STRUCTURES

Relations and Graphs

2/18/14. Uses for Discrete Math in Computer Science. What is discrete? Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.

CS6160 Theory of Computation Problem Set 2 Department of Computer Science, University of Virginia

Automata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81%

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

Summary of Course Coverage

1 Finite Representations of Languages

Finite Automata Part Three

Data types for mcrl2

CMPSCI 250: Introduction to Computation. Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014

Power Set of a set and Relations

Plan of the lecture. G53RDB: Theory of Relational Databases Lecture 1. Textbook. Practicalities: assessment. Aims and objectives of the course

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}

Ordered structures. Dr. C. Constantinides. Department of Computer Science and Software Engineering Concordia University Montreal, Canada

Introduction II. Sets. Terminology III. Definition. Definition. Definition. Example

I BSc(Computer Science)[ ] Semester - II Allied:DISCRETE MATHEMATICS - 207D Multiple Choice Questions.

Binary Relations McGraw-Hill Education

Exercises Computational Complexity

CHAPTER 3 FUZZY RELATION and COMPOSITION

Tables. Part I. Truth-Tables P Q P Q P Q P P Q P Q

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

Automata Theory for Reasoning about Actions

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

CS103 Handout 42 Spring 2017 May 31, 2017 Practice Final Exam 1

Mathematics for Computer Science Exercises from Week 4

Formal Languages and Automata Theory, SS Project (due Week 14)

Set and Set Operations

Alphabets, strings and formal. An introduction to information representation

I have read and understand all of the instructions below, and I will obey the Academic Honor Code.

Finite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur

Sets. Sets. Subset, universe. Specifying sets, membership. Examples: Specifying a set using a predicate. Examples

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

Lecture 1: Examples, connectedness, paths and cycles

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

CS317 File and Database Systems

1.1 - Introduction to Sets

1.3 Functions and Equivalence Relations 1.4 Languages

Scheme Tutorial. Introduction. The Structure of Scheme Programs. Syntax

c) the set of students at your school who either are sophomores or are taking discrete mathematics

LOGIC AND DISCRETE MATHEMATICS

Dr. D.M. Akbar Hussain

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

CSC 501 Semantics of Programming Languages

Lecture 5. Logic I. Statement Logic

Theory of Computation Dr. Weiss Extra Practice Exam Solutions

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012

Regular Languages and Regular Expressions

Automata & languages. A primer on the Theory of Computation. The imitation game (2014) Benedict Cumberbatch Alan Turing ( ) Laurent Vanbever

CS 181 EXAM #1 NAME. You have 90 minutes to complete this exam. You may state without proof any fact taught in class or assigned as homework.

What is Set? Set Theory. Notation. Venn Diagram

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Appendix Set Notation and Concepts

MATH 22 MORE ABOUT FUNCTIONS. Lecture M: 10/14/2003. Form follows function. Louis Henri Sullivan

Implementation of Lexical Analysis

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Transcription:

CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN Lecture 1: Introduction

Introduction to the course 2 Required Text Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, BY MICHAEL SIPSER. The slides are only used for presenting the lectures and it is NOT USED FOR STUDY.

Introduction to the course 3 In this course we will cover these topics within 15 weeks.

Introduction to the course 4 Assessment method Assessment Week Grade Percentage from overall grade Comments Work sheets 4 work sheets 10 10% Every sheet covers from 2-3 chapters Quiz #1 Quiz #2 TUE 25/4/1435 TUE 01/6/1435 5 5% Midterm #1 Midterm #2 Project Class participation TUE 10/5/1435 TUE 15/6/1435 MON 28/6/1435 Every lecture 15 15 10 5 15% 15% 10% 5% Oral questions Final exam Total SUN 19/7/1435 40 100 40% 100%

0.1 Introduction 5 The theory of computation is divided over three parts: Part1: Automata Part2: Computability Part3: Complexity. They are all combined in one question: Q: What are the fundamental capabilities and limitations of computers?

Introduction..(cont.) 6 Complexity Computability Automata Computer problems (hard easy) Hard problem options Determine (true-false) deals with definitions and properties of mathematical models of computation Finite automaton (text processing compilershardware design) Who benefits from hard computations Context-free grammar (PL AI)

7 Set: A set is a group of objects represented as a unit. Sets contain any object (numbers, symbols, other sets). Example: A={7, 21, 57} Properties (read page 3-5) Membership- subsets- proper subset- order and repetition (set or multiset) infinite set- empty set. Describing a set {n rule about n} Set operations (union intersection complement) Venn diagram

8 Sequences and tuples. Sequence is a list of objects in some order. Uses parentheses. Tuples are finite sequence Properties (read page 6) Power set pairs Cartesian product or cross product

9 Functions and Relations Functions are central to mathematics. A function is an object that sets up an input-output relationship. (ex. f a = b ) A function is also called mapping. Examples: abs(x), add(a, b),. Domain (possible inputs), range (possible outputs) The notation for that: f: D R Ex. abs: Z Z, what about the add:?? a function that uses all the element in the range is called onto the range Ways to describe a function: procedures use table

10 Ex. f: 0,1,2,3,4 {0,1,2,3,4} What is the function and what is the modulo (m)? Zm = 0,1,2,, m 1, a number modulo m is the reminder after division by m. g: Z4 X Z4 Z4 (two dimension table, function add) When f is A 1 x.x A k, for some sets A 1.. A k, the input to f is a k- tuple (a 1, a 2,., a k ) and we call the a i the arguments to f A function with k arguments is called a k-ary function, and k is called the arity of the function. Some binary functions use infix notation (use symbol) rather than prefix notation (ex. a+b, add(a,b) ) A predicate or property is a function whose range is TRUE or FALSE (ex. Even(4)=TRUE) A property whose domain is a set of k-tuples Ax xa is called a relation. (k-ary relation)(ex. 2-ary relation using less than (<) infix)

11 Example 0.10 Predicate function (range {true, false}) on set {SCISSORS, PAPERS, STONES} relation is beat. Express beat set Equivalence relation R (special type of binary relation) must meat three conditions: Reflexive if for every x, xrx Symettric if for every x and y, xry and yrx Transitive if for every x,y and z, xry and yrz then xrz Example: set S={1,2,3,4}, R1 is less than or equal R2 is has the same parity. Explain which is equivalence relation?

12 Graphs: Undirected graph (graph): set of points with lines connecting some of the points. (points= nodes or vertices) (lines=edges) Directed graph : points with arrows connected the points. Node degree is number of edges on a node. No more than one edge is allowed between two nodes.

13 Graphs (cont.): Order of edge pair (i,j) does not matter only in undirected graph How to write the formal description of a graph G with V nodes and E edges for (a) (b) graphs.

14 Graphs are mostly used to represent data. Labeling the nodes or the edges make it Labeled Graph. Subset graph A path is a sequences of nodes connected by edges. Simple path doesn t repeat any nodes. Connected graph if every two nodes have a path between them. A path is cycle if it starts and ends in the same node. A simple cycle contains at least 3 nodes and repeat only the first and last node. A graph is a tree if connected and have NO simple cycles. Tree properties: root, leaves,

15 In Directed graph: outdegree =number of arrows pointing from a node. indegree= number of arrows pointing to a node Write formal description of the graph: Directed path when all arrows point in the same direction as its steps. Directed graph is strongly connected if a directed path connects every two nodes.

16 Strings and languages: Alphabet is any nonempty finite set and its members are symbols. String over an alphabet is finite sequence of symbols of that alphabet. (ex: 1 = 0,1 ) The length of string is the number of symbols in the string w Length zero is called empty string ( ᵋ ) Reverse of w (w R ) Substring (z of w) if z appears consecutively within w Concatenation. Lexicographic ordering (same as dictionary ordering). Ex. {0,1}

17 Boolean logic: Boolean logic is a mathematical system built around True and False values. (Boolean values) (0,1) Boolean operations: (negation -NOT ( ), conjunction- AND( ), disjunction OR ( )) these operations are used with operands. Other operations:( XOR ( ), equality ( ), implication ( ))

18 Distributive law.