MIT6_042JS10_lec07_prob - Massachusetts Institute of...

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

View Full Document Right Arrow Icon
Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science February 19 Prof. Albert R. Meyer revised February 19, 2010, 1407 minutes In-Class Problems Week 3, Fri. Problem 1. Let’s refer to a programming procedure (written in your favorite programming language —C++, or Java, or Python, . . . ) as a string procedure when it is applicable to data of type string and only returns values of type boolean . When a string procedure, P , applied to a string , s , returns True , we’ll say that P recognizes s . If R is the set of strings that P recognizes, we’ll call P a recognizer for R . (a) Describe how a recognizer would work for the set of strings containing only lower case Ro- man letter — a,b,. ..,z —such that each letter occurs twice in a row. For example, aaccaabbzz , is such a string, but abb , 00bb , AAbb , and a are not. (Even better, actually write a recognizer pro- cedure in your favorite programming language). A set of string s is called recognizable if there is a recognizer procedure for it. When you actually program a procedure, you have to type the program text into a computer system. This means that every procedure is described by some string of typed characters. If a string , s , is actually the typed description of some string procedure, let’s refer to that procedure
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 05/27/2011 for the course CS 6.042J taught by Professor Prof.albertr.meyer during the Spring '11 term at MIT.

Page1 / 4

MIT6_042JS10_lec07_prob - Massachusetts Institute of...

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