instruction stringlengths 35 29.1k |
|---|
This particular code is written in C.
double foo(n)
{
int sum=0,i;
if(n==0) return 1;
else
for(i=0;i<n;i++)
sum+=foo(i);
return sum;
}
The Question given is: Calculate the space complexity of the following function.
My Solution: foo(x) never occupies more than x cells on the c... |
Assuming there is a machine which can effectively calculate functions not computable by a TM (or the Church-Turing thesis as false) What can we say about aTM solving a problem encoded by this machine...
Q1. Is there a not trivial example of a Turing decidable problem which still remains decidable once encoded with a n... |
Production is said to be of the form $u \to v$. I want to know if you distinguish $u$ from $v$ giving them some distinguishing names, like LHS/RHS or something alike.
|
I had a question about altering a text file. I have data in the following format.
1 a,b,c
2 d,e
3 a, l, m,n
Note that some of them have spaces after the coma
Now I have to resort the data in the following format
1 a
1 b
1 c
2 d
2 e
3 a
3 l
3 m
3 n
Now my plan is to first parse the data, and hold a count of how many... |
Input: Planar graph $G$ and its embedding in sphere $\Pi$, edges $e, f \in E(G)$ and integer $k$.
Output: The set of closed walks in $G$ using $e$ and $f$ which contains $k$ faces of $G$. In other words the set of close walks in $G$ via $e$ and $f$ which each one partition $\Pi$ into two set of faces which one is of si... |
I am experimenting with implementing minimal LR(1) algorithms/techniques, but I find it very difficult to verify the correctness of what I've implemented.
Is there a fast algorithm to determine if two LR(1) action/goto tables accept the same language, given that they use the same grammar rules?
Or preferably a stronger... |
Problem:
You are to collect a total of $N$ litres of red and $M$ litres of blue liquid. For doing job $i$ for time $t$, you get $a_i t$ litres of red and $b_i t$ litres of blue liquid. $t$ need not be an integer. At a time you can only do one job. You can choose some (or all) of the jobs and do it for your desired ti... |
Is there any other options of calculating integral instead of using quadratures? I know that also we can calculate spline function or use monte-carlo method but do you know something else?
|
I'm looking to do natural language parsing and looking for how the CFG (or CSG) should be defined for English.
Surely one'd expect to find one from the internet already, but do you know where?
It needs to be in "formal grammar" form, not an implementation (e.g. a Python library).
It has to allow for as wide range of s... |
Given string $S$ of length $n$, count the number of distinct permutations $P_n$ of a string of length $2n$ such that each of them contains $S$ twice as an interwoven subsequence.
Example. $S=abc$. There are 5 permutations: $abcabc$, $abacbc$, $ababcc$, $aabcbc$, $aabbcc$.
If each character of $S$ appears only once, the... |
There is such a grammar
string_literal ::= " { graphic_character } "
The double-quotes that you see must appear in the user program and curly braces mean "any number of graphic characters in the string". The characters are defined further
graphic_character ::= basic_graphic_character | lower_case_letter | other_speci... |
I'm developing a program that has some entities (things) that are "classified" according to "relevancy". Sort of like search engine (think PageRank).
Therefore, I'm looking to implement an automaton, which I think should handle "value hierarchies". What I mean is that each "next possible state" should have a value that... |
I am having data where I would be given customers and there priorities. The priority would be food type and there flavours.
In total there are N food type and 2 flavour (spicy and non spicy) so in total there are 2N choices to make.
Each of the customer has a set of food types they like and they are satisfied if there... |
I've just found the finite state transducer.
Since the FST processes two tapes: one for input, one for output,
shouldn't it be possible to use FST to "pack together" some compiler stages, such as Syntactic Analysis and Semantic Analysis.
The FST could take in tokens and output semantically analysed code.
|
I have a directed graph that has a source node and a sink node and a subset of marked edges.
I need to find a path from source to sink that contains at least one marked edge and is cycle-free.
|
Let $h$ be the homomorphism defined by
$$
h(a) = \mathtt{01}, \quad h(b) = \mathtt{10}, \quad h(c) = \mathtt{0}, \quad h(d) = \mathtt{1}
$$
and extended to strings in the usual way. Then the inverse function $h^{-1}$ is defined by
$$
h^{-1}(w) = \{z\in\{a,b,c,d\}^*\mid h(z)=w\}
$$
for any $w\in\{0,1\}^*$. For any such ... |
I'm interested in how fast SVMs can classify new data with $c \in \mathbb{N}_{\geq 2}$ classes and $n \in \mathbb{N}_{\geq 1}$ features.
Example for Neural Networks
For neural networks, this depends very much on the architecture. For supposing you only have one hidden layer with $3n$ neurons, you would have a $n:3n:c$ ... |
I want to know how far a type system in a programming language can be beneficial. For example, I know that in a dependently typed programming language, we can create a Vector class incorporating size of the vector in the type signature. It is like a de-facto example. We can also write a function append using those sign... |
In NLP, does the lexer have to tag the tokens before the parser?
I.e. does the lexer have to classify the tokens to morphological categories before the parser?
I'm thinking yes, but is this also the only way to do the parsing?
|
Every undecidable problem that I know of falls into one of the following categories:
Problems that are undecidable because of diagonalization (indirect self-reference). These problems, like the halting problem, are undecidable because you could use a purported decider for the language to construct a TM whose behavior ... |
I'm speculating that this is very much known in NLP, but as I've not studied NLP, I don't know what concepts are related to this:
Basically I have entities that are connected by some strings. I want to do semantic analysis using this kind of constructs. I.e. by checking whether a given sentence has entities (the yello... |
How does the NFA decide in a state where there are multiple equally valid "next states"?
Such as here:
How does it decide on which state it takes to with 1?
|
Is there a way to randomly shuffle an array using only a source of random boolean values? SO to clarify, shuffle using true /false only, and not integers or decimals.
For this question, I'm specifically excluding an approach whereby the booleans are just arranged into an integer and then it's used in a Fisher-Yates sh... |
E.g. the algorithmic problem of sorting:
input: sequence of some objects;
output: reordering of sequences such that some relation works for each next element of a sequence.
Right? So what's the instance of a problem?
So instance could be:
input type: integers; relation in the output: $\geq$.
or instance is some spec... |
In the Wikipedia page on the Karp–Lipton theorem it is mentioned that $$\Sigma_2\not\subseteq\mathsf{SIZE}(n^k)$$ (which is known) is not same as $$\Sigma_2\not\subseteq\mathsf{P/Poly}$$ (which is open). I was of the opinion $\mathsf{P/Poly}$ referred to polynomial size circuits which seems same as $\mathsf{SIZE}(n^k)$... |
I have just completed a dynamic programming exercise on LeetCode (Coin Change). I tried a top down approach, but it failed for the larger inputs, whereas the bottom up approach worked for all inputs. Is the top down approach significantly slower because of the recursion?
I thought that bottom up approaches needed to co... |
I am given $n$ lines, in the form $y=ax+b$, where
there are no two lines with the same $a$
no three lines intersect in the same point
no vertical lines
I need to find in time $O(n\log n)$ an $x'$ such that for any $x>x'$ there are no line intersections with that $x$ value.
For example consider the lines on the imag... |
Let:
$$S \to AC \mid BC\\
A \to aAb \mid aA \mid a\\
B \to aBb \mid Bb \mid b\\
C \to Cc \mid c$$
I need to find if:
the word $aabbbcc $ is in the grammer, and if so to write a very left series, and the tree.
what is the languege that the grammer creates?
to tell if the grammer is ambiguous
My try:
Yes, $aabbbcc$... |
It is said that attributes supply some semantic information to the grammar. Meantime, the same attributes let you to resolve ambiguities. Text books agree that it is worth haveing a CF grammar which admits ambiguities because the ambiguities will go away anyway once you evaluate your AST with attributes anyway. For thi... |
TL;DR
Which sort algorithm:
Works in multiple passes.
Performs less and less of the total work at each subsequent pass.
When visualized, makes it clear that the decreasing amount of work at each stage is the result of "reaping the benefits" of the work done in previous stages.
The Long version
My nephew is having tro... |
Histograms of oriented gradients for human detection seems to be the paper from which all other papers cite when they use HOG features. However, this was the only description I could find in it:
[...] In practice this is implemented by dividing the image window into small
spatial regions (“cells”), for each cell acc... |
I want to extract "best" sentences from the given (html) documents. Let me illustrate this with an example. I have a word "determine". Now I have hundreds of html files having paragraphs and sentences that contain this word. Out of those sentences, I want to collect and score only those that are capable of describing o... |
My problem is the following:
Input: a set of $m$ non-negative integers $\{b_1,...,b_m\}$ and a parameter $n$ with $n<m$.
Output: $n$ sets of 3 numbers
Task: Cut the $b_i$'s into $3n$ integers such that we can gather these numbers in $n$ sets of 3 elements where all the elements in a set are the same.
Example (with $m=4... |
Since Regular languages $\subset$ Context-free languages, then Regular languages are Context-free languages?
Why is the terminology so different then?
To me these seem like a totally different class of languages, based on the terminology, even though they're "variations" of Context-free languages.
How about calling Reg... |
I am studying Software Engineering and I have different LTL formulas for which I have to determine if they are valid, unsatisfiable or neither.
Here are the formulas :
(<>[]p ∧ <>[]q) → <>[](p ∧ q)
([]<>p ∧ []<>q) → []<>(p ∧ q)
([]<>p) ∨ ([]<>¬p)
([](p → <>q)) → (p → <>q)
([]false) → (<>false)
I don't really understa... |
If the language is implementable as mere DFA (i.e. it's a regular language), then why would one need a parsing algorithm such as Earley?
Regular languages are a subset of context-free languages, but what advantages would call for Earley over a DFA in the case of a regular language?
E.g. in this example:
https://en.wik... |
I'm new in this area of complexity and I'm trying to get into it by understanding basic proofs.
I want to prove that if $L\in P$, so $L^k\in P$, where $k$ is non-negative integer.
How to prove it in the "official" way?
|
I know that NAND gates can be used to create circuits that implement every truth table, and modern computers are built up of NAND gates. What is the theoretical link between NAND gates and Turing completeness? It seems to me that NAND gate circuits are closer to finite automata than Turing machines. My intuition is tha... |
Can the context-free grammar model the Kleene star * operation of regular expressions?
If the CFG is reducible to not containing $\epsilon$ productions, as per:
Any context-free language can be converted into an
equivalent grammar in which at most the start variable
derives the empty string
then
how can it express e.g... |
One way to deal with the problem of collisions for a hash table is to have a linked list for each bucket. But then the lookup time is no longer constant. Why not use a hash set instead of a linked list? The lookup time would then be constant. For example, in C++ the hash table could be defined as:
unordered_map<int, un... |
Let's define distance (taxicab metrics) between two points $(x_1, y_1)$ and $(x_2, y_2)$ as
$$|x_2-x_1| + |y_2-y_1|$$
Initially, there are given empty set of points.
I think how to find maximum distance between two arbitrary points (among inserted points). Possible operations are:
1. Insert point
2. Delete point
3. F... |
In wikipedia there's the definition for "Proper CFG".
A context-free grammar is said to be proper, if it has
$$\text{no unreachable symbols}: \forall N \in V: \exists \alpha,\beta
> \in (V\cup\Sigma)^*: S \stackrel{*}{\Rightarrow} \alpha{N}\beta$$
$$\text{no unproductive symbols}: \forall N \in V: \exists w \in
> \S... |
When developing a CFG, I find that one can be confused about whether the grammar is correct, i.e. whether it recognizes only the required strings and not other strings.
But this can be hard to see?
Are there techniques and tools for "proof-reading", whether the grammar is correct and succinct enough?
|
Context free languages that has only one non-terminal is a proper subset of context free languages and they does not contains regular set. Since, CFL is more powerful than FSM and contains regular set, there must be some languages that requires more than one non-terminal. How can I show or proof this formally?
|
The pumping lemma for regular languages states:
Specifically, the pumping lemma says that for any regular language L there exists a constant p such that any word w in L with length at least p can be split into three substrings, w = xyz, where the middle portion y must not be empty, such that the words xz, xyz, xyyz, x... |
I'm currently reading Feynman Lectures on Computation and got stuck in problem 3.1 which says
Suppose we feed a sequence of 1's and 0's - a binary number -
into a machine. Design a machine which performs a pairwise sum
of the digits, that is, one which takes the incoming digits two at a time and adds them, spitt... |
I need to bulid a context-free grammar for
$\qquad \mathscr{L_4}=\{w\in\{a,b,c\}^* \mid w\text{ is not palindrome at all}\}$
Not palindrom at all:
We will say that a word $w$ is not palindrome at all if for all $i$ such that $1\leq i\leq |w|$ the $i$ letter from the beginning of $w$ is not the same like the $i$ lette... |
Maybe a newbie question, but why when we analyze algorithms do we focus on asymptotics? It seems to me the performance of algorithms on finite input sizes (after all, problems are rarely infinitely large) should be as important or more so than when they tend to infinity. Do things simply become too complicated and nu... |
I'm having some trouble figuring out where the "Carry in" value comes from in respects to a one bit full adder diagram. I understand the below half adder,
but my question is: is the the output of the bottom-most AND gate in the bottom diagram equal to the output "C" in the top diagram (Assuming A and B are constant t... |
The DFA is a 5-tuple ($Q,\sum, \delta, q_0, F$)
where
-finite set of states ($Q$)
-finite set of symbols called the alphabet ($\sum$)
-a transition function ($\delta: Q \times \sum \rightarrow Q$)
-an initial or start state ($q_0 \in Q$)
-a set of accept states ($F \subset Q$)
Since in practice (programmatic implementa... |
Stochastic gradient descent with a batch size of 1 is apparently used to learn from single examples as they arrive, but I don't understand why you would use such a small batch size instead of batching training inputs together.
|
The linear grammar is a grammar that's either left, right or left and right linear.
The context-free grammar can contain any kind of productions of non-terminals and terminals.
All linear grammars are context-free grammars.
But what is useful about distinguishing linear and context-free separately?
|
From what I can see, parser combinators are equivalent to scannerless parsing. I do not see this stated in implementations of scannerless parsing page, nor in the parsing combinators page, neither in the google generally. But, it seems they are. I didn't code the low-level rules separately or using different syntax th... |
We know $\mathsf{P=BPP} \implies \mathsf{NEXP\not\subseteq P/Poly}$ or permanent does not have polynomial sized circuits. However permanent needs superpoly circuits imply $\mathsf{NEXP\not\subseteq P/Poly}$ since $\mathsf{P^{\#P}\subseteq PSPACE\subseteq NEXP}$. So why dont we just say $\mathsf{P=BPP} \implies \mathsf... |
I'm learning vantage point trees, and I met this while reading the paper Data Structures and Algorithms for Nearest Neighbor Search in General Metric Spaces by Peter Yianilos (Proceedings of SODA 1993, SIAM, pages 311–321; PDF). The following pseudocode appears in Algorithm 1.
$$\begin{align*}
\hspace{2em}&\hspace{-2e... |
Complexity zoo https://complexityzoo.uwaterloo.ca/Complexity_Zoo:D#dtime states $DTIME(f(n))$ with $PP$ oracle is not in $P/Poly$ if $f(n)$ is superpolynomial.
We know $SUBEXP=\cap_{\epsilon>0}DTIME(2^{n^\epsilon})\not\subseteq DTIME(p(n))$ for any polynomial $p(n)$.
So do we have $SUBEXP^{PP}\not\subseteq P/Poly$? So ... |
I'm trying to find the ambiguity in this grammar so I can remove it and convert it to LL(1), however for the life of me, I can't find the ambiguity. Moreover, I think there is cycle between X and Y and I could not find a solution to solve this.
1) X -->YX|$
2) Y --> ε|A|let A in Y|let A in E end
3) A--> x=E
4... |
Are there problems the decidability of which is unknown but it is known for certain that the problems are less hard than the halting problem.
|
My university's automata theory book claims that the following claim can be proved by induction but it doesn't bother showing the proof.
I've tried to prove it myself but I got stuck at the Inductive Step.
Let $G=(V,T,P,S)$ be a context free grammar.
Prove by induction on $n$ where $n\geq 1$ that:
For every $w\in T^*... |
Does checking for correctness belong predominantly to "semantic analysis"?
Or is it reasonable to be done in earlier phases (in a compiler like construction) as well? Mainly in syntax analysis. Or is syntax analysis often/always "formal", rather than semantical?
http://courses.cs.vt.edu/cs1104/Compilers/Compilers.020.... |
As the question states, how do we prove that for every L ∈ L2 (context-free class of languages) is true that L ∈ NTIME(n)?
Can anyone point me to a proof or outline it here? Thanks!
|
I was making a program for solving 2 SAT problems, using Krom's algorithm. I did not found a lot of information searching in Google, so I used Wikipedia's description of Krom's algorithm to implement it but I'm stuck in the last step.
If I understand it well, the algorithm could be resumed in this:
1) You have to reduc... |
Suppose we have an $n\times n$ array $A$ of non-negative real numbers in which the sum of each row and each column is $1$. We want to find $n$ entries of the array $(x_1,y_1), \dots, (x_n,y_n)$ such that
each $A[x_i,y_i]>0$ and
no pair $(x_i,y_i),(x_j,y_j)$ are in the same row or column (i.e., $i\neq j$ implies that ... |
I've been writing codes to solve a standard partition problem. I've investigated brute force, greedy, Karmarkar-Karp and complete Karmarkar-Karp algorithms.
Standard partition problem: divding a set into two subsets such that the difference between the
sums of the subsets is minimized.
I'm also looking at a non-sta... |
Let's say we have a context-free grammar for the language $a\mbox{*}b\mbox{*}c\mbox{*}$. Is there a way to determine a lower bound for the number of nonterminals in this grammar? I'm pretty sure you need at least 2, but I haven't been able to prove it.
|
$NEXP$ smallest class above $ACC^0$ that we know is separated from $ACC^0$.
We do not know if either $NP$ or $P/poly$ is in $ACC^0$.
Suppose every problem in $NP$ can be solved in polynomial time with polynomial sized advice string (that is $NP\subseteq P/poly$ holds) however the circuit that computes it needs only $A... |
Is there a minimum number of non terminal we need to use in order to simulate a finite automata with n states? When we try to convert a language accepted by NFA to context free language, do we need n number of non-terminal to store n states in the NFA?
|
It is known that Markov decision processes (MDPs) can be solved using linear programming (see page 24 of Carlos Guestrin's PhD dissertation). The linear program is:
$$min_{V(x)} \sum_x \alpha(x)V(x)\\
\text{subject to: } V(x) \ge R(x,a) + \gamma\sum_{x'}P(x'|x,a)V(x')\text{ for all }x\in X, a\in A$$
where $V(x)$ is the... |
If the alphabet is countably infinite, then is the number of finite-length strings over this alphabet countably or uncountably infinite?
|
With the context-free grammar in Chomsky's form:$$S\to BA|AC|b\\A\to AA|AB|CC|a\\B\to AS|BB|CA\\C\to AB|SS|b$$
I need to:
run the CYK (Cocke-Younger-Kasami) algorithm and decide if I can derive the word $baabb$ from the context.
write the left derivation.
My try:
$1.$
$$
\begin{array}{c|lcr}
i\bigg/j & 1 & 2 &... |
I've read a proof explaining why $A_{\mathrm{TM}}$ is undecidable, and I don't seem to understand why we need to give the opposite of $H$ function $D$ itself as input.
Here's the copy-paste of that proof (link: https://courses.cs.washington.edu/courses/cse322/04au/Lect10.pdf):
$A_{\mathrm{TM}} = \{\langle M,w\rangle\mi... |
I am trying to prove the following theorem:
For every derivation-tree in a context-free grammar $G=(V,T,P,S)$ there exists at most one leftmost derivation.
My partial proof by contradiction (I stucked at Cases (2) and (3)):
Let $G = (V,T,P,S)$ be a context-free grammar.
Suppose that for some derivation-tree there are... |
What algorithm to apply when a graph have cycles ("circuits") and some negatives values in order to find the shortest path from $x1$ to all vertices? For instance in the following graph?
I know I can't use Djikstra...
|
In order to prove that 3-coloring is decidable, is it sufficient to say:
Each node in the graph has 3 possible colors
Therefore we can enumerate over all $3^n$ possibilities and then check that no two edges connect nodes with the same color
Does that prove that 3-coloring is decidable? Or do I need to construct a T... |
I proved by induction that every AVL tree may be colored such that it will be red black tree. The problem is that I can't see an error in my proof. Look at my proof.
Induction for height.
Let's assume that it is truth for each AVL tree of height at most $h$.
Let's consider AVL tree $T$ of height $h+1$. Now, let's con... |
This may be a ridiculous question, but is it possible to have a problem that actually gets easier as the inputs grow in size? I doubt any practical problems are like this, but maybe we can invent a degenerate problem that has this property. For instance, perhaps it begins to "solve itself" as it gets larger, or behav... |
Where can I find a list of algorithms organized by complexity.
I'm curious of what O(n), O(NlogN) algorithms are there.
These are the most useful for large datasets.
I'm aware of this but it isn't organized by complexity:
https://xlinux.nist.gov/dads/
Thanks
|
How do I transform the following formula into conjunctive normal form?
$$
A \land B \Leftrightarrow B \lor A
$$
|
I've read multiple time sentences similar to
Finally, for standard image classification bag-of-words
features based on SIFT descriptors have been found
critical for high performances. We first compute a
standard SIFT discriptor at regular grid points over
the whole image.
Source: "Multi-class image segmentati... |
I am looking for fast procedures for polygon matching, i.e. checking polygon similarity under different transforms
translation only,
translation + rotation,
translation + scaling,
translation + rotation + scaling (= similarity).
The matching can be partial, meaning that there can be a good match on a significant frac... |
I'm dealing with a BIP question, that represents a graph problem.
The goal is finding the graph problem.
I've spend a lot of time trying to solving this question but I couldn't find the answer to that question.
All I'm given is the set of constraints and the objective function:
I'd really appreciate your help, no full ... |
I'm new to computer science and came across an issue while learning about ripple carry adders. I'm trying to add binary 1+1+1 below (excuse the poor photoshopping). I know the answer should be binary 11, but my sums were 0 and 0 with a carry of 1. Shouldn't my sums be 1 and 1 with a carry of 0? What am I doing wron... |
I am trying to brute force a classical substitution cipher. The problem is that there are $26!$ possible keys. So, I'd like to do frequency analysis to try likely keys first. Then, on the first $n$ tries I will use a dictionary to see if there are actual words in the decryption. That way, I don't need to try all possib... |
Let's define thin AVL tree as AVL tree $t'$ such that contains minimal possible number of nodes among all AVL tree $t$ such that $height(t)=height(t')$.
I am trying to prove that every thin AVL tree may be colored to be red-black tree. I would like to use induction. I tried to do induction by height - but as you cou... |
I've read those words in quite a lot of publications and I would like to have some nice definitions for those terms which make it clear what the difference between object detection vs semantic segmentation vs localization is. It would be nice if you could give sources for your definitions.
|
I have many problems understanding algorithms described in the books.
Well, I'm talking about the mathematical description of a problem.
For example: I don't understand how the math of Unscented Kalman Filter works.
I have spent many days studying good books but for me just code make sense.
I have the basic math from... |
If we consider two predicates:
$b(x)$: x is a boy
$c(x)$: x is clever
Then, there are four statements involving $∀, b(x), c(x), →$ and $↔$ . These are below along with my interpretation of their meaning. Correct me if I am wrong in any of these interpretations.
(a) $∀x(b(x)→c(x))$ - All boys are clever
(b) $∀x(b(x))→∀... |
I encountered some system of ~5000 random nodes connected by ~8000 non-hookean springs, with ~1300 nodes at the boundary fixed as the "wall", the potential of the springs are of the form $dx*e^{(dx/a)}$ where $a$ is a constant and $dx$ the strain (displacement/original length) of the spring, I am using Monte Carlo meth... |
Are the "symbols" of a context-free grammar the same thing as the terminals?
Are the set of symbols and set of terminals the same?
|
I'm trying to compare a custom neural network architecture with other existing ones. I'm quite new to the CS field and I'm looking for desirable properties and/or applications of neural networks(especially recurrent architectures). Are there any?
|
Given an undirected, weighted graph $G=(V,E)$ and two nodes $s,t \in V$ and weight function $w: E \rightarrow \mathbb{N}$. The weight of a (s,t)-cut $ (U, U^C)$ is given by:
$$ w(U,U^C) := \sum_{\{i,j\}\in V :i\in U \land j\in U^C} w(\{i,j\}) $$
Reduce $$ MinCUT:= \{<G,c,s,t,k>\mid \text{There is a (s,t)-cut with weig... |
Binary is the result of using the simplest possible building blocks to hold memory, transistors, entities that can be switched between two states, on or off. We took that idea and ran with it, and it works very well, but I was wondering:
What if we replaced transistors with entities that could transition between more t... |
A definition for terminals and non-terminals of a CFG says that
terminals: The symbols that do not appear at the LHS of productions.
Therefore,
Are all non-terminals of the CFG given by the LHS of productions?
|
So here is the problem:
Say I want to find the only possible combinations to find the sum of a specific number using only the numbers 1, 2, & 3 with a specific number of additions.
I know this sounds confusing, but let me give an example:
Say we were trying to find the number of possible combinations to add up to the ... |
I'm a bit confused about this question:
"Multiple jobs can run in parallel and finish faster than if they had run sequentially. Suppose that two jobs, each needing 10 minutes of CPU time, start simultaneously. How long will the last one take to complete if they run sequentially? How long if they run in parallel? Assum... |
Given two domains, $D_1$, $D_2$,
already equipped with Scott (or Lawson) topology,
the product domain $D=D_1\times D_2$
has the Tychonoff product topology, e.g.,
Mathematical Theory of Domains, page 124.
I can't seem to find a similar discussion of the function space topology
for $D=[D_1\rightarrow D_2]$,
though ... |
I am studying for NP problems.
To prove k-CNF-SAT is NP-hard, there must exists something that can be reduced to k-CNF-SAT. So what I thought is to reduce 3-CNF-SAT to k-CNF-SAT and reduce k-CNF-SAT to 3-CNF-SAT both proves that it is NP-hard.
I know that 3-CNF-SAT is NP-Complete, because of its number of literals, ... |
Is there an arithmetic problem that is known to be in $TC^{i+1}$ but not known in $TC^i$ for any $i\geq0$? Concrete examples for $i=0$ would be of most utility however any arithmetic example is fine.
|
Let's say that I make a binary search tree and store it in an array so that I end up with an array that is more cache friendly to binary search compared to a sorted array.
The binary tree is full on all levels except possibly the last level, where it is filled from left to right.
Specifically index 0 is the root node, ... |
While reading about minimal instruction set computer I found out that one needs at least (for example) the ability to increment or decrement the value stored in register, a test for zero and a jump.
A machine with such instruction set would be Turing-complete, correct? Is this called "Counter machine"?
But then I found... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.