Question

1. All questions assume the alphabet Σ = { a , b }. a) List the...

1. All questions assume the alphabet Σ = { a , b }.

a) List the first 10 strings in canonical order of the language in question b above (even number of a's or odd number of b's, where the a's and b's can occur in any order).

b) List the first 10 strings in canonical order of the language in question c above (ambn).

Homework Answers

Answer #1

Note: only one (first one) question can be answered.

Solution:

Canonical Order - In canonical ordering of strings, the strings are grouped according to the length, all such groups are ordered in increasing length, and all such strings in the group are ordered in a lexicographic way based on the alphabets used.

= {a, b}

Part a) - Even number of a's or odd nnumber of b's - {, b, ab, ba, aab, aba, baa, bbb, aaaa, aaab}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1.1). The alphabet is {a, b}. Give the state diagram of the DFA recognizing the language:...
1.1). The alphabet is {a, b}. Give the state diagram of the DFA recognizing the language: {w | w has an odd number of a’s and at least two b's}. Show the steps! 1.2). Give the state diagram of the DFA which recognizes the complement of the above language in 1.1. Use 1.1 to answer 1.2 **I ONLY NEED HELP WITH 1.2* PLEASE*
1.2 Which of the following statements is wrong?        a). A set is a subset of itself...
1.2 Which of the following statements is wrong?        a). A set is a subset of itself        b). Emptyset is a subset of any set        c). A set is a subset of its powerset        d). The cardinality of emptyset is 0 1.3. Which of the following statements is correct?        a). A string is a set of symbols from an alphabet        b). The length of the concatenation of two strings can           be the same as one of them        c). The length of...
Design a DFA accepting the language of all strings over Σ = {0, 1} with the...
Design a DFA accepting the language of all strings over Σ = {0, 1} with the property that the number of 0s and the number of 1s in a string are both odd.
Find a regular expression to describe: The set of all strings over the alphabet {a, b,...
Find a regular expression to describe: The set of all strings over the alphabet {a, b, c, d} that contain exactly one a and exactly one b So, for example, the following strings are in this language: ab, ba, cccbad, acbd, cabddddd, ddbdddacccc and the following strings are NOT in this language: a, ccbc, acbcaaacba, acacac, bcbbbbbca, aca, c, d, b
Question 2 a) Construct a Pushdown Automaton (PDA) for the language L (M) = {a, b}*...
Question 2 a) Construct a Pushdown Automaton (PDA) for the language L (M) = {a, b}* where, if there are any a’s must precede all b's and the number of b's must be equal to or twice the number of a’s. a) Trace the computations for the strings aabb, bbb, and abb in the PDA obtained in Question 2
Σ = { a, b, c } Create deterministic finite automata with the language of all...
Σ = { a, b, c } Create deterministic finite automata with the language of all strings that … end with 'abc'
using dr.racket programing language If we write a function that tests whether a list contains only...
using dr.racket programing language If we write a function that tests whether a list contains only strings, odd numbers, or even numbers, you will notice that the code that iterates through the list stays the same, with the only change being the predicate function that checks for the desired list element. If we were to write a new function for each of the tests listed above, it would be more error-prone and an example of bad abstraction. We could write...
Problem 5 Regular Expressions. a) Define a regular expression for all strings of odd length, over...
Problem 5 Regular Expressions. a) Define a regular expression for all strings of odd length, over the alphabet of {0}. b) Define a regular expression for identifiers over the alphabet of {A,B,C,a,b,c,0,1,2,3,4,5,6,7,8,9}, such that an identifier must begin with an alphabetic character and must contain at least one numeric character. c) Try to modify the definition above so that identifiers still begin with an alphabetic character, but after that, it must contain at least one numeric, at least one lower-case...
Given an alphabet Σ = {a, b, c, d} Use Lecture definition to construct a nondeterministic...
Given an alphabet Σ = {a, b, c, d} Use Lecture definition to construct a nondeterministic automaton M such that L = {w ∈ Σ ∗ : at least one letter from Σ is missing in w} 1. (5pts) Draw the diagram Just draw the diagram, do not list the components 2. (2pts) Explain shortly why your M is nondeterministic and why it is correct 3. (3pts) Show that (s, accabb) `M ∗ (q, e) by constructing a computation of...
Consider permutations of the 26-character lowercase alphabet Σ={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}. In how many of these permutations do a,b,c...
Consider permutations of the 26-character lowercase alphabet Σ={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}. In how many of these permutations do a,b,c occur consecutively and in that order? In how many of these permutations does a appear before b and b appear before c?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT