Two computational theory language questions - multi choice

Click For Summary

Discussion Overview

The discussion revolves around two computational theory language questions related to set languages and generators. The first question asks for a set that produces the same number of 8-letter and 4-letter words, while the second question involves identifying a suitable generator for a language defined by specific constraints.

Discussion Character

  • Homework-related
  • Debate/contested
  • Technical explanation

Main Points Raised

  • Some participants analyze the first question, suggesting that choice 1 produces 4 eight-letter words and only 2 four-letter words, while questioning the validity of choice 2 due to the length of the string bbbbbb.
  • Others propose that choices 3 and 4 can be eliminated based on their inability to generate the required number of words.
  • In the second question, some participants argue that all provided strings generate words containing the forbidden substring, except for option 3, which generates only the word ba.
  • One participant raises the point that strings like bbaa and bbbaaa could also be considered members of the language in question, prompting further discussion on the definition of a generator.
  • There is confusion regarding the term "generator," with some participants suggesting that it typically refers to a grammar or production rules rather than a single string.
  • Participants express uncertainty about the vagueness of both questions and the implications of the definitions provided.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the answers to the questions. There are multiple competing views regarding the validity of the choices in both questions, and the discussion remains unresolved.

Contextual Notes

Some participants note that the questions may be vague, particularly regarding the definition of a generator and the constraints on the words that can be formed from the given sets.

Lord Anoobis
Messages
131
Reaction score
22

Homework Statement


##1)## Which one of the following is an example of a set ##S## such that the language ##S^*## has the same number of 8-letter words as 4-letter words?
1) ##S = \{aaaa \quad bbbb\}##
2) ##S = \{bbbb \quad bbbbbb\}##
3) ##S = \{aa \quad bb\}##
4) ##S = \{a \quad bbbb\}##

##2)## Consider the language NOTABandEVEN over ##\{a \quad b\}## consisting of all words of even length that do not contain the substring ##ab##. Which one of the following is a suitable generator?
1) ##baa##
2) ##bbbaab##
3) ##ba##
4) ##babb##

Homework Equations


None.

The Attempt at a Solution


In the first question we can easily eliminate 3 and 4. 1 has two possibilities for both four-letter and eight-letter words. 2 has one possibility for each, so we have two correct answers. Or have I overlooked something?

In the second question all of the given strings result in words containing the forbidden substring. The only possibility I see is option 3 with the only word generated being ##ba##, so the language in question consists of only one word. Correct?
 
Physics news on Phys.org
For question 1, choice 1, I get 4 8-letter words, and only 2 4-letter words.

It's not clear what is meant by generator in question 2. Generally a language is generated by a grammar, or a set of production rules. The meaning here seems to be like a generator for a group: ab, generates {∅, ab, abab, abababab, ...}. The problems is that any string with one or more a 's and one or more b's in it will fail, and you won't generate the entire language anyway. something like this is needed:
S→BA
A→aA
B→bB
A→∅
B→∅
∅ is the empty string
 
jedishrfu said:
Wouldn't bbaa and bbbaaa ... be members too for question #2?

For question #1, choice 2 says bbbb or bbbbbb so doesn't the bbbbbb exclude it as well since bbbbbb is 6 characters in length?
The question seems to limit one to words resulting from concatenating the given strings so I assume ##bbaa## and ##bbbaaa## do not qualify. Quite frankly I feel both questions are a bit vague.
 
willem2 said:
For question 1, choice 1, I get 4 8-letter words, and only 2 4-letter words.
Okay, I can see that now. I neglected the possibilities of all ##a## and all ##b##. As for the term "generator" in question 2, I agree that it is far from clear and one has to assume what it requires.
 
Thanks for the input.
 

Similar threads

Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 44 ·
2
Replies
44
Views
6K
  • · Replies 40 ·
2
Replies
40
Views
9K
Replies
23
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 12 ·
Replies
12
Views
5K