home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.theory
- Path: sparky!uunet!secapl!Cookie!frank
- From: frank@Cookie.secapl.com (Frank Adams)
- Subject: Re: cute problem regarding finite automata
- Message-ID: <1992Sep09.171425.59846@Cookie.secapl.com>
- Date: Wed, 09 Sep 1992 17:14:25 GMT
- References: <40853@gremlin.nrtc.northrop.com>
- Organization: Security APL, Inc.
- Lines: 17
-
- In article <40853@gremlin.nrtc.northrop.com> johnson@nrtc.northrop.com writes:
- >Define a rotation of a string A as follows: divide A into substrings A1 and
- >A2 such that A1 A2 equals A; A2 A1 is a rotation of A.
- >
- >Now let L be a regular language, and let Rotate(L) be the language consisting
- >of all rotations of strings from L. Is Rotate(L) regular? Give proof
- >or counter-example.
-
- Yes. Outline of the proof:
-
- Each state of the new machine is a set of possible tuples; each tuple is an
- initial state (of the machine M for L), a current state, and a flag
- indicating whether end of string has been found. The initial states are
- <S,S,no> for each state S of M. The accepting states are those containing a
- tuple <S,T,no> where S is the initial state of M and T an accepting state,
- or a tuple <S, S, yes> for any state S of M. I will not spell out the
- transformations, but they are straightforward.
-