Create DFA :
a)L={w| w is a word that begins with 1 or 2,finishes with 2 or 3
and the number of the other symbols is even}
alphabet={1,2,3}.
b)L={w| w is a word that represents an integer in a binary form and
when is divided by 4 the remaining is 3 (number&4=3)}
alphabet={0,1}
c)L={w| w is a word where every a is followed either from an odd
number of b or from an odd number of c} alphabet={a,b,c}
d)L={w| w is a word that contains the string bbb at least three
times}

Explanation: A - B has 1 and 2 only since it has to start with 1/2
B - F has 2, 3 only since it should end with 2/3 only
There are two loops since there should be even number of symbols in between

0, 1, 2 and 3 are remainders when the binary number is divided by 4
3 is the final state since we wanted 3 as the remainder
Please post another two in a separate
post.
Create DFA : a)L={w| w is a word that begins with 1 or 2,finishes with 2...
Question 1: Design a DFA with at most 5 states for the language L1 = {w ∈ {0, 1}∗ | w contains at most one 1 and |w| is odd}. Provide a state diagram for your DFA. Approaching the Solution --since we haven’t really practiced this type of assignment (i.e. had to define our machine based on only having the language given; not the formal 5 tuples), I am providing the steps for how to work through this; you are...
Give a regular expression for these languages i) {w| w is a word of the alphabet = {0,1} that represents an integer in a binary form that is a multiple of 4} ii) {w belongs to {0,1,2}* | w contains the string ab exactly 2 times but not at the end} iii) { w belongs to {0,1,2}* | w=uxvx that x belongs to {0,1,2} u,v belongs to {0,1,2}* and there isn't any string y in the sequence v that x<y}
Write a right-linear CFG for the regular languages: (∑={0,1}) a. L = { w | w is a binary string which starts and ends with the same symbol} b. L = { w | w is a binary string with at least three 0’s } c. L = { w | w is a binary string with odd number of 0’s and even number of 1’s}
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.
1. Design an NFA (Not DFA) of the following languages. a) Lw E a, b) lw contain substring abbaab) b) L- [w E 10,1,2) lsum of digits in w are divisible by three) c) L-(w E {0,1,2)' |The number is divisible by three} d) The language of all strings in which every a (if there are any) is followed immediately by bb. e) The language of all strings containing both aba and bab as substrings. f L w E 0,1every...
Consider the language L below. (a) Is L a regular language? –
Yes, or No. (b) If L is a regular language, design the DFA (using a
State Table) to accept the language L, with the minimum number of
states. Assume , (c) Suppose the
input is “101100”. Is this input string in the language L?
Σ = {0,1} L={w l w has both an even number of O's and an odd number of 1's}
Regular expressions, DFA, NFA, grammars, languages
Regular Languages 4 4 1. Write English descriptions for the languages generated by the following regular expressions: (a) (01... 9|A|B|C|D|E|F)+(2X) (b) (ab)*(a|ble) 2. Write regular expressions for each of the following. (a) All strings of lowercase letters that begin and end in a. (b) All strings of digits that contain no leading zeros. (c) All strings of digits that represent even numbers. (d) Strings over the alphabet {a,b,c} with an even number of a's....
Let L1 = {ω|ω begins with a 1 and ends with a 0}, L2 = {ω|ω has
length at least 3 and its third symbol is a 0}, and L3 = {ω| every
odd position of ω is a 1} where L1, L2, and L3 are all languages
over the alphabet {0, 1}. Draw finite automata (may be NFA) for L1,
L2, and L3 and for each of the following (note: L means complement
of L):
Let L w begins...
1)
2) Give formal descriptions (5-tuples) for the DFAs shown in
figure below:
3) Give the state diagrams of DFAs recognizing the following
languages over ? = {0, 1}:
a) LÆ
b) L?
c) {e, 1001}
d) {e, 101, 1001}
e) {w : w has prefix 10}
f) {w : w does not contain the substring
011}
4) Give the state diagrams of DFAs recognizing the following
languages over ? = {0, 1}:
a) {w: |w| ? 5}
b) {w...
Give a DFA/NFA to recognize L = { w | w contains exactly 2 a’s, 3 b’s and no c’s. Σ = {a,b,c} }