The set of all strings over the alphabet S = {a, b} (including
e) is denoted by
a. (a + b)*
b. (a + b)+
c. a+b+
d. a*b*
The set of all strings over the alphabet S = {a, b} (including e) is denoted...
(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...
Construct an DFA automaton that recognizes the following language of strings over the alphabet {a,b}: the set of all strings over alphabet {a,b} that contain aa, but do not contain aba.
Let Hn denote the set of strings over the alphabet {A, B, C} with no two consecutive letters the same. Let hn = |Hn|. Determine H1, H2, H3, and then find a recurrence for hn. Solve the recurrence relation you found.
Problem 3 a) How many strings are there of length 10 over the alphabet (a, b) with exactly five a's? b) How many strings are there of length 10 over the alphabet (a, b, c) with exactly five a's?
Construct regular expressions for the following languages over the alphabet {a, b}: a. Strings that do not begin with an “a”. b. Strings that contain both aa and bb as substrings.
2. 9 marks] Strings. Consider the following definitions on strings Let U be the set of all strings Let s be a string. The length or size of a string, denoted Is, is the number of characters in s Let s be a string, and i e N such that 0 < ί < sl. We write s[i] to represent the character of s at index i, where indexing starts at 0 (so s 0] is the first character, and...
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)...
Exercise 3.1.1: Write regular expressions for the following languages: * a) The set of strings over alphabet {a,b,c} containing at least one a and at least one b. b) The set of strings of O's and l’s whose tenth symbol from the right end is
3) Construct a regular expression defining each of the following languages over the alphabet {a, b}. (a) L = {aab, ba, bb, baab}; (b) The language of all strings containing exactly two b's. (c) The language of all strings containing at least one a and at least one b. (d) The language of all strings that do not end with ba. (e) The language of all strings that do not containing the substring bb. (f) The language of all strings...
2. 9 marks] Strings. Consider the following definitions on strings Let U be the set of all strings. Let s be a string. The length or size of a string, denoted Is, is the number of characters in s Let s be a string, and ie N such that 0 Si< Is. We write si] to represent the character of s at index i, where indexing starts at 0 (so s(0 is the first character, and s|s -1 is the...