We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,886 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Star operation and grammer

Prove that L = {a^n: n is a prime number} is not regular

I was looking through the solution to it but dont understand it at all, could anyone help explain how to solve it?

Thanks

2
Contributors
1
Reply
4 Hours
Discussion Span
2 Years Ago
Last Updated
2
Views
philmetz
Light Poster
30 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Hi, i hope u understand it with this proof:
•  Let n be the pumping lemma value and let k be a prime
greater than n.
•  If L is regular, the Pumping Lemma implies that a^k can be decomposed into
xyz, |y| > 0, such that xy^iz is in L for all i ≥ 0.
•  Assume such a decomposition exists.
•  The length of w = xy^k+1z must be a prime if w is in L. But

length(xyk+1z) = length(xyzyk)
= length(xyz) + length(yk)
= k + k(length(y)
= k (1 + length(y))
•  The length of xy^k+1z is therefore not prime, since it is the
product of two numbers other than 1. So xy^k+1z is not in L.
•  Contradiction!

agugglez
Newbie Poster
23 posts since Apr 2010
Reputation Points: 10
Solved Threads: 2
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.2991 seconds using 2.67MB