Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions related to formal languages, grammars, and automata theory
8
votes
1
answer
1k
views
If L is context-free, must FH(L) be context-free?
Define $FH(L) = \{x \in \Sigma^* : \exists y \in \Sigma^* \text{ with } |x| = |y| \text{ such that } xy \in L\}$. In other words, $FH(L)$ is the set of first halves of even length strings in $L$. …
7
votes
2
answers
868
views
Parikh's Theorem: CFL's "contain" regular languages?
The first sentence of the Wikipedia article for Parikh's Theorem states:
"Parikh's theorem in theoretical computer science says that if one looks only at the relative number of occurrences of ter …
4
votes
1
answer
589
views
Show that every grammar for an inherently ambiguous CFL has infinitely many ambiguities
Prove that if a CFL $L$ is inherently ambiguous, then for any grammar $G$ with $L(G) = L$, there are infinitely many strings in $L$ that have (at least) 2 different derivations in $G$.
Here's a s …
3
votes
3
answers
728
views
Give an example of a language whose Myhill-Nerode equivalence relation is such that if $x,y ...
Suppose $\Sigma = \{0,1\}$. Provide an example of a language $L \subseteq \Sigma^*$ with the property that its associated Myhill-Nerode equivalence relation, $R_L$, is such that every one of its equi …
3
votes
2
answers
780
views
If $L$ is regular, must the language $L_1 = \{w : w^Rw \in L\}$ be regular, or may it be non...
The reverse, $w^{R}$, of a string $w = w_1w_2...w_n$ is the string $w_n...w_2w_1$. Suppose that L is a regular language. Must the language $L_1 = \{w : w^Rw \in L\}$ be regular, or may it be non-reg …
2
votes
2
answers
136
views
Prove that REG is closed against removing all but lexicographicaly largest words (per length)
Let $\Sigma_n = \{0, 1, ... , n-1\}$. Suppose $L \subseteq$ $\Sigma^*_n$, and let
$\qquad\displaystyle\mathcal{B}(L) = \{ x \in L : x = \textrm{lex}\max L_m, m \in \mathbb{N}_0 \}$,
where $L_m = L \ …
1
vote
1
answer
618
views
Show that a regular language L contains only palindromes if and only if all words of length ...
This is an extension of a previous question asked by a different user earlier:
Let $x, u, v, w, y, x', u', v', w', y'$ be words satisfying
$y'x' = xy$.
$y'u'x' = xuy$.
$y'v'x' = xvy$.
$y'w'x' = xwy$ …
1
vote
2
answers
95
views
Is the language of strings with an integer ratio of the number of a's to the number of b's c...
Consider the language $L \subseteq \{a,b,c\}^*$, where $w \in L$ if and only if the ratio of the number of $a$'s in $w$ to the number of $b$'s in $w$ is an integer. I've been unable to find a countere …
0
votes
1
answer
141
views
For two regular languages, why is the set of words from one that don't have a subsequence in...
In general, a string $x$ is a subsequence of $w = w_1\dots w_n$ if there are integers $i_1<\dots< i_k$ such that $x = w_{i_1}\dots w_{i_k}$. The subsequence is proper if $k < n$ and $k > 0$.
With th …