1

Given the alphabet {def ghi}, give a recursive definition for the language whose words contain the string defdef.

My solution is:

i) def ∈ L and ghi ∈ L

ii) if u = def and w ∈ L*, then so is uu, wuu, uuw, wwuu, uuww, wuuw

My question is that I feel like I need to keep adding parts to L* or do I stop at wuuw ?

  • is def a single 'letter' in the alphabet? – Nils Ziehn Jan 11 '14 at 19:34
  • Why should $ghi \in L$ ? Why should $def \in L$ Neither contain defdef? – Nils Ziehn Jan 11 '14 at 19:36
  • def, and ghi are single letters...I put that they are in L, which is the alphabet....I thought if I didn't include it in L* it would be okay – user120161 Jan 11 '14 at 19:43
  • No, that is not okay: Every word that you specify in your rules has to fulfill the rule of the language. Both words in i) don't fulfill the rule that they have to contain 'defdef'. – Nils Ziehn Jan 11 '14 at 19:45
  • and also you should not talk about L. This does not really make sense here and given your last question you are not supposed to use the operator anyways! – Nils Ziehn Jan 11 '14 at 19:46

1 Answers1

0

A little introduction in 'How to solve these types of questions': Your first rule should contain the simplest words in the language that can be used as a root to construct all the other words. In the question given this is 'defdef'. 'defdef' is the minimal word that fulfills the constraint: "word w has to contain 'defdef' ".

Afterwards you try to build every other possible word from the words you chose for Rule i).

If it is not possible to contruct every other word from Rule i) then you have to add more roots to Rule i). For an example of this review my answer to your last question.

Rule i) $$defdef \in L$$

Rule ii) $$ w\in L \Rightarrow defw \in L \land wdef \in L \land ghiw \in L \land wghi \in L $$

  • Ok, I believe it is starting to make sense finally...I have to start with the base case of the language which is defdef...and I go from there. Thank you once again for the help!! – user120161 Jan 11 '14 at 19:48
  • just edited my answer to give more explanations – Nils Ziehn Jan 11 '14 at 19:49
  • so if this language was to include all words that omit defdef, then I could say – user120161 Jan 11 '14 at 19:56
  • That one is more complicated, you can open another question for that, it is very unreadable to discuss this in the comments ;) And you should also change the alphabet from {def,ghi} to {a,b} for simplicity reasons ( doesn't actually change anything about the problem! ) – Nils Ziehn Jan 11 '14 at 20:03