1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ANEK [815]
3 years ago
9

List the first 11 elements of S = {aba, ba}∗ in canonical order. (Note: the alphabet here is {a, b}, but the set S is being oper

ated upon by the Kleene star. Remember to alphabetize each group of equal-length strings according to the alphabet [i.e., dictionary order]. )
Computers and Technology
1 answer:
Doss [256]3 years ago
4 0

Answer:

\epsilon, ba, aba, baba, ababa, baaba, abaaba, bababa, abababa, baababa, babaaba

Explanation:

S=\{aba, ba\}^* is just the set of ALL strings that can be constructed through concatenation of the 2 strings "aba" and "ba" and the empty word (usually denoted as \epsilon).

Listing the first 11 elements of S is just listing the first 11 strings we can construct through concatenation of the strings "aba" and "ba". Canonical order is listing them alphabetically (dictionary order).

Strings of length 0: \epsilon (the empty word)

Strings of length 1: We clearly cannot construct a string of length 1 using the strings "aba" and "ba".

Strings of length 2: ba

Strings of length 3: aba

Strings of length 4: baba (we concatenate 2 times the string "ba")

Strings of length 5: ababa, baaba (notice the first one is just aba+ba, and the second one is ba+aba, we put the one starting with an a first)

Strings of length 6: abaaba, bababa (notice the first one is just aba+aba, and the second one is ba+ba+ba)

Strings of length 7: abababa, baababa, babaaba (notice the first one is just aba+ba+ba, the second one is ba+aba+ba, and the third one is ba+ba+aba)

So our first 11 strings in alphabetical order are:

\epsilon, ba, aba, baba, ababa, baaba, abaaba, bababa, abababa, baababa, babaaba

You might be interested in
Write a program that prompts the user to enter two characters and display the corresponding major and year status. The first cha
nydimaria [60]

Answer:

  1. import java.util.Scanner;  
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Please enter two characters: ");
  6.        String inputStr = input.nextLine();
  7.        if(inputStr.charAt(0) == 'B' || inputStr.charAt(0) == 'b'){
  8.            System.out.println("Biology");
  9.        }
  10.        else if(inputStr.charAt(0) == 'C' || inputStr.charAt(0)== 'c'){
  11.            System.out.println("Computer Science");
  12.        }
  13.        else if(inputStr.charAt(0) == 'I' || inputStr.charAt(0) == 'i')
  14.        {
  15.            System.out.println("Information Technology and Systems");
  16.        }
  17.        else{
  18.            System.out.println("Invalid major");
  19.        }
  20.        int num = Character.getNumericValue(inputStr.charAt(1));
  21.        if(num >= 1 && num <= 4){
  22.            switch (num){
  23.                case 1:
  24.                    System.out.println("freshman");
  25.                    break;
  26.                case 2:
  27.                    System.out.println("sophomore");
  28.                    break;
  29.                case 3:
  30.                    System.out.println("junior");
  31.                    break;
  32.                case 4:
  33.                    System.out.println("senior");
  34.                    break;
  35.            }
  36.        }
  37.        else{
  38.            System.out.println("Invalid year status");
  39.        }
  40.    }
  41. }

Explanation:

The code consists of two main parts. The part 1 is to validate the input major and print out the major according to the input character (Line 10 -22). If the input character is not matched with the target letters, a message invalid major will be displayed.

The part 2 is to validate the year status to make sure it only fall within the range of 1-4  (Line 26 -45). If within the range, the program will display the year major accordingly. If not a message invalid year status will be displayed.

4 0
4 years ago
Help me with the question please..​
PIT_PIT [208]

First addition, then division

4 0
3 years ago
What was the first Apple computer, and who was it designed by?
DerKrebs [107]

Answer: The first Apple Computer was Apple 1. The designer was Steve Wozniak.

Explanation: Steve Wozniak and Steve Jobs both created Apple 1. Mainly, Steve Wozniak designed it.

Hope this helps!

7 0
3 years ago
Read 2 more answers
Sharon is a network engineer for your firm and is investigating the WAN connection into the hot site. In the event of operations
lisabon 2012 [21]

Answer:

The correct answer to the following question will be "Peak capacity" and "Bandwidth starvation".

Explanation:

Peak capacity has been used to characterize the gradient aqueous phase separation efficiency or performance. It represents the overall conceptual number of operations or components which can be isolated consistently with something like a given set of analytical circumstances and column with

⇒ Rs =1 (Figure 1 and Equation 1)

Certain traffic competing at its policies for the available or unused bandwidth will theoretically enable classes with lower value rates to starve to bandwidth.

Due to these activities, Sharon is concerned about "Bandwidth starvation" and "Peak capacity".

8 0
4 years ago
Use an ifstream object named indata to read the first three integers from a file called lottowins and write each number to stand
Gemiola [76]

Answer:

int x;

indata.open("lottowins");

indata >> x;

cout << x << endl;

indata >> x;

cout << x << endl;

indata >> x;

cout << x << endl;

indata.close();

4 0
3 years ago
Other questions:
  • Which rock band apologized for automatically adding its new album to every iPhone 6 in 2014
    8·2 answers
  • Write the pseudocode for linear search, which scans through the sequence, looking for ν. Using a loop invariant, prove that your
    14·1 answer
  • Karen has opened a new business and is using Google Display Ads to build awareness of her new products. How does Google Display
    6·1 answer
  • Which of the following is not something that consumers need to pay attention to order to make rational choices
    6·2 answers
  • What is the purpose of a primary key?
    5·1 answer
  • Imagine a network with two routers that are connected with a point-to-point HDLC serial link. Each router has an Ethernet, with
    9·1 answer
  • Python3
    7·1 answer
  • Consider the following code snippet:
    13·1 answer
  • How do you customize calendar view​
    9·2 answers
  • Write an alogrithm to display the first ten even numbers​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!