6. Consider the DFA shown: zo (a) List at least 5 strings that are accepted by...
For ∑ = {a, b}, construct a dfa that accepts the set consisting of all strings with at least one b and exactly two a’s
Give a DFA withoutε-transitionthat acceptsthe set of strings over {a, b}that contain at least one b if its length is at least four:
Part B - Automata Construction Draw a DFA which accepts the following language over the alphabet of {0,1}: the set of all strings such that the number of 0s is divisible by 2 and the number of 1s is divisible by 5. Your DFA must handle all intput strings in {0,1}*. Here is a methodical way to do this: Figure out all the final states and label each with the shortest string it accepts, work backwards from these states to...
2. Let L = {hMi: M is a Turing machine that accepts at least two binary strings}. a) Define the notions of a recognisable language and an undecidable language. [5 marks] b) Is L Turing-recognisable? Justify your answer with an informal argument. [5 marks] c) Prove that L is undecidable. (Hint: use Rice’s theorem.) [20 marks] d) Bonus: Justify with a formal proof your answer to b). [20 marks] 2. Let L-M M): M is a Turing machine that accepts...
Theory of Computation need ASAP 2-3 hours 1. For the following grammar: a) Give an example of a string accepted by the grammar. b) Give an example of a string not accepted by the grammar. c) Describe the language produced by the grammar. 2. Using the following grammar find a derivation for the string: 0001112 A0A1le C 0C2 | D Create a grammar for the language described by the following RE: Create a grammar for the following language: For the...
Consider the NFA M given below: a) Informally describe the language accepted by M. b) Transform M into an equivalent DFA. 91 42 0 0 Go 43
2. Let L-M M): M is a Turing machine that accepts at least two binary strings. a) Define the notions of a recognisable language and an undecidable language. [5 marks [5 marks] b) Is L Turing-recognisable? Justify your answer with an informal argument. c) Prove that L is undecidable. (Hint: use Rice's theorem.) [20 marks] 20 marks] d) Bonus: Justify with a formal proof your answer to b). 2. Let L-M M): M is a Turing machine that accepts at...
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...
Run JFlap, and use File->Open to open the problem1.jff file that we have given you. In problem1.jff, build a deterministic finite-state machine that accepts all bit strings containing at least three 1s and at most one 0, and that rejects all other bit strings. This problem requires at least nine states. You may use more states if necessary (there’s no penalty for doing so), but if you have time, try to get as close to the minimum as possible! Here...
Week 6 6. (15 points) Suppose you have some List of S List of Strings called List and a String prefix. Write a method that removes all the Strings from list that begin with prefix. public void removePrefixStrings(List-String- list, String prefix) 7. (2 points) What is the time complexity of this algorithm? 17 points Page 5 of 10