Computer Science Online exam help with solutions
Turning Machines
Q1. Consider the following Turing Machine M = (Q, Σ, Γ, #, δ, q0 , F ), where Σ = {1, 2, 3} is the input alphabet
and Γ = {1, 2, 3, a, b, #} is the tape alphabet (# is the blank symbol):
A transition of the form 1/a, R means that when the head is reading 1, M can legally write a and move right.
(a) Trace the computation of M on input string 11222233 by completing the following derivation (location of
head is denoted by underlining the respective symbol):
q0#11222233# ⊢ q1#11222233# ⊢ q2#a1222233# ⊢ · · ·
Is the input string accepted?
(b) Explain informally, the working of the machine M .
(c) Give the language L(M ) in set notation.
(d) Provide a grammar having 12 or less rules that accepts the same language as M. What type of grammar is it?
(e) What properties of formal languages would you use (and how) to formally prove that there is no NFA that [4] can accept the language L(M ). Explain briefly (note: you do not need to actually do any proof).
(f) Does there exist a PDA that accepts L(M )? Briefly explain your answer in one short sentence.
(g) We obtain Turing Machine M ′ by modifying M as follows:
Q2.Showformally,byresortingtoproblemreduction,thattheproblem,ofdecidingwhetheraTuringmachinehalts [8] on an input w where |w| is a multiple of 5, is undecidable.
How it Works
How It works ?
Step 1:- Click on Submit your Assignment here or shown in left side corner of every page and fill the quotation form with all the details. In the comment section, please mention product code mentioned in end of every Q&A Page. You can also send us your details through our email id support@assignmentconsultancy.com with product code in the email body. Product code is essential to locate your questions so please mentioned that in your email or submit your quotes form comment section.
Step 2:- While filling submit your quotes form please fill all details like deadline date, expected budget, topic , your comments in addition to product code . The date is asked to provide deadline.
Step 3:- Once we received your assignments through submit your quotes form or email, we will review the Questions and notify our price through our email id. Kindly ensure that our email id assignmentconsultancy.help@gmail.com and support@assignmentconcultancy.com must not go into your spam folders. We request you to provide your expected budget as it will help us in negotiating with our experts.
Step 4:- Once you agreed with our price, kindly pay by clicking on Pay Now and please ensure that while entering your credit card details for making payment, it must be done correctly and address should be your credit card billing address. You can also request for invoice to our live chat representatives.
Step 5:- Once we received the payment we will notify through our email and will deliver the Q&A solution through mail as per agreed upon deadline.
Step 6:-You can also call us in our phone no. as given in the top of the home page or chat with our customer service representatives by clicking on chat now given in the bottom right corner.
Features
Features for Assignment Help
We believe in providing no plagiarism work to the students. All are our works are unique and we provide Free Plagiarism report too on requests.
We believe in providing perfect, relevant and 100% accurate solutions to the student as per questions asked. All our experts are perfect in providing that so as to give unique experience to the students.
We are the only service providers boasting of providing original, relevant and accurate solutions. Our three stage quality process help students to get perfect solutions.
All our works are kept as confidential as we respect the integrity and privacy of our clients.
Related Services
- Physics Assignment Help
- Chemistry Assignment Help
- Engineering Assignment Help
- Psychology Assignment Help
- Online exam Help
- Marketing Assignment Help
- Arts Assignment Help
- Sociology Assignment Help
- Project Management Assignment
- Case Study Help
- Nursing Assignment Help
- Research Assignment Help
- Operations Management Assignment help
- Accounting Assignment Help
- Biology Assignment Help
- Mathematics Assignment Help
- English Assignment Help
- Business Plan Help
- Essay Writing Help
- Human Resource Assignment Help
- Accounting Homework Help
- Computer Science Assignment Help
- Finance Assignment Help
- Economics Assignment Help
- Statistics Homework Help
- Management Assignment Help
- Strategy Management Assignment Help
- Auditing Assignment Help
- Information Management Assignment Help
- Online Assignment Writing help
- Best Assignment Help
- Humanities Assignment help
Automata
Q3. Let M1 = (Q, Σ, δ1, q0, F1) be the following finite state automaton defined over the alphabet Σ = {a, b, c, d}:Here, λ denotes the empty transition.
(a) You are told that the following DFA M2 = (Q2, Σ, δ2, q0, F2), built using the subset construction tech-
nique, is a deterministic equivalent version of automaton M1:
After careful analysis, you realise that M2 is incorrect: it is not a deterministic equivalent version of M1.
Construct a DFA M3 = (Q2, Σ, δ3, q0, F3), from M2, by only adding or removing transitions and tog- gling whether a state is final or not (but without changing the set of states and the initial state), such that L(M1) = L(M3). In addition, you are asked ensure that the transition function δ3 is total. You do not need to provide a diagram of M3; just answer the following questions by interpreting transition functions as relations (e.g., (q0, c, q1) ∈ δ2, since δ2(q0, c) = q1) :
i. What is δ3 \ δ2?
ii. What is δ2 \ δ3?
iii. What is F3 \ F2?
iv. What is F2 \ F3?
(b) What modifications are required in M1 in order to make it λ-free without altering its language? Your resulting machine M4 = (Q, Σ, δ4, q0, F4) will still be non-deterministic. You can only remove λ tran- sitions, add transitions over Σ, or toggle whether a state is final or not, you must not change the set of states and you cannot change the initial state. You do not need to provide a diagram of M4; just answer the following questions:
i. What is δ4 \ δ1?
ii. What is δ1 \ δ4?
iii. What is F4 \ F1?
iv. What is F1 \ F4?
Q4. Emma’s Pumping Lemma Dilemma: For her job application to tutor CT, Emma has been asked to prove that [4] L = {anbma2m+3n | m, n ≥ 1} is not regular. The night before it was due, she finally finished the proof, wrote
it all down neatly, and went to bed. During the night, burglars came into her house with their dog, and the dog chewed up her proof. In an attempt to cover their tracks, the burglars tried to recreate the proof. They gathered
all the shreds they could find, but on some of them the ink had washed out from the dog’s saliva, and so they couldn’t read some parts of it. Can you help them put the proof back together? For each shred they found, they rewrote it on a piece of paper. If they couldn’t rewrite it, they wrote different interpretations of what they thought it read onto different pieces of paper. Now they have many pieces of paper, but they don’t know which of them are correct and in which order they need to go. Help Emma’s burglars.
There is one big piece, that reads:
Reminder: the Pumping lemma states, that for any regular language L, there exists a pumping length k ∈ N, and for all w ∈ L, where |w| ≥ k, there exist substrings x,y,z ∈ Σ∗, such that:
w = xyz (1)
|y| ≥ 1 (2)
|xy| ≤ k (3)
xyiz∈L, for all i≥0 (4)
Here are the other pieces they’ve transcribed:
(a)Now consider w = akbka5k.
(b) Now consider w = abaaaaa.
(c) Thusw=akbka5k =xyzsuchthat|xy|≤kand|y|≥1.
(d) Then, it follows that w ∈ L (where m = n = 1) and |w| = 7 ≥ 1.
(e)Then, it follows that w ∈ L (where m = n = k) and |w| = 7k ≥ k.
(f) Consider now i = 1. Then, xyiz = xyz = aqarasbka5k = aq+r+sbka5k.
(g)Consider now i = 1. Then, xyiz = xyz = aqarasbka5k = aq+r+sbka5k.
(h)So, it follows that x = a, y = b, and z = aaaaa. Clearly w = abaaaaa = xyz.
(i)Assume that L is regular. Then, there exists a k ∈ N as per the Pumping Lemma.
(j)Consider now i = 2. Then, xyiz = xyyz = abbaaaaa. It is then clear that xyiz ̸∈ L.
(k)Now, because q + r + s = k and r ≥ 1, we know that q + s ̸= k, and therefore, xyiz ̸∈ L.
(l)Thus we have a contradiction: our assumption (that L is regular) must be blue and L is true.
(m)Now,becauseq+r+s=kandr≥1,we know that aqaras =ak,andtherefore,xyiz∈L.
(n) So, according to the Pumping lemma, there exist substrings x, y, z ∈ Σ∗ such that (1)-(4) hold.
(o)Thus we have a contradiction: our assumption (that L is regular) must be false and L is not regular
(p)So, it follows that x = aq, y = ar, z = asbka5k, where q + r ≤ k, r ≥ 1, s ≥ 0, and q + r + s = k.
You need not write out the entire proof, just provide the corresponding letters in the correct order as a word. For example, the word badf denotes the proof built from statements (b), (a), (d), and (f) in that exact order. And remember: the burglars wrote down multiple different interpretations of the same piece of the proof, so not all of these will be necessary or correct. However, all necessary pieces are listed above.
Q5. Prove that L = {amb2man | m, n ≥ 0} is not regular.
Q6. Show that the language L2 = {a, b}∗ \ {amb2man | m, n ≥ 0} is not regular. For this part, you can rely on the [4]
fact that L, from the previous question, is not regular.
Q7. ShowthatthelanguageL3 ={an |n≥0,n̸=3andn̸=6}isregular.
Q8. Prove mathematically that f(n) = 10n3 + 20n2 + 30 ∈ O(n4), for n ≥ 0.
Q9. Suppose you are studying the computational complexity of a given problem X. It is known that the boolean [4] satisfiability problem can be reduced to X in polynomial time. In addition, it is known that problem X is in class PSPACE, as somebody has developed an algorithm for X that is guaranteed to consume no more than polynomial amount of space. How would you prove that:
(a) X is NP-COMPLETE. (b) X is PSPACE-Complete.
Observe that you do not need to develop any proof, but just explain briefly what task would you do.
Q10. Let X1 and X2 be two decision problems. Suppose it is known that X1 is NP-COMPLETE. Suppose further [7] that there exists an exponential reduction of problem X1 into problem X2, that is, there exists a function f :
X1 → X2, whose implementation runs in exponential time, such that for any given instance x1 of X1 the answer
to x1 is “Yes” for problem X1 if and only if the answer to f(x1) is “Yes” for problem X2. What can be said about the computation complexity of the problem X2. Is X2 NP-HARD? Explain in one or two paragraphs.
Q11. Explain the phase transition phenomenon observed in 3-SAT.
You’re expected to submit between 400 and 500 words (excluding references).
Think of it, as if you were hired to write a textbook for Computer Science undergraduates who are taking Computing Theory.
Besides providing enough technical information, your text needs to be enjoyable to read (or else the book will not sell well!). Make sure you use multiple paragraphs, correct English grammar and spelling, and language of appropriate formality with an adequate flow.
You must not copy and paste a single sentence from the web (this includes Wikipedia). Note that copied sentences are trivial to identify, so you should re-phrase in your own words whatever you read. You should also reference the material you used for your research.
Finally, we strongly recommend you proof-read your text, reflect on whether the reader (e.g., a fellow student) would be satisfied with what you wrote and revise accordingly.
Product Code :Comp02
To get answer for this question, kindly click here (Note: Don’t forget to write the product code in comment section)
You can also email us at assignmentconsultancy.help@gmail.com but please mentioned product code in the mail body while sending emails.You can browse more questions to get answer in our Q&A sections here.