1 / 7

CST229 Week 6

CST229 Week 6. Questions or concerns? Homework #4 due Hand back Homework #3 Reading: Chapters 12&13 Quick note about Lab#1 Lab#1 due tomorrow at midnight via email Revised course schedule Quick look at Chapter 12 Test#1. Three main topics. Languages Notations for defining the language

missy
Download Presentation

CST229 Week 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CST229 Week 6 • Questions or concerns? • Homework #4 due • Hand back Homework #3 • Reading: Chapters 12&13 • Quick note about Lab#1 • Lab#1 due tomorrow at midnight via email • Revised course schedule • Quick look at Chapter 12 • Test#1

  2. Three main topics • Languages • Notations for defining the language • Set notation • Recursive definitions • Regular expressions (for a specific type of language – regular languages) • Definitions serve as a recognizer or a generator • Machines • Recognizer – given a definition and a string, the machine can tell if the string is in the language • Finite Automata - Deterministic Finite Automata (ch. 5) Nondeterministic Finite Automata (ch. 7) – optional • Grammar • Just another notation for defining languages. • Unlike regular expressions which only define regular languages, grammar is more flexible and more general.

  3. Grammar • Language Hierarchy (Noam Chomsky) based on complexity of structure • Regular – no nesting • Context-Free – handles nesting structures. Syntax only, no meaning • Context-Sensitive – adds semantic information • Recursive enumerable – more complex, closer to natural languages

  4. Recursive Enumerable Context-sensitive Context-Free Regular languages

  5. Grammar • Two different notations, developed independent of each other, but very similar • Chomsky • Backus / Naur (John Backus / Peter Naur) Form • Notation for defining languages, particularly programming languages. • Recursive by nature (similar to recursive definitions) • Nondeterministic by nature • We use grammar as a recognizer/generator just like other language definitions

  6. Grammar • Let’s start with a recursive definition Lp = string over {a,b} where w = wr Base:  is in Lp, so is a & b Rec: if x is in Lp, then so is axa and bxb

  7. Grammar • Another notation S ->  S -> a S -> b S -> aSa S -> bSb

More Related