instruction stringlengths 35 29.1k |
|---|
I'm trying to figure out if a 2-Dimensional Turing Machine can be represented by any 1-tape TM. I came across the Cantor Pairing Function when doing some research. And based on my understanding and how the pairing function works, any 2D TM can be represented by a 1-tape TM if it uses that said function.
Am I right? Can... |
I am studying pushdown automata and I am working on a problem that asks to generate a PDA that accepts the following regular languages:
Intersection of L1 and L2
L1 = L (aaa* bab)
L2 = L (aab* aba)
I can't tell if this is even possible because I don't see any common string that would be in both languages.
If it is n... |
In Spanner, TrueTime & The CAP Theorem, Eric Brewer writes:
One subtle thing about Spanner is that it gets serializability from
locks, but it gets external consistency (similar to linearizability) from TrueTime [emphasis added].
What is the definition of external consistency, and how does it differ from linearizabi... |
I was wondering if the following property holds true:
$$\forall A, B \subseteq \Sigma^* : A \leq_m B \lor B \leq_m A$$
And the same for Turing reductions
$$\forall A, B \subseteq \Sigma^* : A \leq_T B \lor B \leq_T A$$
|
Given a relations $P$ and $Q$ on $S$, what are the most efficient algorithms to find whether the relation satisfy the constraints $P \cup Q = S \times S$ and $P \cap Q = \emptyset$?
If it helps, for my application the elements of $S$ are strings. Apologies if my question is not up to standard, this is my first question... |
I have $n$ items that have a total of $k$ properties. Each item can have any number of properties, from $1$ to $k$. There is no upper limit to k (the lower limit is $\lceil log(n) \rceil$). The items are distinct, so they have different properties.
The query must only contain AND logical operators. For example, a query... |
It might be a very basic question.$\\$
I am considering the SVM optimization problem here.$\\$
In a training set where the data is linearly separable, and we are using a hard margin (no slack allowed), the support vectors lie along the supporting hyperplanes but is the inverse true that all points lying along the suppo... |
Let $f : \mathbb{N} \to \mathbb{N}$ be an integer function. For a language $L$, define
$$f(L) = \{w \mid \exists x : |x| = f(|w|) \text{ and } wx \in L\}$$
For example, if $f(n) = n$ this is just the "halving" operation, and regular languages are well known to be closed under this -- just simultaneously walk forwards ... |
A heuristic function is said to be consistent, or monotone, if its estimate is always less than or equal to the estimated distance from any neighboring vertex to the goal, plus the step cost of reaching that neighbor.
I know I can be sure if a heuristic is consistent by verifying the property for each couple (node, c... |
I took part in the development of a knapsack-based asymmetric cryptosystem, and am currently planing to launch a campaign to promote it.
Before we actually do, it occurred to me to research...
what were all the attempts of knapsack-based cryptosystem, ever devised and which of them have been broken?
Thanks in advance.
|
Consider the following statement:
If $x$ and $y$ are integers and $z$ is a nonnegative integer and $x + z = y$, then $x$ is at most $y$.
I'd like to build a sentence for this statement in the model of $(\mathbb{N}, +)$, where $\mathbb{N}$ is the set of nonnegative integers and $+$ is just the relation (where here I d... |
I have a theoritical question about particles-based simulator (Reeves,83). I don't know if my question is relevant and I apologize if not.
On each frame, the system generate particles and attribute to it properties and behaviour (speed, velocity, etc), some of them will die (disappear) after X seconds.
Is because the r... |
[Disclaimer: this is a rather specialized question]
It is known that techniques like Conflict-Driven Clause Learning (CDCL) and back-jumping -- which improved the Satisfiability (SAT) strategies exponentially -- were actually inspired [2] by Constraint Satisfaction Problem (CSP) techniques (so-called nogoods [1], or ge... |
I am confused on the inputs of a Long-Short Term Memory (LSTM) for the slot filling task in Spoken Language Understanding.
Before I worked on this, I implemented a language model with a Recurrent Neural Network (RNN) and then with a LSTM. The input to the RNN and LSTM language models was a one hot vector, which repres... |
As I understand, Decision graph is a directed graph where each vertex is a "Question" (decision to make), and each edge is an "Answer" (decision made for the vertex this edge is coming from). The terminal nodes of that graph is a solution.
Problem: With this structure - each "Answer" can lead only to a single consequen... |
I am currently studying computer science and we were given assignment to implement two algorithm(Insertion sort and Merge sort) and run them in order to track their running times across different input arrays. And ask us to do: "Your task is to run each algorithm 3 times on 5 input arrays with 5, 50, 500, 5000, and 500... |
This is probably a duplicate of this question, but I need a somewhat blunter answer. Let's say I have a polynomial time algorithm that finds an assignment that satisfies more than $\frac{7}{8}$ of the clauses of a satisfiable 3SAT instance. Do I collect my million dollars from the Clay Institute for proving $P=NP$?
|
$(a(aa|b)^*ab|b)((ba|a)(aa|b)^*ab|bb)^*((ba|a)(aa|b)^*)^*|a(aa|b)^*$
I know long algorithmic procedures but since regex is large I tried a lot by substituting common patterns for some regex definition but didn't seem to help.
What can be done so that this regex can be converted to DFA easily.
|
I am working on a bottleneck multicast tree for which I am using bottleneck Dijkstra algorithm.
My question is
1) bottleneck Dijkstra has the same correctness as that of (simple) Dijkstra or not ?
2) if yes then how and if no then how?
Will be happy to see your responses. Thank you
|
Can anyone please help me design an algorithm to solve the broadcast problem in parallel for the structures mentioned?
|
Every acyclic graph can be transformed structurally to a tree. Therefore, every node on odd numbered levels can be colored with color $X$ and every node on even numbered levels can be colored with color $Y$. Is the reasoning valid?
|
I have to find all the paths that have some n-distance from a start node. The destination node is not given. It seems that this problem is very hard to solve because in this scenario I am working with a geographical map, thus there exist cycles as well. Finding all of these paths must take a large amount of time becaus... |
I was wondering what are the current existing internal clustering index for binary data.
I know already the silhouette and Davis Bouldin for euclidian space, i suppose they work as well in binary space using Hamming distance for example, tell me if i'm wrong.
We can use the distance to points from centroid per cluster ... |
I am building software for an investment manager. The investment manager invests money on behalf of his clients.
The investment manager has a model portfolio, of say 20 stocks, each with certain weightage.
Eg: His model portfolio can look like this:
{GOOG: .03, AAPL: 0.4, MSFT: 0.25, TESLA: 0.5, IBM: 0.1, .....}
Now le... |
Is there any puzzle or game which cannot be decided in polynomial time and whose problem description can be easily understood by a kid? If it is a fun puzzle so much the better.
I want to demonstrate to a high school student the difference between P and NP class of problems using an example. Also, if there's some simpl... |
Say, I have the situation where I am looking into all the possibilities to obtain a value of e.g. 20 (exactly) by taking all possible combinations of sums using values from 1 to 5. While doing this, I want to minimize my penalty P. There is no limit to the amount of values I use (I could do 4x5, 20x1 and any other poss... |
I have a 3D triangle mesh with the following properties:
unique vertices (triangles are stored as 3 vertex indices, the indices are stored in a point set backed up with an octree and a tolerance, to ensure that they are unique)
watertight: each edge of the triangle mesh is shared by exactly two triangles
The following... |
You have to sort a given array (assuming nothing more than the elements are totally ordered) which is write once read many (WORM) in constant space i.e using a constant number of variables.
So, my naive approach was to fix the position of one element at a time. But in what order? If I do it first to last then the infor... |
I am trying to prove that the language $L=${$0^n 1^m |m ≤n^2$} is not a context free language. To do so I selected a string $w=0^p 1^{p^2}$. However, I am new to the CFL pumping lemma, and I am not sure if my proof is correct. Specifically, does the value of $i$ need to be the same for all divisions?
My first division ... |
Given that:
A language with very expressive type systems (e.g. Idris) can also have escape mechanisms like foreign function interfaces/unsafePerformIO.
There are proof assistants that can be used to prove some properties of a program written in a language that doesn't have a type system capable of expressing those pro... |
I came up with the following statement:
If there are $X$ nodes of height $h$ in an almost complete binary tree, there can be at most 1 node of height $h$ that is not full.
That is to say, $X-1$ must full and the last node of height $h$ may or may not be full.
Intuitively it seems right, but I can't seem to prove it. ... |
Let's say I want to simulate a very large number of travelers booking flights. For example, a traveler might want to fly from New York to New Delhi. There's no direct flight from New York to New Delhi, but there's a flight from New York to London, and from London to New Delhi, so our traveler books those two flights. E... |
Given a polynomial $f$ with integer coefficients and a prime power $p^i$, I wish to find a root of $f$ modulo $p^i$, provided one exists, in polynomial or randomized polynomial time in the size of the input.
A simple idea would be to use Cantor-Zassenhaus' algorithm to find a root modulo $p$, and then lift it by Hensel... |
I'm trying to understand the Naive Surface Nets algorithm which is related to surface generation out of Voxels. I've learned of it here
So far I understood that the naive surface nets algorithm calculates the "optimal" edge crossings for a given input. Problem is that I don't understand how it's supposed to calculate t... |
Players #1 to #10 with hit probabilities $0.1,0.2,...,0.9,1$ (which are common knowledge) take part in a shooting game.
Rules of the game: Players from #1 to #10 take turns to fire at each other. After round one, survivors repeat the circle (still in the order of #1 to #10). The game lasts many rounds until only one p... |
Why are the 1st 2nd and 3rd normal forms ignored in some Database books/courses?
specifically:
https://lagunita.stanford.edu/courses/Engineering/db/2014_1/about
and
https://www.amazon.com/Database-Systems-Complete-Book-2nd/dp/0131873253/ref=sr_1_4?ie=UTF8&qid=1488557782&sr=8-4&keywords=database+systems
only cover BCNF ... |
In our current project we need to model the following if-statement in linear programming:
If T1 < b < T2 then z = s else z = 0
where T1 and T2 are two integer values (e.g. T1 = 10 and T2 = 100) and s is also an integer value (e.g. 5).
We already know how to model a simpler if-statement with for example A > 0 but we ca... |
Suppose we have a NP-Complete decision problem like independent set or finding matching in graph theory and we change the greatness or smallness of the condition of that problem i.e. change the direction of the inequality in the problem's definition ($ \ge$ or $\le $).
For example in independent set problem when the c... |
The algorithm should return the majority element if it exists (majority meaning that there are $> n/2$ occurrences in the array)
I came up with this linear divide and conquer algorithm, but I'm not sure if it's correct. It returns an array with two elements, the name of the majority element and a number that is less th... |
Looking at the above PDA, I am unsure whether or not it is normalized. Specifically, the loop transition from $q_1$ to $q_1$, because I know a transition must either push OR pop from the stack. Does this mean that there must be two separate transitions to push the * and then pop the *? Or is it normalized as is? Is it... |
I work for a small non-profit that provides transportation for people who need medical treatment. We connect volunteer private pilots who fly people in their own (small) aircraft, typically 3-5 seats.
Several times each year, we provide flights for kids to go to special needs camps. In this scenario, we have a number o... |
I'm currently learning how isosurfaces are extrated from volumetric data. I already understood the original marching cubes algorithm which is based on 3D-voxel data which stores only values of either 1 or 0. For learning purposes I implemented the easier version of it for 2D-volumetric data called marching squares algo... |
Statement:
There are 256 formal languages $L$ with $L \subseteq \{w \in \{a,b\}^*
\ \vert \ \ \vert w \vert = 3 \}$
Answer:
True.
My question is why there are 256 formal languages. If I calculate the possible combinations with length 3 I get 6 combinations:
$M =\{aaa, aab, abb, bbb, bba, baa\}$
Calculalting th... |
I am given a matrices each with 4 columns such that each element's value is between 1 to 4. Their is recurring pattern between first two digits while other two are random digits of a row. I need to find a pattern and then reduce it's number of elements. I am new to this topic . I don't need a complete solution just a l... |
In the book The Annotated Turing, Charles Pezold writes:
Because Turing Machines are entirely defined by a Description Number, it might be possible to create a Turing Machine that analyzes these Description Numbers to determine whether a particular machine is satisfactory or unsatisfactory. Turing proves this is not t... |
I would like to know if there is a closed form expression from taking the reciprocal of a polynomial so that I can apply polynomial division to deconvolution using parallel fork-join multithreading.
My idea is to multiply the numerator polynomial by the reciprocal of the denominator polynomial using Furer's algorithm ... |
I'm not sure if I get the following definition right:
1.Def: A map $\varphi: \Sigma^{*} \rightarrow 2^{\Delta^{*}}$ is called Substitution iff:
$\forall u,v \in \Sigma^{*}: \varphi(uv)=\varphi(u) \varphi(v)$
$\varphi(\epsilon)=\{\epsilon\}$
My assumption: every string in $\Sigma^{*}$ with the size $>0$ maps to a Lang... |
so I need to prove the following:
Prove that $n-1$ comparisons are sometimes necessary to test whether an array with $n$ distinct elements is sorted in increasing order, for any $n \geq 1$.
The problem comes with the following hint:
Assume an algorithm exists that always correctly tests if the array is sorted using at ... |
Chiba and Nishizeki showed that it is possible to list all $k$-cliques (cliques on $k$ nodes) in time $O(m \cdot a^{k-2})$ where a is the arboricity of the graph and $m$ the number of edges in the graph. http://www.ecei.tohoku.ac.jp/alg/nishizeki/sub/j/DVD/PDF_J/J053.pdf
We have designed an algorithm that can do it in ... |
Fitch's algorithm solves the small parsimony problem - given tree topology and leaf labels, but not internal node labels, find best internal node labels (i.e. best score) for that tree. The score is the number of edges $u->v$ with different labels $L_u \neq L_v$.
I need a variant on Fitch's algorithm when it is known t... |
There is a method that I want to calculate its complexity in asymptotic notation. It calls additional methods(equals and substring) which complexity is $O(n)$. If it was $O(1)$, I could figure out complexity of the calling method. I have tried some operations; however, I'm stuck on calculation with the additional part.... |
I have a set of expressions $E_1 .. E_n$ over boolean variables and I'm looking for an assignment to the variables so that all expressions are satisfied. Normally this would be NP-complete, but I found two particular properties over the set and I'm looking to combine and exploit them.
The idea I have is based on gaussi... |
After the release of the AIGER library to handle and-inverter graphs sometime in 2006 (I think), some circuit SAT solvers were released in 2006-2008, and in a few SAT Races/Competitions there were AIG tracks. However since then it seems the focus has been entirely on either SMT or improving clausal SAT solvers.
Intuiti... |
I would like to know why the following statement
The running time of algorithm $A$ is at least $O(n^2)$
which means the best-case running time of $A$ is $O(n^2)$ is meaningless (CLRS page 53).
But the following is not
The worst-case running time of algorithm $A$ is $\Omega(n^2)$
(used in CLRS page 160).
|
I'm doing my homework, but there's one task that I didn't get the idea.
Task:
Recall the alternative definition for the star of a language A that we gave just before Theorem 2.3.1. In Theorems 2.3.1 and 2.6.2 (which is about closure under union operation), we have shown that the class of regular languages is closed und... |
Given an array, I need to sort the array (if not already sorted) in either decreasing or increasing order so that number of swaps are minimized.
I was thinking of first determining whether it is increasing type or decreasing type i.e. the type in which least swaps would be required and then sort my array in increasing ... |
I am working on the following problem.
There are N vertices and M roads connecting them. Some of the roads are broken. I have to go from vertex 1 to vertex N taking at least one good road and find the minimum number of broken roads taken. If no good road is taken, display −1.
I am trying to use Dijkstra shortest path a... |
The number of ways to split $n$ items into $k$ nonempty unlabelled subsets ($k<n$) is a Stirling number of the second kind.(https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind)
Is there an algorithm to generate all the possible combinations?
|
Where can I download some interesting cellular arrays for Conway's Game of Life? Arrays such as the Gosper glider gun, etc? I can find the images easily enough, but are they available somewhere in binary format? And is there an orderly library somewhere?
|
You can't find a solution online for it that doesn't run in polynomial time complexity, when using dynamic programming. Have all these sites secretly solved P=NP, and no one knows about it?
|
I'm trying to determine correct notation for the given functions which are $f(n) = n$ and $g(n) = (log(n))^{100}$. Moreover, I don't understand while calculating its complexity using limit because calculator shows that it goes infinity, so f(n) is growing faster than g(n). But, I found vice versa. Could you explain me... |
I have to create new language with languages $L_a = \{a\}, L_b = \{b\}$ and with set operations which contains only words
with even length
with odd length and first letter not equal to last letter
So my solution for part 1 is this. Am I rigth?
$L_n = \{aa, bb, ab, ba\}* = (L_a.L_a \cup L_b.L_b \cup L_a.L_b \cup L_b.... |
Given two sets $A = \{a_1, a_2, \dots, a_n\}$ and $B = \{b_1, b_2, \dots, b_n\}$, both consist of positive numbers, this problem is to find a subset $S$ in $\{1, 2, \dots, n\}$ to maximize
$$
\left(\sum_{i \in S} a_i\right)\left(\sum_{i \notin S} b_i\right)
$$
A naive solution is to iterate over the powerset of $\{1, 2... |
I was trying to understand what a reservation table is in the context of pipelining, when I found this reference here, where the author mentions that there are static and dynamic pipelines. According to him/her,
There are two types of pipelines: static and dynamic. A static pipeline can perform only one function at a ... |
My professor has asked me to prove the following:
Prove that we can use an algorithm for linear programming to solve
linear inequality feasibility problems. The number of variables and
constraints used in the linear programming problem must be polynomial
in n and m
I supplied him with an intuitive proof but h... |
(Almost) every algorithm runs in exponential time, or merely in 'pseudo-polynomial' time.
Given a list of integers, does it contain the number 2?
$\mathcal{O}(N)$, where $N$ is the size of input, right?
Wrong. Express $N$ as $2^b$, and it's $\mathcal{O}(2^b)$ and it becomes exponential runtime.
So every problem (basica... |
With efficient I mean of a big O of polynomial time in the number of digits each number has.
|
Consider the following BNF Grammar G:
object-expression ::= id | id ( object-expression ) | object-expression . id
| object-expression [ object-expression ]
| object-expression . id ( object-expression )
I am attempting to construct a set of LR(1) items bas... |
I am trying to find an algorithm that generates all directed multigraphs with a given number of vertices and arcs up to isomorphism (no two generated graphs should be isomorphic). I also want to allow self-edges.
I have done some research on this, and I found the tool "nauty" which can generate graphs up to isomorphism... |
I've been trying to implement this paper from Boris Epshtein, Eyal Ofek, and Yonatan Wexler, the pioneers of Stroke Width Transform .
Having a simple image with random texts, that underwent gray scaling. Then I have produced two edge maps using two different algorithms for output comparison (for later) , Sobel and Cann... |
What are the problems that are in co-NP but not in NP?
i.e, those problems where incorrect strings can be deterministically verified in polynomial time but the correct strings can't be.
|
Given an array a of length n of $-1$s and $1$s, and another input $m$, I was supposed to minimize the longest continuous streak of $1$s or $-1$s after flipping $m$ $-1$s to $1$s or vice versa.
I know how to maximize it but can't figure out how to minimize it. I maximize the number of $1's$ by sliding window method.
Ta... |
I found a proof that shows CFL is closed under inverse homomorphism.
First of all the Definition of an homomorphism and its inverse:
$h: \Sigma^{*} \rightarrow \Delta^{*} \ \ \ h(L) = \{h(w) |w \in L\}$
$h^{-1}: \Delta^{*} \rightarrow \Sigma^{*} \ \ \ h^{-1}(L) = \{w | h(w) \in L\}$
The proof I found works as follows:
... |
Let me define the problems first
Polynomial Identity Testing $(\mathsf{PIT\text{}})$
Given : A polynomial $p$ over some field $\mathbb{F}$.
Decide : Are all coefficients of the monomials of $p$ are equal to zero ?
Polynomial Identity Testing $(\mathsf{PIT1\text{}})$
Polynomial identity testing defined in non commutat... |
Having a simple 2-SAT problem where the equation is simply: $a \lor b$
We have two implications:
$\lnot a \Rightarrow b$
$\lnot b \Rightarrow a$
Thus, in the graph we build we add edges similar to the arrows above.
What exactly do the arrows symbolise in this instance? I've read that they means if $a$ is true, $b$ mus... |
I'm confused about how the bead-tiling algorithm for the Dubins' TSP from this article works:
On the Dubins Traveling Salesperson Problems:
novel approximation algorithms
Ketan Savla, Emilio Frazzoli, Francesco Bullo
http://www-bcf.usc.edu/~ksavla/papers/KS-EF-FB:06h.pdf
What does the algorithm return? Does ... |
Null, Linda; Lobur, Julia: The Essentials of Computer Organization and Architecture, Jones&Bartlett Learning 2006, Ch. 7 Ex 2:
Suppose the daytime processing load consists of 60% CPU activity and 40% disk activity.
Your customers are complaining that the system is slow. After doing some research, you have learned th... |
The same question has been asked here
Some authors define $\Omega$ in a slightly different way: let’s use
$ \overset{\infty}{\Omega}$
(read “omega infinity”) for this alternative definition. We say that $f(n) = \overset{\infty}{\Omega}(g(n))$
if there exists a positive constant $c$ such that $f(n) \geq c\cdot g... |
I was wondering if there are algorithms for finding the shortest path that contains some selected $k$ nodes in a weighted graph. More specifically, the path that we are looking for needs to pass through all the $k$ nodes, but can contain other nodes from the graph and can visit those $k$ nodes in any order. In additio... |
Given two sets, S1 and S2, and their corresponding bloom filters, BF1 and BF2, is there a way to prove that |BF1 ∩ BF2|/|BF1 ∪ BF2| = |S1 ∩ S2|/|S1 ∪ S2| (we can assume both bloom filters are generated using the same set of hash functions)? If not, is there a way to approximate one given the other?
|
Sorry for the confusing title, but I'm trying to find out if a certain algorithm or class of algorithms fits this description. Given an algorithm A, computing A(x) can be computionally easier if A(g) is known, where g is close to x, and it's easier the closer g gets to x. So also, the amount of computation A has to do ... |
I need to prove or disprove if these two languages are same.
So I assume that these lanaguages are same because I think that every word from $\{a,b\}^*$ could be concatenated from two words $x$ and $y$ where $|x|_a = |y|_b$. So $x$ and $y$ must belong to $\{a,b\}^*$, too. Then I can write and prove this:
$\{a,b\}^* \su... |
On Wikipedia it is Written: NP and co-NP are also thought to be unequal.[1] If so, then no NP-complete problem can be in co-NP and no co-NP-complete problem can be in NP.[2]
So Subset Sum is NP-complete (given integers find a Subset that sums to 0).
CoNp is, the set of decision problems for which a "no" answer has a de... |
According to the book, Introduction to Computation And Programming Using Python by John V Guttag, a computer does only two things:
Store data
Manipulate data
But is this all? I mean, without I/O, can a computer be considered useful?
|
I am attempting to understand the inner workings of the open source string matching library Hyperscan.
It takes a multiple-engine approach to the problem of generating string matches, and I'm still in the early stages of following through the debugging output to see how it does what it does.
However, one design decisio... |
We were given a question in class with this FSM and had a debate over what the regex would be and the corresponding accepted strings. Does this FSM make sense as on state 1 there seems to be a choice between going to state 3 or looping on state 1 with the input of b.
![enter image description here][2]
Please forgive t... |
In Vol. 1 Issue 1, Jan. 1958 of the magazine Communications of the ACM, Dr. Saul Gorn discusses the advantages of the computer architecture of Edvac to that of Eniac.
He states that the Edvac had a three-plus-one address word structure, and that the tendencies of his time period were to use one-address hardware and thr... |
Suppose I have 2 possible algorithms: one runs in O(m+n) and the other runs in O(mn). Suppose also that the task is performed on a connected graph with m edges and n vertices. No other information is given about the graph. How do I know which algorithm is faster?
EDIT:
I don't think my question is a duplicate of the qu... |
I'm currently trying to evaluate a CTL* expression and am not sure how to stepwisely evaluate the queries.
For example I have EFG p. This means something like 'there is a path where eventually there exists a state s where from there on, globally p holds true'.
Globally means that for all successors of a state on all ... |
I've been trying to implement this paper from Boris Epshtein, Eyal Ofek, and Yonatan Wexler, the pioneers of Stroke Width Transform .
Having a simple image with random texts, that underwent gray scaling. Then I have produced two edge maps using two different algorithms for output comparison (for later) , Sobel and Cann... |
In this problem, I want to maximize the number of points of K dance moves. There are N possible dance moves.
Each of the dance moves have a point value associated with it which can be positive or negative.
There are also points from transitioning from one dance move to another. We're given an $N\times N$ matrix that ha... |
So I am in the process of learning about LL(1) grammar and converting an ambiguous one into LL(1). I know how to figure out if a grammar (G) is ambiguous, however, I am having trouble converting it to a LL(1) using left factoring.
From my understanding, left factoring is basically factoring out prefixes which are commo... |
Given a non-negative integer $n$ such that $X = \{1,2, \dots, n\}$, a combination of k-tuple and its associated index $pos_k$.
How to compute the associated lexicographic index for any subset of the given tuple of size $k-1$?
For ex: if n = 5, then the associated index of given tuple {1,2,3} = 16.
Given that informati... |
I had a test a couple of days ago and one of the question had 2 statements :
$L^+ = L^\ast$
$L$ contains $\varepsilon$
I had to say does 1 imply 2, does 2 imply 1 or do they both imply each other.
I answered that only 2 implies 1 but the answer is that they both imply each other.
But I don't understand, if $L = \empt... |
I am trying to prove that every finite language is context-free, is there any type of way that I could do it effectively?
|
I have the following problem: given a directed unweighted graph and a set of source vertices, it's needed to find the shortest path to the specified vertex. The mentioned graph has two special extensions:
A graph's edge can be active or inactive depending on edges placed in the path before. In other words, the edge $E... |
On the Wikipedia page for the Pumping Lemma for Context-Free Languages, a language,
$$
\{b^j c^k d^l | j, k, l \in N\} \cup \{a^i b^j c^k d^l | i > 0, j = k = l\}
$$
is introduced. The pumping lemma proof for this supposedly fails because, given a string without a's, you can pump the b's and, given a string with a's, ... |
In a paper I see the following lemma about unlabeled binary trees:
If $s_1$ and $s_2$ are both m-node binary trees, then the number of n-node binary trees containing $s_1$ as a subtree is the same as the number of n-node binary trees containing $s_2$.
It goes on to use this to show that if you want to compute the num... |
I've been trying to implement this paper from Boris Epshtein, Eyal Ofek, and Yonatan Wexler, the pioneers of Stroke Width Transform .
On computing the gradient direction, given the equation:
theta = arctan( Gy / Gx )
where:
theta = is the resulting angle
Gx = is the X gradient component
Gy = is the Y gradient componen... |
Both Deterministic and Non deterministic Finite Automata can recognize the same universe of regular languages. On the other hand, Deterministic Push Down Automata can only recognize a subset of context free languages that Non deterministic Push Down Automata can recognize. Is there any intuitive reason for this? It wo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.