I need the solution to Exercise 4.2.9 If w = a_1 q_2 a_n and x = b_1 b_2 b_m are
ID: 673832 • Letter: I
Question
I need the solution to Exercise 4.2.9
If w = a_1 q_2 a_n and x = b_1 b_2 b_m are strings of the same length, define alt(w, x) to be the string in which the symbols of w and x alternate, starting with w, that is a_1 b_1 a_2 b_2 a_n b_n. If L and M are languages, define alt(L, M) to be the set of strings of the form alt(w, x) where w is any string in L and x is any string in M of the same length. Prove that if L and M are regular, so is alt(L, M). Let L be a language. Define half(L) to be the set of first halves of strings in L, that is, {w| for some x such that |x| = |w|, we have wx in L}. For example, if L = { 0010, 011, 010110} then half (L) = { 00, 010}. Notice that odd length strings do not contribute to half(L). Prove that if L is a regular language, so is half(L). We can generalize Exercise 4.2.8 to a number of functions that determine how much of the string we take. If f is a function of integers, define f(L) to be {w| for some x, with |x| = f(|w|), we have wx in L}, For instance, the operation half corresponds to f being the identity function f(n) = n, since half(L) is defined by having |x| = |w|. Show that if L is a regular language, then so is f(L), if f is one of the following functions: f(n) = 2 n (i.e., take the first thirds of strings). f(n) = n^2 (i.e., the amount we take has length equal to the square root of what we do not take. f(n)) = 2^n (i.e., eat we take has length equal to the logarithm of what we leave).Explanation / Answer
Hi,
Sorry to tell you this because you have not mentioned the Code snips from which language (I mean whether the code you needed from C++ or Perl or Matalab) by looking this Exercises we will not get to know about all details before posting your questions please provide us the little more elaborate details then this would be easy to give the solution to you.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.