Q1. Build a DFA which accepts language L= {w | w is a string formed from set E= {0,1} which contains
only even number of 0}
Q2. Build a DFA which accepts language L= {w | w is a string formed from set E= {0,1} which contains
only odd number of 1}
Q3. Build a DFA which accepts language L= {w | w is a string formed from set E= {0,1} which has 1 on
every odd position}
Q4. Build a DFA which accepts language L= {w | w is a string formed from set E= {0,1} which has 0 on
every even position}
Q5. Write a python program (using Jupiter notebook IDE) which implement a DFA that scan the entire
homework 1 document and accept only the language, L= {w | w is a string which ends with 'ing'}. Display
both accepted and rejected strings.
Q6. Write an interactive DFA program which asks user to input any string and then the program accepts
or rejects the inputted string according to the following language L= {w | w is a string which begins with
01}. Display Accepted for valid strings otherwise display Not accepted.
Hint for Question Q5:
1. Copy all the all the text in this file and save in a separate text file
2. Read the saved text file into your program
3. Convert the read text file into string (in case the text file is imported as an object)
4. Use the split () method of string class to split the words in the text into a list data structure
5. Loop over the length of the list and check for the word which ends with 'ing'
6. Save the accepted and not accepted words in separate container and display the results in the
end of the scan.