Where did these models come from? Menu. Lecture 8: Context-Free Languages. Modeling Human Intellect. Nondeterministic Machine Models

Similar documents
Grammars & Parsing, Part 1:

Informatics 2A: Language Complexity and the. Inf2A: Chomsky Hierarchy

Syntax Parsing 1. Grammars and parsing 2. Top-down and bottom-up parsing 3. Chart parsers 4. Bottom-up chart parsing 5. The Earley Algorithm

COMPUTATIONAL COMPLEXITY OF LEFT-ASSOCIATIVE GRAMMAR

CS 598 Natural Language Processing

A R "! I,,, !~ii ii! A ow ' r.-ii ' i ' JA' V5, 9. MiN, ;

Language properties and Grammar of Parallel and Series Parallel Languages

Natural Language Processing. George Konidaris

Proof Theory for Syntacticians

RANKING AND UNRANKING LEFT SZILARD LANGUAGES. Erkki Mäkinen DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A ER E P S I M S

An Introduction to the Minimalist Program

Erkki Mäkinen State change languages as homomorphic images of Szilard languages

CS 101 Computer Science I Fall Instructor Muller. Syllabus

Parsing of part-of-speech tagged Assamese Texts

A Version Space Approach to Learning Context-free Grammars

A General Class of Noncontext Free Grammars Generating Context Free Languages

11/29/2010. Statistical Parsing. Statistical Parsing. Simple PCFG for ATIS English. Syntactic Disambiguation

WSU Five-Year Program Review Self-Study Cover Page

(Sub)Gradient Descent

Basic Parsing with Context-Free Grammars. Some slides adapted from Julia Hirschberg and Dan Jurafsky 1

Self Study Report Computer Science

GACE Computer Science Assessment Test at a Glance

Enumeration of Context-Free Languages and Related Structures

The Strong Minimalist Thesis and Bounded Optimality

IAT 888: Metacreation Machines endowed with creative behavior. Philippe Pasquier Office 565 (floor 14)

A Grammar for Battle Management Language

Axiom 2013 Team Description Paper

Evolution of Symbolisation in Chimpanzees and Neural Nets

Designing a Computer to Play Nim: A Mini-Capstone Project in Digital Design I

use different techniques and equipment with guidance

Moodle 2 Assignments. LATTC Faculty Technology Training Tutorial

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

Data Structures and Algorithms

Student User s Guide to the Project Integration Management Simulation. Based on the PMBOK Guide - 5 th edition

Lecture 10: Reinforcement Learning

"f TOPIC =T COMP COMP... OBJ

Outreach Connect User Manual

B.S/M.A in Mathematics

IT Students Workshop within Strategic Partnership of Leibniz University and Peter the Great St. Petersburg Polytechnic University

CAN PICTORIAL REPRESENTATIONS SUPPORT PROPORTIONAL REASONING? THE CASE OF A MIXING PAINT PROBLEM

A Minimalist Approach to Code-Switching. In the field of linguistics, the topic of bilingualism is a broad one. There are many

Writing Research Articles

EDIT 576 (2 credits) Mobile Learning and Applications Fall Semester 2015 August 31 October 18, 2015 Fully Online Course

Moodle Student User Guide

Empiricism as Unifying Theme in the Standards for Mathematical Practice. Glenn Stevens Department of Mathematics Boston University

Reinforcement Learning by Comparing Immediate Reward

CS4491/CS 7265 BIG DATA ANALYTICS INTRODUCTION TO THE COURSE. Mingon Kang, PhD Computer Science, Kennesaw State University

Some Principles of Automated Natural Language Information Extraction

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

CHANCERY SMS 5.0 STUDENT SCHEDULING

EDIT 576 DL1 (2 credits) Mobile Learning and Applications Fall Semester 2014 August 25 October 12, 2014 Fully Online Course

DIDACTIC MODEL BRIDGING A CONCEPT WITH PHENOMENA

We are strong in research and particularly noted in software engineering, information security and privacy, and humane gaming.

Evidence-based Practice: A Workshop for Training Adult Basic Education, TANF and One Stop Practitioners and Program Administrators

Fashion Design & Merchandising Programs STUDENT INFORMATION & COURSE PARTICIPATION FORM

Storytelling Made Simple

9.85 Cognition in Infancy and Early Childhood. Lecture 7: Number

