World's most popular travel blog for travel bloggers.

[Solved]: Find strings in L^4

, , No Comments
Problem Detail: 
Let L = {ab,aa,baa}.  

I need to find L^4. From my understanding, I union the set.

So:

L^1 = {ab,aa,baa} L^2 = {abab,abaa,abbaa,aaab,aaaa,aabaa,baaab,baaaa,baabaa} L^3 = {abababab,abababaa,abababba,....} ?? 

I concatenate L^3 with L^2 as I did above correct? And then I concatenate L^4 with L^3?

Asked By : Question_Guy

Answered By : Yuval Filmus

The set $L^4$ consists of all words $xyzw$ where $x,y,z,w \in L$. In our case, there are (at most) $3^4 = 81$ such words, but I don't see why you'd want to write all of them. If you want, you can also compute $L^4$ by squaring $L$ twice: $L^4 = (L^2)^2$. Then there is no need to compute $L^3$.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/30462

3.2K people like this

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback