Lecture1 PDF
Lecture1 PDF
Module Overview
Chomsky Hierarchy
G52MAL Machines and their Languages Lecture 1: Administrative Details and Introduction
Thorsten Altenkirch based on slides by Neil Sculthorpe
Room A10 School of Computer Science University of Nottingham United Kingdom [email protected]
Administrative Details
Module Overview
Chomsky Hierarchy
Module Prerequisites
G51FUN: Functional Programming G51MCS: Mathematics for Computer Scientists G51PRG: Programming
Administrative Details
Module Overview
Chomsky Hierarchy
Lecturer: Thorsten Altenkirch Location: Room A10, Computer Science Building e-mail: [email protected] Tutors
Laurence Day, Room A04, CS, [email protected] Bas van Gijzel, Room A04, CS, [email protected]
Administrative Details
Module Overview
Chomsky Hierarchy
Module webpage: www.cs.nott.ac.uk/txa/g52mal Coursework support page: www.cs.nott.ac.uk/txa/g52mal/cswk.html Web Forum: webservices.cs.nott.ac.uk/forum
Administrative Details
Module Overview
Chomsky Hierarchy
Contacting Us
The best time to come and talk to me is immediately after a lecture. Failing that, you can come and see me in my oce; but I cant guarantee that Ill be available. The best way to seek coursework help is on the web forum. If you dont want to post on the forum for some reason, then you can email: [email protected]
Administrative Details
Module Overview
Chomsky Hierarchy
Lectures
Thursday, 9am, A25, Business School South Fridays, 2pm, LT3, Business School South Mixture of slides and whiteboard you are expected to take notes!
Administrative Details
Module Overview
Chomsky Hierarchy
Tutorials
Attending tutorials is compulsory and essential for coursework. Tutorials provide an excellent opportunity to ask questions! Use it! Coursework handin and feedback takes place in the tutorial. In person! Tutorial groups on Wednesday: 9-10, 10-11 or 14-15. You will be assigned a group, but you can change with good reason. Tutorials start on Wednesday, 15 February
Administrative Details
Module Overview
Chomsky Hierarchy
Coursework
8 weekly problem sets. The best 5 solutions count. Made available via the module web page. First coursework available: Friday 10th February First deadline: Wednesday 22nd February, in your tutorial! Late submission: Thursday at the school oce (- 10 %). Tutor may ask for clarication! You may loose points if you cannot answer! Or if you miss your tutorial. Each coursework will contain a bonus exercise.
Administrative Details
Module Overview
Chomsky Hierarchy
Assessment
Coursework: 25% 2 hour written examination: 75% However, resits are by 100% written examination (standard School policy).
Administrative Details
Module Overview
Chomsky Hierarchy
Literature
Main reference: Introduction to Automata Theory, Languages, and Computation; 2nd or 3rd edition; Hopcroft, Motwani and Ullman; (1979, 2000 & 2006). G52MAL Lecture Notes, Altenkirch and Nilsson, 2007. Available via the G52MAL module web-page. Your own notes from the lectures!
G52MAL: Machines and their Languages L1: Administrative Details and Introduction
Administrative Details
Module Overview
Chomsky Hierarchy
Compilers
Topics covered in G52MAL have important applications in the area of compiler construction. In fact, G52MAL feeds directly into next years Compilers module. If you are curious you might want to check out The Dragon Book: Compilers Principles, Techniques, and Tools; Aho, Sethi & Ullman; 1986.
Administrative Details
Module Overview
Chomsky Hierarchy
To familiarise you with key Computer Science concepts in central areas such as:
Automata Theory Formal Languages Models of Computation
This includes:
the equivalence between machine types and language types; the specication of formal languages by grammars and other notations; the relevance of machines that process strings from an alphabet as models of computation; and the limits on what is computable by any machine.
Administrative Details
Module Overview
Chomsky Hierarchy
Content
Administrative Details
Module Overview
Chomsky Hierarchy
Finite automata are a useful model for important kinds of hardware and software: Software for designing and checking digital circuits. Lexical analyser of compilers. Finding words and patterns in large bodies of text (e.g. in web pages). Verication of systems with nite number of states (e.g. communication protocols).
Administrative Details
Module Overview
Chomsky Hierarchy
The study of Automata and Formal Languages are intimately connected. Methods for specifying formal languages are very important in many areas of Computer Science, for example: Context Free Grammars are very useful when designing software that processes data with recursive structure, like the parser in a compiler. Regular Expressions are very useful for specifying lexical aspects of programming languages and search patterns.
Administrative Details
Module Overview
Chomsky Hierarchy
Automata are essential for the study of the limits of computation. Two issues: What can a computer do at all? (Decidability) What can a computer do eciently? (Intractability)
Administrative Details
Module Overview
Chomsky Hierarchy
Suppose you need to locate a piece of text in a directory containing a large number of les of various kinds. You recall only that the text mentions the year 19-something. The following UNIX-command will do the trick: grep "19[0-9][0-9]" *.txt The command involves TWO (extended) regular expressions.
Administrative Details
Module Overview
Chomsky Hierarchy
Administrative Details
Module Overview
Chomsky Hierarchy
Consider the following program: while (n > 1 ) { if even (n) { n = n / 2; } else { n = n 3 + 1; } } Does it terminate for all values of n 1 ? (where n N)
Administrative Details
Module Overview
Chomsky Hierarchy
For example, say we start with n = 7 : 7 , 22 , 11 , 34 , 17 , 52 , 26 , 13 , 40 , 20 , 10 , 5 , 16 , 8 , 4 , 2 , 1 In fact, for all numbers that have been tried (a lot!), it does terminate . . . . . . but no one has ever been able to prove that it always terminates!
Administrative Details
Module Overview
Chomsky Hierarchy
Thus the following important decidability result should perhaps not come as a total surprise: It is impossible to write a program that decides if another, arbitrary, program terminates (halts) or not. What might be surprising is that it is possible to prove such a result. This was rst done by Alan Turing.
Administrative Details
Module Overview
Chomsky Hierarchy
Alan Turing
Alan Turing (19121954): British mathematician. Introduced an abstract model of computation, Turing Machines, to give a precise denition of what problems can be solved by a computer. Also famous for being instrumental in the success of British code-breaking eorts during the Second World War.
Administrative Details
Module Overview
Chomsky Hierarchy
Noam Chomsky
Noam Chomsky (1928): American linguist. Introduced Context Free Grammars in an attempt to describe natural languages formally. Introduced the Chomsky Hierarchy which classies grammars and languages, and their descriptive power. Also famous for his political activism.
Administrative Details
Module Overview
Chomsky Hierarchy
Administrative Details
Module Overview
Chomsky Hierarchy
Recommended Reading
Introduction to Automata Theory, Languages, and Computation (3rd edition), pages 15. G52MAL Lecture Notes, pages 25.