Outline. Web as Corpus. Using Web Data for Linguistic Purposes. Ines Rehbein. NCLT, Dublin City University. nclt

Abstractions and the Brain

Department of Anthropology ANTH 1027A/001: Introduction to Linguistics Dr. Olga Kharytonava Course Outline Fall 2017

UI Math Contest Open House September 6, 2017 Math Contests at Illinois Overview Sample Contest Problems

Improving Fairness in Memory Scheduling

WE ARE EXCITED TO HAVE ALL OF OUR FFG KIDS BACK FOR OUR SCHOOL YEAR PROGRAM! WE APPRECIATE YOUR CONTINUED SUPPORT AS WE HEAD INTO OUR 8 TH SEASON!

Getting Started Guide

On the Polynomial Degree of Minterm-Cyclic Functions

Detecting English-French Cognates Using Orthographic Edit Distance

SOME MINIMAL NOTES ON MINIMALISM *

ELP in whole-school use. Case study Norway. Anita Nyberg

Home Access Center. Connecting Parents to Fulton County Schools

EECS 700: Computer Modeling, Simulation, and Visualization Fall 2014

ENGBG1 ENGBL1 Campus Linguistics. Meeting 2. Chapter 7 (Morphology) and chapter 9 (Syntax) Pia Sundqvist

GRAMMAR IN CONTEXT 2 PDF

Page 1 of 11. Curriculum Map: Grade 4 Math Course: Math 4 Sub-topic: General. Grade(s): None specified

Implementing a tool to Support KAOS-Beta Process Model Using EPF

PowerTeacher Gradebook User Guide PowerSchool Student Information System

Context Free Grammars. Many slides from Michael Collins

Language Evolution, Metasyntactically. First International Workshop on Bidirectional Transformations (BX 2012)

Notes on The Sciences of the Artificial Adapted from a shorter document written for course (Deciding What to Design) 1

Modeling user preferences and norms in context-aware systems

Carolina Course Evaluation Item Bank Last Revised Fall 2009

GLBL 210: Global Issues

Emporia State University Degree Works Training User Guide Advisor

Case study Norway case 1

Using SAM Central With iread

Graduate Program in Education

INTERMEDIATE ALGEBRA Course Syllabus

NAME: East Carolina University PSYC Developmental Psychology Dr. Eppler & Dr. Ironsmith

Course Syllabus. Course Information Course Number/Section OB 6301-MBP

Short vs. Extended Answer Questions in Computer Science Exams

PREP S SPEAKER LISTENER TECHNIQUE COACHING MANUAL

LMS - LEARNING MANAGEMENT SYSTEM END USER GUIDE

University of Groningen. Systemen, planning, netwerken Bosman, Aart

The Life & Work of Winslow Homer NAPOLEON SARONY, PHOTOGRAPH: WINSLOW HOMER TAKEN IN N.Y., 1880, 1880, BOWDOIN COLLEGE MUSEUM OF ART

International Business Bachelor. Corporate Finance. Summer Term Prof. Dr. Ralf Hafner

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

MOODLE 2.0 GLOSSARY TUTORIALS

STUDENT MOODLE ORIENTATION

EdX Learner s Guide. Release

Naviance / Family Connection

Cognitive Thinking Style Sample Report

Transcription:

Menu Lecture 8: Context-Free Languages Review Machine Models of Computing Linguistic Model of Computing Challenge Problem Near-Solution - Liuyi (Eric) Zhang Context-Free Grammars cs302: Theory of Computation University of Virginia Computer Science David Evans http://www.cs.virginia.edu/evans 2 Deterministic Machine Models Nondeterministic Machine Models 010110101101010101 Yes or No 010110101101010101 Yes or No Memory Machine Languages Finite States DFA Regular + Stack DPDA [this week] + Tape TM [later] Memory Machine Languages Finite States NFA Regular + Stack NDPDA [this week] + Tape NDTM [later] 3 4 Modeling Human Intellect Where did these models come from? Turing Machine (Alan Turing, 1936) Modeling Human Computers DFAs McCulloch and Pitts, A logical calculus of the ideas immanent in nervous activity, 1943 S. C. Kleene, Representation of Events in Nerve Nets and Finite Automata, 1956 Claude Shannon and John McCarthy, Automata Studies, 1956 5 6 1

Out theoretical objective is not dependent on the assumptions fitting exactly. It is a familiar strategem of science, when faced with a body of data too complex to be mastered as a whole, to select some limited domain of experiences, some simple situations, and to undertake to construct a model to fit these at least approximately. Having set up such a model, the next step is to seek a thorough understanding of the model itself. S. C. Kleene, Representation of Events in Nerve Nets and Finite Automata, 1956 Language-Based Models of Computation 7 8 Noam Chomsky (born 1928), MIT Linguistics Professor and Leftist Political Activist Hugo Chávez at the United Nations (20 Sept 2006) 9 10 I don t know anybody who s ever read a Chomsky book, He does not write page turners, he writes page stoppers. There are a lot of bent pages in Noam Chomsky s books, and they are usually at about Page 16. Alan Dershowitz I must admit to taking a copy of Noam Chomsky s Syntactic Structures along with me on my honeymoon in 1961. During odd moments, while crossing the Atlantic in an ocean liner and while camping in Europe, I read that book rather thoroughly and tried to answer some basic theoretical questions. Here was a marvelous thing: a mathematical theory of language in which I could use a computer programmer s intuition! The mathematical, linguistic, and algorithmic parts of my life had previously been totally separate. During the ensuing years those three aspects became steadily more intertwined; and by the end of the 1960s I found myself a Professor of Computer Science at Stanford University, primarily because of work that I had done with respect to languages for computer programming. Donald Knuth 11 12 2

Replacement Grammars Left Right Anything that matches the left side can be replaced by what is on the right side. Left and Right can be any sequence of variables (nonterminals) and symbols (terminals) Restricted Replacement Grammars Unrestricted: α β (left and right sides can be any sequence of symbols and variables) Context-Sensitive: (A is a variable) Context-Free: Regular: αaβ αγβ A αγβ A ab ; A a 13 14 Example Regular Grammar S See A A Spot B A Jane B B run B jump How many possible sentences? Spot run Why do we call it a Regular Grammar? S See A Jane B jump End Kanzi and Sue Savage-Rumbaugh 15 16 Example Regular Grammar S See A A Spot B A Jane B B run B jump B and A Spot run S A B See Jane and jump End Charles Yang 17 18 3

Recursion = Human? We hypothesize that faculty of language in the narrow sense (FLN) only includes recursion and is the only uniquely human component of the faculty of language. We further argue that FLN may have evolved for reasons other than language, hence comparative studies might look for evidence of such computations outside of the domain of communication (for example, number, navigation, and social relations). Marc Hauser, Noam Chomsky, Tecumseh Fitch, The Faculty of Language: What Is It, Who Has It, and How Did It Evolve?, Science, Nov 2002 Challenge Problem Liuyi (Eric) Zhang Steven Pinker and Ray Jackendoff (2004): its not just recursion... 19 20 Problem: Sort 1 million 32-bit integers Review: Heaps A heap is a complete binary tree, usually represented as an array: 16 4 10 14 7 9 3 2 8 1 A = 16 14 10 8 7 9 3 2 4 1 From David Luebke CS 432 Spring 2002 Slides 21 22 Sorting Bit Sort Heap starts 32 bit before the 1 st integer Sort bit by compare 8 bits with 01111111 2 Max - Ordered Heap Upper-to-Bottom bit sort Building Sorted List 23 24 4

Continue Memory Sort till the last bit Bottom-up 25 26 Compare Heap Sort Requires ~ n log 2 n comparisons 4 bytes to store integer Bit Sort: Requires ~ 32n comparisons Memory to store (up to 33) memory addresses that separate the 1s and 0s Challenge Recap 27 28 Language Classes Context-Free Grammar Finite Regular Context-Free Described by a finite set, DFA with no cycles, Regular grammar with no recursion Described by a DFA, NFA, Regular grammar Described by a NDPDA, Context-Free Grammar A One variable αγβ Any sequence of variables and terminals Why is it called Context-Free? 29 30 5

Example 1 S 0S0 S 1S1 S ε Example 2 Define a CFG that generates the language: { w w {0, 1}* and w has an equal number of 0s and 1s } 31 32 Review Questions Charge How do you prove a grammar is How do you prove a grammar is not How do you prove a language is How do you prove a language is not Return PS2 and PS2 Comments now PS3 is posted on the course site (Due in 1 week, Feb 19) Thursday: Equivalence of NDPDAs and CFGs (sketch) Non-Context-Free Languages 33 34 6