((0| ε) 1)* write strings whose length is less than 2 (or) length 2

ε 1 01 11
These 4 strings are of given expression with length less than 2 (or) length 2
Write down the regular expressions for the following set of strings over {a, b}: 1.Strings that contain no more than one occurrence of the string aa. 2.All strings containing aba: 3.All strings of odd length 4.A string in this language must have at least two a's. 5.All strings that begin with a, and have an even number of b Bonus - All strings with “a” at every odd position
Give a DFA which will accept all strings of length 3n; n =0, 1. 2. ,,, over ∑ = {a.b}*
Submit a DFA whose language is the set of strings over {a, b} of odd length in which every symbol is the same.
in java!! Write a method to check prefix of two strings that have more than 3 characters. A 3-char prefix of a word “class” will be “cla”. The method should take two strings as parameters, then compare 3-char prefix of two strings. Write a method to check suffix of two strings that have more than 3 characters. A 3-char suffix of a word “world” will be “rld”. The method should take two strings as parameters, then compare 3-char suffix of...
Let A be the set of all bit strings of length 10. 1. How many bit strings of length 10 are there? How many bit strings of length 10 begin with 1101? How many bit strings of length 10 have exactly six 0's? How many bit strings of length 10 have equal numbers of O's and 1's? How many bit strings of length 10 have more O's than 1's? a. b. c. d. e.
1) positive, greater than 0
OR negative, less than 0
2) positive, greater than 0 OR negative, less
than 0
3) positive, greater than 0 OR negative, less
than 0
4) positive, greater than 0 OR negative, less
than 0
5) smaller, larger, smaller or larger depending on temp.
FOLLOW-UP PROBLEM 20.7 Determining the Effect of Temperature on AG A reaction is nonspontaneous at room temperature but is spontaneous at 500°C. What can you say about the signs and...
Write a context-free grammar for the language where all strings are of even length and the first half of the string is all 0’s, but it must be an odd number of 0’s
Discrete mathematics
2) Let be eumber of ternary strings (of 0s, 1s and 2s) of length n that have no adjacent even digits. For example, so (the empty string), s3 (the strings 0, 1 and 2), while s2 5: 01, 0, 12, 2 because the strings 00,02, 20, 22 are not allowed, as they have adjacent even digits. As another example, the string 10112 is allowed, while the strings 10012 and 120121 are not allowed (a) Find #3; (b) find...
Construct context-free grammars that generate the given set of
strings. If the grammar has more than one variable, we will ask to
write a sentence describing what sets of strings expect each
variable in the grammar to generate. For example, if the grammar
was:
I could say "C generates binary strings of length one, E
generates (non-empty) even length binary strings, and O generates
odd length binary strings." It is also fine to use a regular
expression, rather than English,...
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)...