CST229 Week 2 Questions or concern? Homework #1 due – Difference between permutation and no restrictions on using an element more than once. Code example:

Slides:



Advertisements
Similar presentations
Specifying Languages Our aim is to be able to specify languages for use in the computer. The sketch of the FSA is easy for us to understand, but difficult.
Advertisements

1 Lecture 32 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union,
YES-NO machines Finite State Automata as language recognizers.
Regular Grammars Formal definition of a regular expression.
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.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Topics Automata Theory Grammars and Languages Complexities
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
L ECTURE 2 Chapter 3 Recursive Definitions. R ECURSIVE D EFINITION It is method of defining sets.
Chapter 2 Languages.
Finite-State Machines with No Output
1 Syntax Specification Regular Expressions. 2 Phases of Compilation.
Theory Of Automata By Dr. MM Alam
CSC312 Automata Theory Lecture # 2 Languages.
CSC312 Automata Theory Lecture # 2 Languages.
Introduction to Theory of Automata
Compiler Phases: Source program Lexical analyzer Syntax analyzer Semantic analyzer Machine-independent code improvement Target code generation Machine-specific.
Context-free Grammars Example : S   Shortened notation : S  aSaS   | aSa | bSb S  bSb Which strings can be generated from S ? [Section 6.1]
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 Language Definitions Lecture # 2. Defining Languages The languages can be defined in different ways, such as Descriptive definition, Recursive definition,
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
1 INFO 2950 Prof. Carla Gomes Module Modeling Computation: Language Recognition Rosen, Chapter 12.4.
1 Chapter 1 Introduction to the Theory of Computation.
Grammars CPSC 5135.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
Lecture-2 Recap Lecture-1
L ECTURE 3 Chapter 4 Regular Expressions. I MPORTANT T ERMS Regular Expressions Regular Languages Finite Representations.
CST229 Week 4 Questions or concerns? Test#1 next Thursday Homework #3 due Hand back Homework #2 Reading: Chapters 5 & 7 In-Class Exercise #4a Chapter 5.
1 Module 14 Regular languages –Inductive definitions –Regular expressions syntax semantics.
Review: Compiler Phases: Source program Lexical analyzer Syntax analyzer Semantic analyzer Intermediate code generator Code optimizer Code generator Symbol.
4.5 Multiplying Polynomials by Monomials Objective: To multiply a polynomial by a monomial. Warm – up: Simplify: 1) x 3 ∙x 6 2) 2(a – 4) 3) 4(2y + 3) 4)
Chapter 5: Permutation Groups  Definitions and Notations  Cycle Notation  Properties of Permutations.
Enter Chomsky Grammars. 2 What has Chomsky* to do with computing? Linguistics and computing intersect at various places: Things that are used to create.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
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.
Recursive Definations Regular Expressions Ch # 4 by Cohen
CST229 Week 8 Questions or concerns? Hand back Homework #6 & #5 Reading: Chapter 14 Comment about Lab1 Getting started with Lab2 Chapter 14 – Regular Grammar.
CST229 Week 7 Questions or concerns? Hand back Test#1 & Homework #4 – Test1 Average (45/50) Reading: Chapters 12&13 Chapter 12 – Grammar – production rules.
November 2003Computational Morphology III1 CSA405: Advanced Topics in NLP Xerox Notation.
Formal Languages and Grammars
Lecture # Book Introduction to Theory of Computation by Anil Maheshwari Michiel Smid, 2014 “Introduction to computer theory” by Daniel I.A. Cohen.
Lecture # 4.
Mathematical Foundations of Computer Science Chapter 3: Regular Languages and Regular Grammars.
Lecture 2 Theory of AUTOMATA
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
Week 13 - Wednesday.  What did we talk about last time?  Exam 3  Before review:  Graphing functions  Rules for manipulating asymptotic bounds  Computing.
1 Strings and Languages Lecture 2-3 Ref. Handout p12-17.
Lecture 02: Theory of Automata:2014 Asif Nawaz Theory of Automata.
CHAPTER TWO LANGUAGES By Dr Zalmiyah Zakaria.
CS410 Homework By Dr. Lee. Chapter 1 Homework Due: 1/30/2013 Search the detail definition from Internet for the following computer terms: 1.Interpreter.
By Dr.Hamed Alrjoub. 1. Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc., 1991, Second Edition 2. Introduction to Languages.
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.
Lecture 17: Theory of Automata:2014 Context Free Grammars.
Chapter 2. Formal Languages Dept. of Computer Engineering, Hansung University, Sung-Dong Kim.
CST229 Week 6 Questions or concerns? Homework #4 due
Theory of Computation Lecture #
Lecture # 2.
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
Formal Methods in software development
Formal Language.
Specifying Languages Our aim is to be able to specify languages for use in the computer. The sketch of the FSA is easy for us to understand, but difficult.
Regular Expression to NFA
Formal Methods in software development
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
Chapter 1 Introduction to the Theory of Computation
Recap Lecture-2 Kleene Star Closure, Plus operation, recursive definition of languages, INTEGER, EVEN, factorial, PALINDROME, {anbn}, languages of strings.
CSC312 Automata Theory Lecture # 2 Languages.
CSC312 Automata Theory Lecture # 3 Languages-II.
Presentation transcript:

CST229 Week 2 Questions or concern? Homework #1 due – Difference between permutation and no restrictions on using an element more than once. Code example: Generate all permutation Reading: Chapters 2 & 3 this week, Chapter 4 next week. Review of main topics for this class. – Languages (formal languages) – language definitions/notations (chapters 2, 3, 4) – Machines (chapters 5, 7, 14, 15) – Grammar (chapters 12, 13) Why the need for formal languages or grammars? Chapter 2 – language definitions (set notation & Kleene closure) In-Class Exercise Part a Chapter 3 – recursive definitions In-Class Exercise Part b & c

In-Class Exercise #2 part a Let S1 = {aa, b}, how many words of length 2 does S1* have? Length 3? Length 4? Let S2 = {aa, aba, baa}, let L2 = S* is aabaa  L2? is baaabaaa  L2? is baaaaababaaa  L2? If S = {ab, bb} & T = {ab, bb, bbbb}, is S* = T*?

In-Class Exercise 2 part b Write a recursive function in C/C++ to compute if a word is a palindrome? bool isPal(char * word,.....

In-Class Exercise 2 part c Use recursive definition to show that all numbers end in the digits 0, 2, 4, 6, 8 are even