1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Inductively define language a, b, aa, bb, aaa, bbb, ...

  1. Sep 24, 2015 #1
    [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:
    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:
    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: Sep 24, 2015
  2. jcsd
  3. Sep 24, 2015 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted