I got a question on how to prove whether a language is context free using pumping lemma.
Let's say language L
.
It contains a finite sequence of positive integers, it rises then falls (informally).
Formally, we require that there exists k ∈ {1, 2, . . . , n}
such that:
for all i such that 1 ≤ i ≤ k − 1, we have xi ≤ xi+1; and
for all i such that k ≤ i ≤ n − 1, we have xi ≥ xi+1.
which is: x1 ≤ · · · ≤ xk−1 ≤ xk ≥ xk+1 ≥ · · · ≥ xn
This means there is a max value.the max value may be at the very start or the very end, so that increasing sequences and decreasing sequences are just special cases; the sequence can have consecutive equal terms before, at, or after the peak; and the peak may be broad, i.e., there may be more than one equal maximum term in the sequence.
Actually in L, every integer is represented as binary numbers, separated by #. Examples of members:
1#100#110#100#1, 11#101#101#1, 101#101#101, 1#1#10#11#101#1000, 1110#101#10#1, 101010
Examples of strings that are not in L:
1#100#110#100#1#0, 11#1#100, 1#101#1001#10#110, 101#11#101, 0, ε
The question is: is the L context free? Prove or disprove. I think the L is context free, but I don't know how to prove it. Thanks for help.