CMPE 223程序 写作、 辅导Python,Java,c/c++程序

” CMPE 223程序 写作、 辅导Python,Java,c/c++程序CISC/CMPE 223 – Assignment 2 (section 2) (Fall 2020)Due: Thursday October 8, 2:00 PM (Kingston time)Regulations on assignments The assignments are graded according to the correctness, preciseness and legibility ofthe solutions. All handwritten parts, including figures, should be clear and legible. Thisassignment is marked out of 20 possible marks. Please submit your solution in onQ before the due time. The assignment must be based on individual work. Copying solutions from otherstudents is a violation of academic integrity. See the course web site for more information httpss://research.cs.queensu.ca/home/cisc223/2013w/#AS1. (4 marks) Using the method Described in Section 9.1 and in videos of Week 3 (video 12)convert the following regular expression into a state diagram:(01 + 10)1Note that the closure operation has highest precedence (see page 164 in the text). Thusthe expression 01 denotes exactly one 0 followed by any number of 1s.Your answer should indicate How you arrived at the result: As intermediate steps write down the state diagrams that you construct for subexpressionsof the given regular expression, and for each intermediate step clearlyindicate which subexpression it corresponds to. Please do not simplify/modify the state diagrams. Simplifications/modifications ofthe state diagrams are Considered as errors when marking (independently of whetheror not the state diagram remains equivalent).Please note: The question is marked based on how well you follow the steps of thealgorithm of section 9.1.12. (3 marks) Using the method described in Section 9.2 (and in videos of Week 3), convertthe state diagram given in Figure 1 into an equivalent regular expression. Here ={a, b, c, d}.Your answer should include the intermediate step(s) used in the construction.1An NFA produced by some other method is considered incorrect independently of whether or not it maydefine the same language.CMPE 223作业 写作、 辅导Python,Java,c/c++程序Figure 1: State diagram for Question 2.3. Are the following languages A and B over the alphabet = {a, b, c, d} regular or nonregular? For a language that is regular, give a regular expression that defines it. For a nonregular language, using the pumping lemma prove that it is not regular.(a) (2 marks) A = {d2j+1ck+1 | j k 0} {cr+2b2s+3 | r 0 and s 0}(b) (2 marks) B = {a2j+2bk+3cj+1 | j 1 and k 1} {dm+3 | m 0}Above stands for language concatenation.Hints: The languages A and B are each expressed as concatenation of two components.If one (or both) of the components is non-regular, this does not imply anything about thenon-regularity of the Concatenation. If trying to show that a language C is non-regular,we have to apply the pumping lemma to the entire language C (and not to the individualcomponents of the concatenation).On the other hand, if trying to show that C is regular, we can find regular expressionsfor the two components separately and then use the concatenation operation.4. (3 marks) Using the algorithm mark distinguishable pairs of states that was presented invideos of Week 4 (videos 2324) and that can be found in the course notes, minimize thenumber of states of the DFA depicted in Figure 2.Your answer should indicate in detail how you arrived at the solution: For each stage of the algorithm, indicate which pair(s) of states are marked as distinguishableat that stage and explain the reason why. Draw the minimized state diagram where each state is labeled by the correspondingnames of states in the original DFA that were merged together.Figure 2: The DFA to Be minimized in Question 1.5. (6 marks) Consider languages over terminal alphabet = {a, b, c, d}. Give context-free grammars that generate the following four languages. In each case, also give a derivation of the specified terminal string using your grammar.The derivation beginning from the start variable should indicate each individualderivation step Using the notation .(a) A = { aib2i| i 1 } {c3kdk| k 1 } Derivation for the string c9d3(b) B = { a3ib4kc3kd2i| i 0, k 0 } Derivation for the string ak+1 | i 0, k 0 } Derivation for the string a3i+1 | i 0, k 0 } { b2k+1 | i 0, k 0 }Derivation for The string.如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导