Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Thursday 23rd May 2013 Time: 09:45-11:45

Similar documents
A General Class of Noncontext Free Grammars Generating Context Free Languages

A Version Space Approach to Learning Context-free Grammars

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

Language properties and Grammar of Parallel and Series Parallel Languages

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

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

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

Grammars & Parsing, Part 1:

Proof Theory for Syntacticians

COMPUTATIONAL COMPLEXITY OF LEFT-ASSOCIATIVE GRAMMAR

Chinese Language Parsing with Maximum-Entropy-Inspired Parser

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

Enumeration of Context-Free Languages and Related Structures

(Sub)Gradient Descent

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

CS 101 Computer Science I Fall Instructor Muller. Syllabus

CS 598 Natural Language Processing

B.S/M.A in Mathematics

Self Study Report Computer Science

Refining the Design of a Contracting Finite-State Dependency Parser

Developing a concrete-pictorial-abstract model for negative number arithmetic

On the Polynomial Degree of Minterm-Cyclic Functions

Version Space. Term 2012/2013 LSI - FIB. Javier Béjar cbea (LSI - FIB) Version Space Term 2012/ / 18

Context Free Grammars. Many slides from Michael Collins

"f TOPIC =T COMP COMP... OBJ

The New York City Department of Education. Grade 5 Mathematics Benchmark Assessment. Teacher Guide Spring 2013

Parsing of part-of-speech tagged Assamese Texts

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

How Does Physical Space Influence the Novices' and Experts' Algebraic Reasoning?

Towards a MWE-driven A* parsing with LTAGs [WG2,WG3]

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

A Grammar for Battle Management Language

have to be modeled) or isolated words. Output of the system is a grapheme-tophoneme conversion system which takes as its input the spelling of words,

Grade 5 + DIGITAL. EL Strategies. DOK 1-4 RTI Tiers 1-3. Flexible Supplemental K-8 ELA & Math Online & Print

This scope and sequence assumes 160 days for instruction, divided among 15 units.

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

WSU Five-Year Program Review Self-Study Cover Page

What the National Curriculum requires in reading at Y5 and Y6

How do adults reason about their opponent? Typologies of players in a turn-taking game

Extending Place Value with Whole Numbers to 1,000,000

Approaches to control phenomena handout Obligatory control and morphological case: Icelandic and Basque

Spring 2016 Stony Brook University Instructor: Dr. Paul Fodor

Sample Problems for MATH 5001, University of Georgia

Developing a TT-MCTAG for German with an RCG-based Parser

Parallel Evaluation in Stratal OT * Adam Baker University of Arizona

Backwards Numbers: A Study of Place Value. Catherine Perez

School of Innovative Technologies and Engineering

Bluetooth mlearning Applications for the Classroom of the Future

The Interface between Phrasal and Functional Constraints

ReinForest: Multi-Domain Dialogue Management Using Hierarchical Policies and Knowledge Ontology

The Strong Minimalist Thesis and Bounded Optimality

Specifying Logic Programs in Controlled Natural Language

Rule Learning With Negation: Issues Regarding Effectiveness

Type Theory and Universal Grammar

South Carolina English Language Arts

GCSE. Mathematics A. Mark Scheme for January General Certificate of Secondary Education Unit A503/01: Mathematics C (Foundation Tier)

Dublin City Schools Mathematics Graded Course of Study GRADE 4

Focused on Understanding and Fluency

An Interactive Intelligent Language Tutor Over The Internet

Rule Learning with Negation: Issues Regarding Effectiveness

Computer Science 1015F ~ 2016 ~ Notes to Students

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

Natural Language Processing. George Konidaris

PRODUCT PLATFORM DESIGN: A GRAPH GRAMMAR APPROACH

Lecture 1: Basic Concepts of Machine Learning

Some Principles of Automated Natural Language Information Extraction

Physics 270: Experimental Physics

Liquid Narrative Group Technical Report Number

Chapter 2. Intelligent Agents. Outline. Agents and environments. Rationality. PEAS (Performance measure, Environment, Actuators, Sensors)

Focus of the Unit: Much of this unit focuses on extending previous skills of multiplication and division to multi-digit whole numbers.

Efficient Normal-Form Parsing for Combinatory Categorial Grammar

Papers on the Voynich Manuscript

AGS THE GREAT REVIEW GAME FOR PRE-ALGEBRA (CD) CORRELATED TO CALIFORNIA CONTENT STANDARDS

FractionWorks Correlation to Georgia Performance Standards

Enhancing Unlexicalized Parsing Performance using a Wide Coverage Lexicon, Fuzzy Tag-set Mapping, and EM-HMM-based Lexical Probabilities

Classroom Connections Examining the Intersection of the Standards for Mathematical Content and the Standards for Mathematical Practice

Math DefragGED: Calculator Tips and Tricks

GCSE Mathematics B (Linear) Mark Scheme for November Component J567/04: Mathematics Paper 4 (Higher) General Certificate of Secondary Education

Math-U-See Correlation with the Common Core State Standards for Mathematical Content for Third Grade

