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

  • Thread starter Astr00
  • Start date
  • Tags
    Language
In summary, the conversation revolves around the inductive definition of a language consisting of strings such as {a, b, aa, bb, aaa, bbb}. The participant proposes a method of defining the language using a set S, where a and b are included in S and if x and y are in S, then xa and yb are also in S. The conversation then discusses whether this method is correct and if it can also be achieved by using the empty string as the base set. The moderator suggests using a notation to represent repeated letters in order to clarify the definition.
  • #1
Astr00
1
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
  • #2
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?
 

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

1. What is an inductively defined language?

An inductively defined language is a type of formal language defined by a set of rules or axioms that describe how the language is constructed. These rules typically involve starting with a set of basic elements and using them to create more complex elements.

2. What are examples of inductively defined languages?

Examples of inductively defined languages include arithmetic expressions, programming languages, and formal grammars for natural languages.

3. How are inductively defined languages different from other formal languages?

Inductively defined languages differ from other formal languages in that their rules allow for an infinite number of well-formed expressions. This is because the rules allow for the recursive construction of increasingly complex expressions.

4. What is the significance of inductively defined languages in computer science?

Inductively defined languages are important in computer science because they provide a formal way of describing and analyzing programming languages and other formal systems. They also serve as the basis for many computer science concepts, such as recursion and formal proof methods.

5. Can inductively defined languages be used to describe natural languages?

While inductively defined languages are commonly used to describe programming languages and other formal systems, they are not as well-suited for describing natural languages. This is because natural languages are often more complex and irregular, making them difficult to define with a finite set of rules.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
972
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
838
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Replies
2
Views
377
  • Calculus and Beyond Homework Help
Replies
3
Views
553
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
736
Back
Top