Inductively define language a, b, aa, bb, aaa, bbb, ....

  • Thread starter Thread starter Astr00
  • Start date Start date
  • Tags Tags
    Language
AI Thread Summary
The discussion focuses on inductively defining a language consisting of strings formed by the letters 'a' and 'b', specifically {a, b, aa, bb, aaa, bbb, ...}. The initial proposal suggests starting with 'a' and 'b' in the set S and adding strings by concatenating 'a' to strings of 'a's and 'b' to strings of 'b's. However, it is pointed out that this method would inadvertently include strings like 'ab' and 'ba', which are not part of the intended language. An alternative approach using the empty string as a base is proposed, but it also requires careful definition to avoid including unwanted combinations. The discussion emphasizes the need for precise criteria to ensure the correct language is defined.
Astr00
Messages
1
Reaction score
0
[Thread moved by mentor]

Hi there.

As the title says, I want to inductively define the language consisting of the strings {a, b, aa, bb, aaa, bbb} and so on. I have come up with the following:
Let S be the smallest set so that a, b ∈ S and if x, y ∈ S, then xa, yb ∈ S.
Is this a correct method of inductively definining such a language, and am I defining the language that I set out to do?
If it is, could I also accomplish the same with just the empty string as my base set?
An example of that would be:
Let S be the smallest set so that Λ ∈ S and if x, y ∈ S, then xa, yb ∈ S.
In this case I think Λ would act as both the x and y, which would turn into Λa, Λb or just a, b in the next step. But is this a correct way of doing it?

Edit: I should have read the rules before posting. Could a moderator move this to the homework forum?
 
Last edited by a moderator:
Physics news on Phys.org
The set you have defined would include ba and ab, so is larger than your target set. You need to make the second part of your criterion ensure that an a can only be added to a string of 'a's, and likewise for 'b's.

It will help to have a notation to refer to a string of repeated letters. Why not use ##x^n## (or x^n if you don't know latex) to denote the letter denoted by x, repeated n times?
 
Back
Top