{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online