Chapter 0: Q17P (page 1)
Let be the language of properly nested parentheses. For example, (()) and are in, but) (is not. Show that A is in L.
Short Answer
Prove that A is in L by counting the number of unmatched left parenthesis.
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 0: Q17P (page 1)
Let be the language of properly nested parentheses. For example, (()) and are in, but) (is not. Show that A is in L.
Prove that A is in L by counting the number of unmatched left parenthesis.
All the tools & learning materials you need for study success - in one app.
Get started for free
Question: Describe the error in the following 鈥減roof鈥 that is not a regular language. (An error must exist because is regular.) The proof is by contradiction. Assume that is regular. Let p be the pumping length for localid="1662103472623" given by the pumping lemma. Choose s to be the string 0p1p . You know that s is a member of 0*1*, but Example 1.73 shows that s cannot be pumped. Thus you have a contradiction. So is not regular.
We generally believe that PATH is not NP-complete. Explain the reason behind this belief. Show that proving PATH is not NP-complete would prove P 鈮 NP
Myhill鈥揘erode theorem. Refer to Problem . Let L be a language and let X be a set of strings. Say that X is pairwise distinguishable by L if every two distinct strings in X are distinguishable by L. Define the index of L to be the maximum number of elements in any set that is pair wise distinguishable by L . The index of L may be finite or infinite.
a. Show that if L is recognized by a DFA with k states, L has index at most k.
b. Show that if the index of L is a finite number K , it is recognized by a DFA with k states.
c. Conclude that L is regular iff it has finite index. Moreover, its index is the size of the smallest DFA recognizing it.
Use the results of Exercise to give another proof that every regular language is context- free, by showing how to convert a regular expression directly to an equivalent context-free grammar.
Give a formal definition of an enumerator. Consider it to be a type of two-tape Turing machine that uses its second tape as the printer. Include a definition of the enumerated language
What do you think about this solution?
We value your feedback to improve our textbook solutions.