DFA for strings ending in abb
AnswerInterpret the wording as requiring suffix abb, allowing any preceding symbols. States track the longest suffix that is a prefix of abb:…
Read more →AnswerInterpret the wording as requiring suffix abb, allowing any preceding symbols. States track the longest suffix that is a prefix of abb:…
Read more →AnswerRequired regular expression: (0+1)*1100(0+1)*.The prefix and suffix are arbitrary binary strings. The middle block is mandatory. 1100 and 011001 are accepted; 110…
Read more →AnswerRequired regular expression: (0+1)*00.The prefix may be empty or any binary word. The final two symbols must be zero. 00 and 10100…
Read more →AnswerRequired regular expression: a*.Kleene star permits zero or more repetitions. Thus ε, a, aa and aaa belong to the language, while b…
Read more →AnswerArden’s theorem: if ε is not in P, the equation X=Q+XP has the unique regular-language solution X=QP*. Substitution gives Q+QP*P=QP*. Repeated expansion…
Read more →AnswerA CFG is ambiguous if some generated word has two distinct parse trees, equivalently two distinct leftmost derivations.Example 1: E→E+E | E*E…
Read more →AnswerAssume all exponents are nonnegative integers. Split the union into four cases: i>j, i<j, j>k, j<k. Use the following productions:S→U E C…
Read more →AnswerAssume i,j≥0, as the paper explicitly bounds i but does not specify j. Use S→aS|B and B→bbB|ε. The first phase generates arbitrary…
Read more →AnswerUse stack bottom Z and marker X. On each a, push three X symbols. On each b, pop one X. Switch irreversibly…
Read more →RGPV | CS-501 (GS) | December 2025 | 8(b)Question (restated): Define the halting problem and prove that it is undecidable.AnswerThe halting problem…
Read more →Ask a study question in English or Hindi. I will find relevant passages from our notes.