# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

2 Pages

### soln3

Course: CS 322, Fall 2009
School: Washington
Rating:

Word Count: 543

#### Document Preview

part 1. (a) a*b(a U ba*b)* or (a U ba*b)*ba* Part (b) One of the possible solution is ((aUb)a*b(ba*b)*a)*((aUb)a*b(ba*b)*)* 2. Part a: You can either use Myhill-Nerode or pumping lemma to prove. For pumping lemma, the idea is that S(n) can be written as n(n+1)/2. If we choose string s = xyz = 0^{S(2p)}, then |s| = 2p^{2} + p. If we pump the string to xyyz, then S(2p) = 2p^2 + p &lt;...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Washington >> Washington >> CS 322

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
part 1. (a) a*b(a U ba*b)* or (a U ba*b)*ba* Part (b) One of the possible solution is ((aUb)a*b(ba*b)*a)*((aUb)a*b(ba*b)*)* 2. Part a: You can either use Myhill-Nerode or pumping lemma to prove. For pumping lemma, the idea is that S(n) can be written as n(n+1)/2. If we choose string s = xyz = 0^{S(2p)}, then |s| = 2p^{2} + p. If we pump the string to xyyz, then S(2p) = 2p^2 + p < |xyyz| <= 2p^2 + 2p < S(2p+1) = 2p^2 + 3p + 1. Therefore, xyyz is not in the language. For part b, you can use the similar idea, but instead of sum of the first n-th natural numbers, it's n-factorial. You can pick string s to be 0^{P(p)}, |s| = p! > p, then if you pump it to xyyz, then p! < |xyyz| <= p! + p < (p+1)p! 3. Part (a): This one is very similar to the proof for language of O^{n}1^{n}. I won't go to the detail about it. Choose s = 0^{p}10^{p} to avoid proving for multiple ways of breaking down s to x,y,z components. Part (c): Let W be the language in question. If W is regular, then W' (complement), which is basically the language of palindromes, must also be regular under the closure of class under complement. We have showned in class that W' is non-regular. Therefore, we've reached a contradiction, and thus W cannot be regular. Part (d): If you choose to prove by pumping lemma, then it will not be possible to prove by choosing string s = 0^{p}10^{p} or any string with similar format. The reason being once that, you pump this string, up or down, then it will still be in the language of L = {wtw}. Because, then, the extra 0's will become part of t. To illustrate, consider a string s = 0^p 11 0^p. For simplicity, we can think of w = 0^p, and t = 11. Then, if we pump the string up to xyyz, we get xyyz = 0^p 0^k 11 0^p, where 1 <= k <= p. This is not the same as part (a). Here, you can think of w = 0^p, and t becomes 0^k 11. Thus, xyyz is still in the language. So how to make this work? You can choose string s = 0^{p}1010^{p}1, and then pump it UP. 4. (a) You can use Myhill-Nerode thm, or use the closure properties to show that F is not regular. Important: For people who use the closure properties. Please remember that we want to prove that F is not regular. Let # represent a regular operation. Let languages A and B be reg...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Washington - CS - 421
Name:1 2 3 4 5 total/20 / 8 /17 /15 / 8 /68CSE 421 Final ExamMarch 18 , 2002 Instructions: You have 1 hour and 50 minutes to complete the exam. Please do not turn the page until you are instructed to do so. Good luck!1. (20 points, 2 each
Washington - CS - 421
Name:1 2 3 4 5 total/20 / 8 /17 /15 / 8 /68CSE 421 Final ExamMarch 18 , 2002 Instructions: You have 1 hour and 50 minutes to complete the exam. Please do not turn the page until you are instructed to do so. Good luck!1. (20 points, 2 each
Washington - CS - 421
Name:1 2 3 4 5/14 /10 /10 / 6 / 7CSE 421 Midterm ExamFebruary 15, 2002 Instructions: You have 50 minutes to complete the exam. Please do not turn the page until you are instructed to do so. Good luck!1. (14 points, 2 each) Indicate for ea
Washington - CS - 322
CSE 322: Formal Models in Computer Science March 31, 2008 Reading Assignment: 0.1-0.4 (review) and 1.1-1.2 Problems:Assignment #1 Due: Friday, April 11, 20081. Sipser's book, Exercise 1.3 (same in both editions.) Make sure you include everything
Washington - CS - 322
CSE 322: Formal Models in Computer Science April 11, 2008 Reading Assignment: Sipser 1.3 Problems:Assignment #2 Due: Friday, April 18, 20081. Give state diagrams of NFAs with the specified number of states recognizing each of the following langua
Washington - CS - 322
CSE 322: Formal Models in Computer Science April 18, 2008 Reading Assignment: Sipser 1.4 Problems:Assignment #3 Due: Friday, April 25, 20081. For the language denoted by each of the following regular expressions, give two strings that are members
Washington - CS - 322
CSE 322: Formal Models in Computer Science April 25, 2008Assignment #4 Due: Monday, May 5, 2008Reading Assignment: Lecture notes on pattern matching, Myhill-Nerode, and DFA Minimization. Sipser 2.1 Problems: 1. Use the pumping lemma to prove that
Washington - CS - 322
CSE 322: Formal Models in Computer Science May 9, 2008 Reading Assignment: Sipser 2.1Assignment #5 Due: Friday, May 16, 20081. Design context-free grammars which generate each of the following languages. Justify your grammar designs. You may spec
Washington - CS - 322
CSE 322: Formal Models in Computer Science May 16, 2008 Reading Assignment: Sipser 2.2,2.3Assignment #6 Due: Wednesday, May 28, 20081. Find a pushdown automaton which recognizes the language {am bn |n m 2n, m, n 0} For the transition function,
Washington - CS - 322
CSE 322: Formal Models in Computer Science May 27, 2008 Reading Assignment: Sipser 3.1,3.2, 4.1,4.2Assignment #7 Due: Friday, June 6, 20081. Let L = {0n 11 0n 1n |n 0}. Prove that L is not context-free. 2. Let L be the language of all palindrome
Washington - CS - 322
CSE 322: Formal Models in Computer Science May 28, 2008Extra Credit Due: Monday, June 9, 2008, MidnightThis extra credit involves building automata and Turing machines using JFLAP, a Java-based simulator. You can download the program from the fol
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Formal Definition of a Deterministic Finite AutomataDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonI.EXAMPLE FROM MY YOUTH AND MY OLD AGEBack in the
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Regular Operations on LanguagesDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonI.A QUESTIONNow that we have defined deterministic finite automata, we
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Nondeterministic Finite AutomataDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonToday we are going to talk about nondeterministic finite automata. Our mo
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Equivalence of DFAs and NFAsDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonLast time we defined nondeterministic finite automata. Our motivation for doi
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Regular ExpressionsDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonHaving just put behind us our first major theoretical result, that the class of langua
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Converting DFAs to Regular ExpressionsDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonLast time we saw how, given a regular expression, we could take thi
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science The Pumping Lemma for Regular LanguagesDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonSo far we have talked about regular languages and showed that they
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science String MatchingDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonSuppose that you are given a short pattern and a long text and you wish to determine if th
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science The Myhill-Nerode TheoremDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonThe pumping lemma for regular languages is nice, but it has one fatal drawback,
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Minimizing DFAsDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonLast time we discussed the Myhill-Nerode theorem: Myhill-Nerode Theorem A is regular if an
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Introduction to Context-Free GrammarsDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonIn the last few lectures we finished up talking about regular langua
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Chomsky Normal FormDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonA useful form for dealing with context free grammars is the Chomksy normal form. This
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Pushdown AutomataDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonOkay now that we've talked a little about context free grammars, a natural question to a
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Pushdown Automata And Context-Free LanguagesDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonHaving introduced pushdown automata, we will now show that pu
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Closure Properties of Context-Free LanguagesDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonPreviously we showed how regular operations were closed under
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science Turing MachinesDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonToday we finally make it up to.computers! Well at least to the model which best captures w
Washington - CS - 322
CSE 322 - Introduction to Formal Methods in Computer Science DecidabilityDave BaconDepartment of Computer Science &amp; Engineering, University of WashingtonIn the last lecture we introduced the Turing machine. We talked about how it worked, and show
Washington - CS - 322
CSE 322: Formal Models in Computer ScienceMidterm TopicsThe midterm will be Friday, May 9th in class. It will be 50 minutes in length and will be closed book. The midterm will cover everything covered in class up to and including the first half o
Washington - CS - 322
CSE 322: Formal Models in Computer ScienceFinal TopicsThe nal will be Monday, June 9 from 2:30-4:20 in EEB 045. It will be 110 minutes in length and will be closed book. It will cover everything in the class with slightly more coming from the mat
Washington - CS - 322
CSE322: Formal Models in Computer Science Partial Solutions to Sample FinalSpring 2006This handout has (partial) solutions to some of the problems in the sample final exam that was handed out in class on Friday, May 26. I have not given solutions