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

  • Thread starter Thread starter Astr00
  • Start date Start date
  • Tags Tags
    Language
Click For Summary
SUMMARY

The discussion focuses on inductively defining a language consisting of strings formed by the characters 'a' and 'b', specifically the set {a, b, aa, bb, aaa, bbb}. The proposed method involves defining a set S where a, b ∈ S and if x, y ∈ S, then xa, yb ∈ S. However, it is clarified that this method incorrectly includes additional strings like 'ab' and 'ba', which are not part of the target set. A correct approach requires ensuring that 'a' can only be added to strings of 'a's and 'b' can only be added to strings of 'b's, potentially using notation such as x^n to denote repeated characters.

PREREQUISITES
  • Understanding of formal language theory
  • Familiarity with inductive definitions
  • Basic knowledge of set theory
  • Notation for repeated characters in formal languages
NEXT STEPS
  • Research formal language definitions and properties
  • Learn about inductive definitions in computer science
  • Explore the concept of regular languages and their representations
  • Study notation for strings and sequences in formal languages
USEFUL FOR

This discussion is beneficial for students of computer science, particularly those studying formal languages, linguistics, and automata theory, as well as educators looking to clarify inductive definitions in language theory.

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?
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K