Improved Reordering for Shallow-n Grammar based Hierarchical Phrase-based Translation

Hans-Ulrich Block, Hans Haugeneder Siemens AG, MOnchen ZT ZTI INF W. Germany. (2) [S' [NP who][s does he try to find [NP e]]s IS' $=~

Abstractions and the Brain

Intelligent Agents. Chapter 2. Chapter 2 1

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

My Program is Correct But it Doesn t Run: A Preliminary Investigation of Novice Programmers Problems

Character Stream Parsing of Mixed-lingual Text

ABSTRACT. A major goal of human genetics is the discovery and validation of genetic polymorphisms

Towards a Robuster Interpretive Parsing

An Evaluation of the Interactive-Activation Model Using Masked Partial-Word Priming. Jason R. Perry. University of Western Ontario. Stephen J.

Machine Learning from Garden Path Sentences: The Application of Computational Linguistics

AQUA: An Ontology-Driven Question Answering System

The Odd-Parity Parsing Problem 1 Brett Hyde Washington University May 2008

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

Linguistics. Undergraduate. Departmental Honors. Graduate. Faculty. Linguistics 1

Level 6. Higher Education Funding Council for England (HEFCE) Fee for 2017/18 is 9,250*

Edexcel GCSE. Statistics 1389 Paper 1H. June Mark Scheme. Statistics Edexcel GCSE

PowerTeacher Gradebook User Guide PowerSchool Student Information System

Derivational: Inflectional: In a fit of rage the soldiers attacked them both that week, but lost the fight.

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

Characteristics of Functions

Transcription:

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Fundamentals of Computation Date: Thursday 23rd May 2013 Time: 09:45-11:45 Please answer any THREE Questions from the FOUR Questions provided. Use a SEPARATE answerbook for each SECTION. This is a CLOSED book examination The use of electronic calculators is NOT permitted [PTO]

Section A COMP11212 1. a) Consider the language of all words over the alphabet {a,b,c} whose first letter, if it exists, is the same as its last letter. Give a description of this language via the following means. i) using a regular expression ii) using a DFA iii) using a grammar iv) using the language of set theory b) Give a DFA for the language of all words over the alphabet {a,b,c} that match the regular expression ab c a b c. (8 marks) c) Are the following languages over the alphabet {a, b, c} regular? Justify your answer. i) The language of all words whose number of symbols is divisible by three. ii) The language of all words such that the number of as in the word minus the number of cs in the word is divisible by three. Page 2 of 5

2. a) Consider the following grammar. The underlying alphabet is {a, b, c}, there is only one non-terminal symbol, S, and the production rules are S as cs cbs bcs ε. i) Show that this grammar is ambiguous by giving a word with two parse trees. Make sure you also draw the word s parse trees. (4 marks) ii) Describe the language generated by the grammar. iii) Give an unambiguous grammar for this language. Give an argument for your grammar being unambiguous. (4 marks) b) Consider the regular expression (a b) ab(a b) over the alphabet {a,b}. i) Describe the language consisting of all words that do not match the given regular expression without referring to that regular expression. ii) Give a DFA for the language from (i). c) Consider the language of balanced strings of brackets (, ), and square brackets [, ]. Such strings must have as many opening as closing brackets of each kind, when reading the string the number of closing brackets of either kind seen so far must not exceed the number of corresponding opening brackets and each closing bracket must match the rightmost opening bracket that has not yet been matched. i) Give a context-free grammar for this language. ii) Give parse trees for the strings ([][])[] and ([()[]]()). Page 3 of 5 [PTO]

Section B COMP11212 3. a) State the principle of structural induction for finite lists b) Using structural induction, show that (++, []) is a monoid; i.e. the append operator ++ is associative, and that the empty list [] is both a left and right identity for ++. Append (++) is defined as: (++) :: [a] -> [a] -> [a] [] ++ ys = ys (x:xs) ++ ys = x: (xs ++ ys) c) Use structural induction to show that map f map g = map ( f g) Why do we need to use induction with to prove this equality? map :: (a -> b) -> [a] -> [b] map f [] = [] map f (x:xs) = f x: map f xs d) Explain the following concepts: computability, uncomputability, decidability, and semi-decidability. For each class of problem, give an example problem which is in the class. e) Show that the Halting Problem is undecidable; you need not give a full account of the universal program. f) Show that the problem of determining that a program halts is semi-decidable. Page 4 of 5

4. a) Explain the following concepts: pre-condition, post-condition, partial correctness, and loop-invariant with reference to the while language. b) Consider the following while program: r := 1; while (x > 0) do (r := r*y; x := x-1) Show that for some n and m: y = n n x r = m is a loop-invariant for the while loop. c) What is the value of r when the program from the previous part terminates? Using the loop invariant, prove your hypothesis. d) Explain why we use Big-O notation when discussing algorithmic efficiency. e) Using induction or otherwise, show that the factorial function fac: fac 0 = 1 fac (n+1) = (n+1) * fac n has time-complexity O(n). f) Why does the problem of binary search have a lower bound of O(logn)? Page 5 of 5 END OF EXAMINATION