Yes, you can use a DFA to prove that trunc is regular.

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views
twoski
Messages
177
Reaction score
2

Homework Statement



Let truncn(L) = {w: wv exists in L, |v| = n}

Show that trunc is regular if L is regular.

The Attempt at a Solution



By the definition of regular languages, L is regular if we can come up with a regular expression or a DFA for it.

This question confuses me because what if we have a regular language L where the only string it produces is "aaa", and we take trunc8(L)? The string v can't exist if the length of wv is 3, but in this case we technically can since there are no constraints on n.
 
Physics news on Phys.org
Anyone?

I think that the constraints of truncn(L) prohibit us from choosing n larger than |wv| so ignore that part of my initial post.

Can i use a DFA to prove trunc is regualr?