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

Click For Summary
To prove that trunc is regular when L is regular, one can use the definition of regular languages, which allows for the construction of a DFA or regular expression. The confusion arises when considering edge cases, such as a regular language that only produces a single string like "aaa" and how trunc8(L) would function in that context. It is clarified that the constraints of truncn(L) limit n to be no larger than the length of wv. Ultimately, a DFA can indeed be utilized to demonstrate that trunc is regular.
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?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 9 ·
Replies
9
Views
8K