0% found this document useful (0 votes)
26 views

Assignment 1

This document contains instructions for Course 2BA1 Assignment III at Hilary Term 2008. Students are asked to complete three tasks analyzing formal languages and grammars: (1) describe the context-free language generated by a grammar over {0,1}, (2) devise a regular grammar generating strings of 1 followed by a positive multiple of 4 zeros, and (3) specify a finite state acceptor for the language in part (2). Students are instructed to include their name and student number on any work submitted by February 13, 2008.

Uploaded by

aryanto
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Assignment 1

This document contains instructions for Course 2BA1 Assignment III at Hilary Term 2008. Students are asked to complete three tasks analyzing formal languages and grammars: (1) describe the context-free language generated by a grammar over {0,1}, (2) devise a regular grammar generating strings of 1 followed by a positive multiple of 4 zeros, and (3) specify a finite state acceptor for the language in part (2). Students are instructed to include their name and student number on any work submitted by February 13, 2008.

Uploaded by

aryanto
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Course 2BA1: Hilary Term 2008.

Assignment III.
To be handed in by Wednesday 13th February, 2008.
Please include both name and student number on any work
handed in.

1. (a) Describe the formal language over the alphabet {0, 1} generated by
the context-free grammar whose only non-terminal is hSi, whose start
symbol is hSi and whose productions are the following:

hSi → 0
hSi → 1hSi1

(i.e., describe the structure of the binary strings generated by the gram-
mar). Is this context-free grammar a regular grammar?

(b) Devise a regular grammar to generate the language over the alpha-
bet {0, 1} whose words consist of a single 1, followed a string of 0’s,
where the number of such 0’s is strictly positive and is a multiple of 4.

(c) Give the specification of a finite state acceptor that accepts the
language specified in (b). (In particular you should specify the set of
states, the starting state, the finishing states, and the transition table
that determines the transition function of the finite state acceptor.)

You might also like