subject

Consider the language L = {w |w ∈ {0, 1} ∗ , 2 × #0 (w) = #1 (w)} , here #0(w) and #1(w) means the numbers of 0s and 1s in w respectively. That is, this is the language consisting of all strings with exactly twice as many 1s as 0s: for example, 101 ∈ L, 010 ∈/ L. In this problem we will show how to construct a context-free grammar for it. (a) (2 points) For a length n word x, we define a function f (i) = (2 × number of 0s in locations [1 . . . i]) − (number of 1s in locations [1 . . . i]). Show that we have f(i) = f(j) for some i < j if and only if the substring in indices [i + 1, . . . j] has exactly twice as many 1s as 0s (i. e. xi+1,i+2,...,j ∈ L).

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
You know the right answer?
Consider the language L = {w |w ∈ {0, 1} ∗ , 2 × #0 (w) = #1 (w)} , here #0(w) and #1(w) means the n...
Questions
question
Mathematics, 05.05.2020 02:25
question
Law, 05.05.2020 02:25
question
Mathematics, 05.05.2020 02:25
question
Mathematics, 05.05.2020 02:26
Questions on the website: 13722360