Questions tagged [kleene-star]

In computation theory, the kleene star (*) is a regular operation all regular languages are closed under.

In computation theory, the kleene star (*) is a regular operation all regular languages are closed under. The kleene star acts on a language to produce the superset containing the empty string, as well as infinitely many concatenations of the strings in the starred set.

Examples:

  • a* contains the strings: a, aa, aaa, and the empty string
  • (ab)* contains the strings ababababababababab, ab, the empty string, etc.
  • {ab, cd}* contains the empty string, abcd, cdab, cdcd, cdabcdab, etc.

See the wikipedia page for additional details

36 questions
1
vote
0 answers

Best way to implement Kleene star operation in Java

How can I implement the Kleene star operator to determine the Kleene closure up to a specific level?
J. Bug
  • 152
  • 1
  • 10
1
vote
2 answers

Show that two regular expressions are equivalent in Automata Theory without using DFAs

I have been trying to prove that two regex are equivalent. I know that two regex are equivalent if they define the same language. But i am not getting my hands of way to prove it without using DFAs. For example, i have the problem to prove that the…
1
vote
1 answer

Cannot understand Kleene Star paper

I'm reading a paper about programming languages engineering and compilers (6.035 Fall 2005 MIT course). The following page should explain the working principles of the Kleene Star operator, but I cannot understand what it means. The full .pdf can…
Filippo Costa
  • 488
  • 7
  • 25
1
vote
1 answer

Need help about recursive definition for two languages S* and T* where S={aa,b} and T={w1,w2,w3,w4}

I am currently taking a course of Theory of Automata and i came up with following problems. I came up with the answer of 1st one but confused about the statement of 2nd question. (i) Give a recursive definition for the language S* where S = {aa,b}.…
1
vote
1 answer

Kleene Closure in Chomsky Normal Form

Let n be any terminal. Consider the following, presumably correct, representation of the kleene star over n: N → n N | ε (where ε is the empty terminal.) Wikipedia says: Every grammar in Chomsky normal form is context-free, and conversely, every…
thwd
  • 23,956
  • 8
  • 74
  • 108
1
vote
3 answers

I need help finding all strings not included in (a*b)*

I'm doing this for homework. I need to write a regular expression for a language over (a, b) that includes all strings not included in a language (a*b)* for example 'aaaaaaabaaaaaaaabaaaaaaabaaaabaaaaaaaaab' would work. So I'm looking for a regular…
1
vote
1 answer

If a regular language only contains Kleene star, then is it possible that it comes from the concatenation of two non-regular languages?

I want to know that given a regular language L that only contains Kleene star operator (e.g (ab)*), is it possible that L can be generated by the concatenation of two non-regular languages? I try to prove that L can be only generated by the…
ZLW
  • 151
  • 9
0
votes
0 answers

How do the kleene plus operators apply here?

(cd+)+? I have cd+ to {cd, cdd, cddd, ...} but I do not understand how to apply the + from the parenthesis. I saw that if it is like (d*)* then it is same as d* but here its not just d* in it but c without * or + and that is confusing me.
0
votes
1 answer

Order in Kleene star operation?

Every example I had seen with Kleene star operations over languages show the expansion in order so I was wondering, does Kleene star operation requires ordering in the language? For example, given the language L = {a, b} We know L* = {e, a, b, aa,…
cprieto
  • 400
  • 2
  • 14
0
votes
1 answer

Using PCRE2 regex with repeating groups to find email addresses

I need to find all email addresses with an arbitrary number of alphanumeric words, separated through a period. To test the regex, I'm using the website https://regex101.com/. The structure of a valid email addresses is…
JodeNgb
  • 5
  • 2
0
votes
1 answer

A DFA for Kleene star operation

What would be the highest number of states a DFA would have for a language L*? Is it possible to define a worst-case scenario here?
Veronica
  • 69
  • 1
0
votes
1 answer

Regex allow asterisk(*) only once time and in the end

I want to pass only the strings like this: abc* 123* abc 123* abc-123abc* I don't want to pass strings like those: - abc** - abc*123 - *abc The asterisk must be in the end and only once time. With the regex like \* I get all asterisk, but i…
0
votes
0 answers

Implementing Kleene star operator * (sort of) in C program

For any user input string A ,with at least one instance of the star operator *,verify that input string B can be produced by A. For example: go*s can produce the strings goes,goners,goals etc. I can't figure out a way to implement this. I thought i…
0
votes
1 answer

Kleene star semantics and set comparison

Say we have two languages L1 and L2, is the following condition below considered false? (L1L2)* = L1*L2* I'm assuming this because say: Leftside of condition: L1 = {a,b} L2 = {c,d} C = L1.L2 C = {ac,ad,bc,bd} C* = {empty,…
1011 1110
  • 743
  • 2
  • 17
  • 43
0
votes
2 answers

String length after kleen's closure in finite-autometa theory

Note: Not sure if this is the correct site for this question. I found other finite-autometa theory questions here, so posting here. Suppose a language is defined over two letters L1 = { aa , b } We take Kleen closure over it: S1 = aab S2 =…
Waleed
  • 1,097
  • 18
  • 45