(a) Consider the alphabet Σ = {a, b, c}. Give a recursive definition for the set of strings over Σ that contain exactly one c.
(b) Give a recursive definition for the set S = {x | x ∈ Z≥0 and b x 4 c is even}
(a) Language is S
Recursive definition
c belongs to S
aS, bS, Sa and Sb belongs to S
Explanation
At the end c must come at any place
(b) Language is S
0, 1, 2, 3 belongs to S
4 + S belongs to S
Explanation
0 1 2 3 -> floor(x / 4) = 0 even <-- Base case
4 5 6 7 -> floor(x / 4) = 1 odd
8 9 10 11 -> floor(x / 4) = 2 even <-- Add 4 each time
and so on
(a) Consider the alphabet Σ = {a, b, c}. Give a recursive definition for the set...
Let Σ = {0, 1). (a) Give a recursive definition of Σ., the set of strings from the alphabet Σ. (b) Prove that for every n E N there are 2" strings of length n in '. (c) Give a recursive definition of I(s), the length of a string s E Σ For a bitstring s, let O(s) and I(s) be number of zeroes and ones, respectively, that occur in s. So for example if s = 01001, then 0(s)...
This is discrete
mathematics.
1. 5 points] Let T be the set of strings whose alphabet is 10, 1,2,3) such that, in every element of T a. Every 1 is followed immediately by exactly one 0. b. Every 2 is followed immediately by exactly two 0s. c. Every 3 is followed immediately by exactly three 0s. For instance, 00103000 E T.) Find a recursive definition for T
1. 5 points] Let T be the set of strings whose alphabet is...
Automata Question. Over the alphabet Σ = {0, 1}: 1) Give a DFA, M1, that accepts a Language L1 = {all strings that contain 00} 2) Give a DFA, M2, that accepts a Language L2 = {all strings that end with 01} 3) Give acceptor for L1 intersection L2 4) Give acceptor for L1 - L2
Assume that Σ = {0,1,2,9}. Consider the language L = {00,11,22,99,0000,1111,2222,9999,000000,111111,222222,777777,...}. Give a recursive definition of L.
1. (a) Give state diagrams of DFA’s recognizing the following languages. That alphabet is Σ = {a,b} L1 = {w | w any string that does not contain the substring aab} L2 = {w | w ∈ A where A = Σ*− {a, aa, b}} 2. (a) Give state diagrams of DFA’s recognizing the following languages. The alphabet is {0, 1}. L3 = {w | w begins with 0 ends with 1} (b) Write the formal definition of the DFA...
Give a DFA for the following language over the alphabet Σ = {0, 1}: L={ w | w starts with 0 and has odd length, or starts with 1 and has even length }. E.g., strings 0010100, 111010 are in L, while 0100 and 11110 are not in L.
9. Consider the set A 2 kEN) ,2,4, 8, 16,...) a. Give a recursive definition of the set A. Be sure to clearly indicate which part of the definition is the basis and which is the recursion b. Use your definition to show that A is closed with respect to multiplication
9. Consider the set A 2 kEN) ,2,4, 8, 16,...) a. Give a recursive definition of the set A. Be sure to clearly indicate which part of the definition...
(5) Describe the strings in the set S of strings over the alphabet Σ = a, b, c defined recursively by (1) c E S and (2) if x є S then za E S and zb є S and cr є S. Hint: Your description should be a sentence that provides an euasy test to check if a given string is in the set or not. An example of such a description is: S consists of all strings of...
Find a regular expression for the following language over the alphabet Σ = {a,b}. L = {strings that begin and end with a and contain bb}.
(3) Consider the following three languages over the alphabet Σ default i,j, k, are non-negative integers (can be 0): (a,b,c,d), where by One of these is not a CFL; the other two are CFLs. Give context-free grammars for the two that are CFLs, and a CFL Pumping Lemma proof for the one that is not a CFL. (You need not prove your grammars correct, but their plan should be clear. (6+6+18 30 pts., for 74 total on the set)
(3)...