instruction stringlengths 0 29.8k ⌀ |
|---|
|formal-languages|undecidability| |
I'd really love your help with the following:
For *any* fixed $L_2$ I need to decide whether there is closure under the following operators:
1. $A_r(L)=\{x \mid \exists y \in L_2 : xy \in L\}$
2. $A_l(L)=\{x \mid \exists y \in L : xy \in L_2\}$.
The relevant options are:
1. Regular languages are close... |
Closure against left/right quotient with a fixed language |
*I'm not sure if you are looking for an answer to the problem or not, so I don't provide it directly. (I can if you want it, though.)*
You asked:
> What should I do in order to analyze those operators correctly and to determine if the regular languages are closed under them or not?
Your starting approach is ... |
To answer these question, we need allow **any** $L_2$. So let's think that $L_2$ is a very complex language (say, some undecidable language.)
----
Lets start from the easy question: $A_l(L)$ (question part 2). Take $L_2$ to be undecidable, and $L=\{\varepsilon\}$. What happens?
(moral: Always check the "extre... |
Does there exist undecidable languages A and B such that the concatenated language $A \cdot B$ is decidable? But in general, undecidable languages are not closed under concatenation?
Also, can we generalize such undecidable classes? |
Does there exist undecidable languages such that their union/intersection/concatenated language is decidable? What is the physical interpretation of such example because in general, undecidable languages are not closed under these operations?
Also, can we generalize such undecidable classes? |
undecidable languages |
We know that the halting language is undecidable. Let H be its binary encoding. We can also state that complement of H is undecidable. Therefore, union/intersection of H and HComp are $\Sigma^*$ and $\phi$, which are decidable. |
Does there exist undecidable languages such that their union/intersection/concatenated language is decidable? What is the physical interpretation of such example because in general, undecidable languages are not closed under these operations?
What can we say about the kleene closure? Do we examples for it too i.e. c... |
null |
null |
I wonder whether the following language $A=${ $w \in $ {$a,b,c$}$^*$ | #$a+ 2$#$b = 3$#$c$ }
is context free grammar. I can't find any word that would be useful to refute by the pumping lemma, on the other hand it doesn't seems to me as context free grammar. It looks like it has to remember more than a CFG is able. ... |
Does $A=${ $w \in $ {$a,b,c$}$^*$ | #$a+ 2$#$b = 3$#$c$ } a CFG? |
|formal-languages|context-free| |
I wonder whether the following language $A=${ $w \in $ {$a,b,c$}$^*$ | #$a+ 2$#$b = 3$#$c$ }
is a context free grammar. I can't find any word that would be useful to refute by the pumping lemma, on the other hand it doesn't seem to me as a context free grammar. It looks like it has to remember more than one PDA can h... |
Is $A=${ $w \in $ {$a,b,c$}$^*$ | #$a+ 2$#$b = 3$#$c$ } a CFG? |
null |
Yes, it's a CFL. Use the well-known context free language (with the notation $|x|_0$ meaning what you have as #0's in $x$):
$B=\{x\in \{0,1\}^*:|x|_0=|x|_1\}$
and the morphism:
$ f(a)=0, f(b)=00, f(c)=1$
so that
$A=f^{-1}(B)$.
Since the CFL's are closed under inverse morphism, A is a CFL. |
Yes, $A$ is a CFL. Use the well-known context free language (with the notation $|x|_0$ meaning what you have as #0's in $x$):
$B=\{x\in \{0,1\}^*:|x|_0=|x|_1\}$
and the morphism $f:\{a,b,c\}^*\rightarrow\{0,1\}^*:$ $ f(a)=0, f(b)=00, f(c)=111$
so that
$A=f^{-1}(B)$.
Since the CFL's are closed under ... |
{"Voters":[{"Id":303,"DisplayName":"David Lewis"}]} |
I wonder whether the following language $A=${ $w \in $ {$a,b,c$}$^*$ | #$a+ 2$#$b = 3$#$c$ }
is a context free language. I can't find any word that would be useful to refute by the pumping lemma, on the other hand I haven't been able to find a context free grammar generating it. It looks like it has to remember more ... |
null |
Yes, $A$ is a CFL. Use the context free language (with the notation $|x|_0$ meaning what you have as #0's in $x$):
$B=\{x\in \{0,1\}^*:3\cdot|x|_0=|x|_1\}$
and the morphism $f:\{a,b,c\}^*\rightarrow\{0,1\}^*:$ $ f(a)=0, f(b)=00, f(c)=1$
so that
$A=f^{-1}(B)$.
Since the CFL's are closed under inverse... |
{"Voters":[{"Id":303,"DisplayName":"David Lewis"}]} |
I don't know how to solve your problem or show its NP-Hardness but you can find all pair shortest path to convert your graph to metric one, just replace $e_{a,b}$ with shortest path from a→b and if there isn't edge between $a,b$ add new edge with shortest path weight, now you can run some approximation for TSP to ... |
> Are there techniques and/or software tools that can be used to
> construct hard instances of a simple puzzle game (or a simple planning
> problem)?
With "hard" I mean that any solution of the instance is "long" with respect to the input size.
What I have in mind:
- model the puzzle game using a [constraint... |
|algorithms| |
Yes, $A$ is a CFL. Use the context free language (with the notation $|x|_0$ meaning what you have as #0's in $x$):
$B=\{x\in \{0,1\}^*:3\cdot|x|_0=|x|_1\}$
and the morphism $f:\{a,b,c\}^*\rightarrow\{0,1\}^*:$ $ f(a)=0, f(b)=00, f(c)=1$
so that
$A=f^{-1}(B)$.
Since the CFL's are closed under inverse... |
Yes, $A$ is a CFL. Use the context free language (with the notation $|x|_0$ meaning what you have as #0's in $x$):
$B=\{x\in \{0,1\}^*:3\cdot|x|_0=|x|_1\}$
and the morphism $f:\{a,b,c\}^*\rightarrow\{0,1\}^*:$ $ f(a)=0, f(b)=00, f(c)=1$
so that
$A=f^{-1}(B)$.
Since the CFL's are closed under inverse... |
null |
Same holds for the Kleene star (Kleene closure):
set $\text{HP}' = \text{HP} \cup \{0,1\}$ with $HP$ being the halting problem. $\text{HP}'$ is clearly undecidable, and $(\text{HP}')^* = \Sigma^*$, which is regular (thus decidable). |
I wonder whether the following language is a context free language:
$$A = \{w \in \{a,b,c\}^* \mid \#_a(w) + 2\#_b(w) = 3\#c(w)\}$$
where $\#_x(w)$ is the number of occurrences of $x$ in $w$.
I can't find any word that would be useful to refute by the pumping lemma, on the other hand I haven't been able to find a co... |
Is $A=\{ w \in \{a,b,c\}^* \mid \#_a(w)+ 2\#_b(w) = 3\#_c(w)\}$ a CFG? |
Yes, $A$ is a CFL. Use the context free language (with the notation $|x|_0$ meaning what you have as #0's in $x$):
$B=\{x\in \{0,1\}^*:3\cdot|x|_0=|x|_1\}$
and the morphism $f:\{a,b,c\}^*\rightarrow\{0,1\}^*:$ $ f(a)=0, f(b)=00, f(c)=1$
so that
$A=f^{-1}(B)$.
Since the CFL's are closed under inverse... |
null |
All an automaton has to remember is the balance of the equation: $\#_a + 2 \#_b - 3 \#c$. It can do this by maintaining a unary counter on the stack, using two symbols `-` and `+`:
* On encountering $a$, pop `-` if possible, otherwise push `+`.
* On encountering $b$, pop two `-` if possible, otherwise pop `-` and... |
[Converge](http://convergepl.org/about.html) has some pretty impressive meta-programming facilities.
> At a simple level, this can be seen as a macro-like facility, although it is more powerful than most existing macro facilities as arbitrary code can be run at compile-time. Using this, one can interact with the com... |
With reference to features in languages like ruby (and javascript), which allow a programmer to extend/override classes any time after defining it (including classes like String), is it theoretically feasible to design a language which can allow programs to later on extend its semantics.
ex: Ruby does not allow mult... |
Can a program language be malleable enough to allow programs to extend language semantics |
|programming-languages| |
The question is whether the following statement is true or false:
$A \leq_T B \implies A \leq_m B$
I know that if $A \leq_T B$ then there is an oracle which can decide A relative to B. I know that this is not enough to say that there is a computable function from A to B that can satisfy the reduction.
I don't ... |
Turing reducibility implies mapping reducibility |
|reductions|turing-machines| |
null |
The question is whether the following statement is true or false:
$A \leq_T B \implies A \leq_m B$
I know that if $A \leq_T B$ then there is an oracle which can decide A relative to B. I know that this is not enough to say that there is a computable function from A to B that can satisfy the reduction.
I don't ... |
|reductions|turing-machines| |
|computability|reductions|turing-machines| |
The statement is false.
Say B is the Halting problem and $A = \overline B$. Then, given oracle to the halting problem we can easily decide its complement.
However it is not true that $A \le_m B$ since $B\in RE$ and $A\in coRE$ but both are undecidable (i.e., if $A \le_m B$ was true, then $B=HP$ is both in $RE$ a... |
It is false: take $Diag = \{\langle M \rangle \mid M \notin L(M) \}$ and its complement.
Generally $\leq_T$ can be used to reduce a problem to its complement while $\leq_m$ cannot.
If you want to know see more kinds of reductions and examples that they are different I suggest having a look at "Classical Recursion... |
It occurred to me belatedly, after I wrote the last response, that the teacher's definition of continuity that I was explaining in my response is the *topological* notion of continuity. The *algebraic* formulation of continuity that is usually mentioned in Computer Science text books hides all the topological intuitio... |
"Is it theoretically feasible?*
Of course, it is. One can always write an interpreter in a language ($L$) for another language ($S$), and write programs in the new language. People do not often do this because it might involve a lot of work to write such an interpreter and there will be a performance hit (a factor... |
null |
i have developed 2 algorithms and now they are asking me to define the running time.
The problem i approached is to develop a linked list version (Singly) of manipulating polynomials. The two main operations are ADDITION and MULTIPLICATION:
In general for Lists the running for this 2 operations are:
- Addition:... |
Running time - Linked Lists Polynomial |
|algorithms|algorithm-analysis| |
Given the worst-case for $n$, we can construct the worst-case for $n+1$ as follows: we do a 'swap cycle' as follows: we take $n+1$, put it in $a[0]$, and we swap $a[0]$ with the maximal element of its children, which is $a[1]$ or $a[2]$, which we again swap with the maximum element of its children and so on, until we l... |
[Converge](http://convergepl.org/about.html) has some pretty impressive meta-programming facilities.
> At a simple level, this can be seen as a macro-like facility, although it is more powerful than most existing macro facilities as arbitrary code can be run at compile-time. Using this, one can interact with the com... |
Do there exist undecidable languages such that their union/intersection/concatenated language is decidable? What is the physical interpretation of such example because in general, undecidable languages are not closed under these operations?
What can we say about the kleene closure? Do we have examples for it too? I... |
null |
I have developed 2 algorithms and now they are asking me to define the running time.
The problem I approached is to develop a linked list version (Singly) of manipulating polynomials. The two main operations are **addition** and **multiplication**:
In general for Lists the running for this 2 operations are:
- A... |
null |
Most research does not actually publish the type checking algorithms for full blown programming languages. You will find some formalisations of a large part of the type systems for full programming languages, such as the work done by [Drossopoulou and Eisenbach for Java][1] or [Nipkov et al's work on C++][2]. More ofte... |
null |
I have developed 2 algorithms and now they are asking me to define the running time.
The problem is to develop a singly linked list version for manipulating polynomials. The two main operations are **addition** and **multiplication**:
In general for lists the running for these 2 operations are:
- Addition: Time... |
null |
null |
It occurred to me belatedly, after I wrote the last response, that the teacher's definition of continuity that I was explaining in my response is the *topological* notion of continuity. The *algebraic* formulation of continuity that is usually mentioned in Computer Science text books hides all the topological intuitio... |
Closure against right quotient with a fixed language |
|algorithms|algorithm-analysis|runtime-analysis| |
I have developed 2 algorithms and now they are asking me to define the running time.
The problem is to develop a singly linked list version for manipulating polynomials. The two main operations are **addition** and **multiplication**:
In general for lists the running for these 2 operations are:
- Addition: Time... |
|algorithms|algorithm-analysis|runtime-analysis| |
I am starting a personal bibliographic research on type-checking algorithms and want some tips. What are the most commonly used type-checking algorithms, strategies and general techniques?
I am particularly interested in complex type-checking algorithms that were implemented in widely known strongly static typed lan... |
|algorithms|programming-languages|reference-request|type-checking| |
There are a number of well-studied strategies; which is best in your application depends on circumstance.
* ***Improve worst case runtime***
Using problem-specific insight, you can often improve the naive algorithm. For instance, there are $O(c^n)$ algorithms for Vertex Cover with $c < 1.3$ [1]; this is a [*huge*... |
The multiplication algorithm has a chracteristic of O(log(n)) because of the actual multiply operation can be divided into seperate sub problems, "multiply". But, the complexity becomes worse when you have to go through the entire result list again in the "insertTerm" subroutine which is called in the inner while loop ... |
The multiplication algorithm has a characteristic of $O(\log(n))$ because the actual multiply operation can be divided into separate sub problems, "multiply". But, the complexity becomes worse when you have to go through the entire result list again in the "insertTerm" subroutine which is called in the inner while loop... |
null |
A problem in combinatorial optimization. Given a set of items with both weight and value, determine the number of each item to include in a collection so that the total weight is at most a given limit and the value of the collection is maximized. |
null |
You have three options in general: The first one is to **consider special cases of your problem**. In some special cases, your problem might be solvable polynomially e.g. determining whether there exists a simple path from $v_i$ to $v_j$ to $v_k$ in an arbitrary directed graph $G$ is NP-Complete but it will be polynomi... |
null |
As I understand it, the problem you are interested in is **Bounded PlanSAT** which asks whether there is a solution of length $k$ or less. **PlanSAT** on the other hand asks whether there exists *any* plan than solves the problem. **Bounded PlanSAT** is, for example, decidable even if we add function symbols to our lan... |
As I understand it, the problem you are interested in is **Bounded PlanSAT** which asks whether there is a solution of length $k$ or less. **PlanSAT** on the other hand asks whether there exists *any* plan than solves the problem. **Bounded PlanSAT** is, for example, decidable even if we add function symbols to our lan... |
As I understand it, the problem you are interested in is **Bounded PlanSAT** which asks whether there is a solution of length $k$ or less. **PlanSAT** on the other hand asks whether there exists *any* plan than solves the problem. **Bounded PlanSAT** is, for example, decidable even if we add function symbols to our lan... |
I applied the Master theorem to a recurrence for a running time I encountered (this is a simplified version):
$$T(n)=4T(n/2)+O(r)$$
$r$ is independent of $n$. Case 1 of the Master theorem applies and tells us that $T(n)=O(n^2)$.
However, this hides a constant dependent on $r$ in the big-oh notation: our recurr... |
Master theorem and constants independent of $n$ |
|algorithm-analysis|asymptotics|recurrence-relation| |
|programming-languages|semantics| |
null |
It's well known that [Monotone polygon](http://en.wikipedia.org/wiki/Monotone_polygon) plays a crucial role in [Polygon triangulation](http://en.wikipedia.org/wiki/Polygon_triangulation).
>**Definiton:** monotone polygon - a polygon $P$ in the plane is called monotone with respect to a straight line $L$, if every l... |
Testing Polygon for Monotonicity |
|algorithms|computational-geometry| |
It's well known that [Monotone polygon](http://en.wikipedia.org/wiki/Monotone_polygon) plays a crucial role in [Polygon triangulation](http://en.wikipedia.org/wiki/Polygon_triangulation).
>**Definiton:** monotone polygon - a polygon $P$ in the plane is called monotone with respect to a straight line $L$, if every l... |
|algorithms|algorithm-analysis|asymptotics|recurrence-relation|mathematical-analysis| |
Use a recursion tree (otherwise known as the _proof_ of the Master Theorem). I'll assume here that $r>1$, since otherwise the recurrence never bottoms out.
* The root of the recursion tree for $T(n)$ has value $nr^2$.
* The root has $r^2$ children, each with value $(n/r)r^2 = nr$. Thus, the total value of all c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.