Question

Need help with this question. Thank you!Problem 146. Give an algorithm for the following decision problem. DFA AcceptNoOdd INPUT: A DFAM QUESTION: Does M accept no o

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is a simple Solution for the Problem:

1:Create a DFA, NN that accepts only odd-length strings (a two-state DFA will do it).

2:On input MM, determine whether L(M)=L(N)L(M)=L(N), using known results about regular language closure properties (for example, for any sets A,BA,B we know A=BA=B if and only if their symmetric difference, (A∩B¯¯¯¯)∪(A¯¯¯¯∩B)(A∩B¯)∪(A¯∩B) is empty). If A,BA,B are regular, then their symmetric difference is regular (by closure properties of regular languages

3:Test the symmetric difference for emptiness. There's a well-known result about how to do that for regular languages.

4:If the difference is empty, answer "yes" else answer "no

********************************************Thank You************************************************************

Add a comment
Know the answer?
Add Answer to:
Need help with this question. Thank you! Problem 146. Give an algorithm for the following decision...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • --Question For Automata and Pattern Matching -- Show that there is an algorithm which receives as...

    --Question For Automata and Pattern Matching -- Show that there is an algorithm which receives as input a DFA M over the alphabet {0, 1} and decides whether M recognises exactly the binary strings that contain an odd number of 1’s. Clearly state all results proven in class that you’ve used (without proof).

  • Hello, I need help with the following Discrete problem. Please show your work, thank you! 11....

    Hello, I need help with the following Discrete problem. Please show your work, thank you! 11. Let R be the relation defined on the set of eight-bit strings by Si R 52 provided that sy and sz have the same number of zeros. (a) Show that is an equivalence relation. (b) How many equivalence classes are there? (c) List one member of each equivalence class.

  • Hi, I need help with part A. Please show all the work, thanks. Decidability 1. Which...

    Hi, I need help with part A. Please show all the work, thanks. Decidability 1. Which of the following problems is decidable? Why? a) Given a TM M and a stringy, does M ever write the symbol # on its tape on input y? b) Given a context free grammar G over (a, b), does G generate all the strings of the anguage fa, b* of length s 381? c) Given a context free grammar G over (a, b), does...

  • Subject: Algorithm need this urgent please thank you. 4. Give pseudocode for an algorithm that will solve the following problem. Given an array A[1..n) that contains every number between 1 and n +...

    Subject: Algorithm need this urgent please thank you. 4. Give pseudocode for an algorithm that will solve the following problem. Given an array A[1..n) that contains every number between 1 and n +1 in order, except that one of the numbers is missing. Find the miss sorted ing mber. Your algorithm should run in time (log n). (Hint: Modify Binary search). A pseudocode means an algorithm with if statements and loops, etc. Don't just write a paragraph. Also, if your...

  • Hi, I need help with this practice problem! Chapter 2 Algorithm Discovery and Design 64C FIGURE...

    Hi, I need help with this practice problem! Chapter 2 Algorithm Discovery and Design 64C FIGURE 2.10 Get values for a and b If (either a 0orb 0) then Set the value of product to o se Set the value of count to 0 Set the value of product to 0 While (count <b) do Set the value of product to (product+ a) Set the value of count to (count + 1) End of loop Print the value of product...

  • Question 1: Design a DFA with at most 5 states for the language L1 = {w...

    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...

  • I need help with this exercise. Thank you for your help Language is C++ 6. Write...

    I need help with this exercise. Thank you for your help Language is C++ 6. Write a program that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number. (Note: An even number is prime if it is 2. An odd inte- ger is prime if it is not divisible by any odd integer less than or equal to the square root of the number.)

  • 1. Give a context-free grammar for the set BAL of balanced strings of delimiters of three...

    1. Give a context-free grammar for the set BAL of balanced strings of delimiters of three types (), and . For example, (OOis in BAL but [) is not. Give a nondeterministic pushdown automata that recognizes the set of strings in BAL as defined in problem 1 above. Acceptance should be by accept state. 2. Give a context free grammar for the language L where L-(a"b'am I n>-o and there exists k>-o such that m-2*ktn) 3. Give a nondeterministic pushdown...

  • I need help with that 5. Let Σ-ta, b). Write the δ function for the following...

    I need help with that 5. Let Σ-ta, b). Write the δ function for the following (1) dfa (δου'Qu Σ-Q) and (2) nfa (5,ra : Q x (BU {λ)) → P(D) respectively. 92 92 6. Give the languages accepted by the dfa and nfa in the above 6 (1) and 6(2), respectively 7. (1) When is a language L called as regular? (2) (i) Prove language L = {а"wb: we {a, b) *,n2 O} įs regular by design an nfa...

  • I NEED A MATHEMATICAL ALGORITHM FOR A CEASER CHYPER I CREATED. PLEASE HELP ME...THANK YOU! THE...

    I NEED A MATHEMATICAL ALGORITHM FOR A CEASER CHYPER I CREATED. PLEASE HELP ME...THANK YOU! THE SINGLE-DIGIT KEY IS 14 THE PHRASE IS "GOOD MORNING PROFESSOR" THE CYPHER IS UCCR ACFBWBU DFCTSGGCF I DON'T KNOW HOW TO CREATE THE ALGORITHM AND IT CANNOT BE COMPUTER GENERATED. a. Develop a Caesar cipher-type encryption algorithm with a little more complexity in it. For example, the algorithm could alternatively shift the cleartext letters positive and negative by the amount of the key value....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT