4 Replies - 1008 Views - Last Post: 17 September 2013 - 09:17 AM

#1 deprosun   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 307
  • Joined: 16-November 10

Possible Number of Strings?

Posted 17 September 2013 - 07:34 AM

Let Σ be the alphabet {a, b}, let X be the language Σ*a, and let Y be the language bΣ*.
How many strings of length exactly four are in the language XYX?
a. None
b. Sixteen
c. Four
d. Three


My approach:
Since its XYX, and we need exactly 4, X cannot be the length more than 2 because there are two X's and Y has a minimum of length 1. So I am coming to the conclusion that only Y can length two and X's will have length one. So this is my observation:
- X will only be the string "a"
- Y will either be "bb" or "ba". It cannot be more than length 2.

So abba, and abaa are only two strings possible according to me. But I dont have an option for that :P.

What do you guys think?

This post has been edited by deprosun: 17 September 2013 - 07:34 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Possible Number of Strings?

#2 sepp2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2770
  • View blog
  • Posts: 4,429
  • Joined: 21-June 11

Re: Possible Number of Strings?

Posted 17 September 2013 - 07:50 AM

XYX means "a word from the language X, followed by a word from the language Y, followed by a word from the language X". It does not mean that the first word from language X and the second word from language X need to be the same. So something like this would be in the language:

X  Y X
aa b a


This post has been edited by sepp2k: 17 September 2013 - 07:51 AM

Was This Post Helpful? 2
  • +
  • -

#3 deprosun   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 307
  • Joined: 16-November 10

Re: Possible Number of Strings?

Posted 17 September 2013 - 07:52 AM

That makes all the sense! :)
Was This Post Helpful? 0
  • +
  • -

#4 deprosun   User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 307
  • Joined: 16-November 10

Re: Possible Number of Strings?

Posted 17 September 2013 - 07:58 AM

Seems like there are only 4 then:
baba
aaba
abba
abaa

Correct?
Was This Post Helpful? 0
  • +
  • -

#5 sepp2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2770
  • View blog
  • Posts: 4,429
  • Joined: 21-June 11

Re: Possible Number of Strings?

Posted 17 September 2013 - 09:17 AM

Yes, that's correct.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1