HM6-TransducersReview-Answers - CS 341 Automata Theory...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 341 Automata Theory Elaine Rich Homework 6 Due: Thursday, February 22, 2007 This assignment covers Sections 5.10-5.13 and a review of regular languages. 1) Consider the problem of counting the number of words in a text file that may contain letters plus any of the following characters: < blank > < linefeed > < end-of-file > , . ; : ? ! Define a word to be a string of letters that is preceded by either the beginning of the file or some non-letter character and that is followed by some non-letter character. For example, there are 11 words in the following text: The < blank > < blank > cat < blank > < linefeed > saw < blank > the < blank > < blank > < blank > rat < linefeed > < blank > with < linefeed > a < blank > hat < linefeed > on < blank > the < blank > < blank > mat < end-of-file > Describe a very simple finite-state transducer that reads the characters in the file one at a time and solves the word-counting problem. Assume that there exists an output symbol with the property that, every time it is generated, an external counter gets incremented. We’ll let the input alphabet include the symbols: L (for a letter), N (for a nonletter), and E (for end-of-file). The output alphabet will contain just a single symbol A (for add one to the counter). We don’t need any accepting states. Let
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/03/2009 for the course CS 341 taught by Professor Rich during the Fall '08 term at University of Texas at Austin.

Page1 / 3

HM6-TransducersReview-Answers - CS 341 Automata Theory...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online