instruction stringlengths 35 11.4k |
|---|
There are two stacks $S_1$ and $S_2$ of books. Each book in stack has a weight. You are given a net weight $W$ of books that can be picked. You have to maximize the number of books that can be picked. Note that each time you can either pick from $S_1$ or $S_2$ only.
eg: $S_1 = \langle 5, 1, 1\rangle$,
$S_2 = \langle 1... |
I mean, with the same code, if I modify a do while into a while in this way:
do {$S;$} while ($B$) into a $S;$ while ($B$){$S;$} , there is any change
in the code?
B = condition
S; = instructions
|
I'm wondering if there is an algorithm that calculates the optimal solution of a typical k-center problem (more than one dimension). I've tried, but without success, to find this algorithm. Does such an algorithm exist?
|
Last year I took a course on Theory of Computation. One of the questions made a reference to a Turing machine as a "Potato" (the course was root vegetable themed). A Turing machine is a Potato if on any input it either a) halts or b) reaches a configuration that it has already been in. I'm currently a TA for this cours... |
I'm currently reading through Aho's "Theory of parsing, translation and compiling" on my own and I got a bit confused about the closure operator on language $L$ with alphabet $\Sigma$ ($L^*$). The book defines it recursively as follows:
\begin{align*}
1)\ L^0&=\{e\}\\
2)\ L^n&=LL^{n-1}\quad \text{for } n\ge1\\
3)\ L^*&... |
You're given a graph $G = (V, E)$ and a set of colors $C = \{c_1, \cdots, c_v\}$, and the task is as follows:
Color the vertices using the colors in $C$.
Remove any edges that have differing colors for its endpoints (of course, if a vertex eventually has all edges removed, it can be deleted - but it is not necessary).... |
In a higher-order pattern rewrite system, one specifies rewrites on beta
normal forms of terms. Is it possible to have a rewrite like:
$\gamma := \lambda x . F(m) \to F(\lambda x . m)$
for some function symbol $F$ and $m$ in $\beta$-normal form? If so, then there is a "critical pair" between $\gamma$ and $\beta$
$F(... |
This is the pseudo-code from the problem:
procedure Foo(A,f,L)
Precondition: A[f..L] is an array of integers, f,L, are
two naturals >=1 with f<=L.
if (f=L) then
return A[f]
else
m <-- [(f+L)/2]
return min(Foo(A,f,m), Foo(A, m+1,L))
endif
The Question:
Using induction, arg... |
I have been struggling to visualize how is the AVL tree is stored in memory?
Does it store data in array or list, If so how is it connected with its child and parents.
|
Is randomized quick sort runtime is independent of the sequence of input? but depends on the numbers in the input?
Let say A1 = [1,2,3,4,5] , A2 = [5,2,3,4,1] A3 = [5,4,3,2,1] , Will the randomized Quick sort will have same runtime in terms of big O for A1, A2, A2
but for B1 = [1,2,3,4,5] B2 = [11,12,13,14,15] will hav... |
I am designing a bot to play Texas Hold'Em Poker on tables of up to ten players, and the design includes a few feed forward neural networks (FFNN). These neural nets each have 8 to 12 inputs, 2 to 6 outputs, and 1 or 2 hidden layers, so there are a few hundred weights that I have to optimize. My main issue with train... |
Let me split my query into a few parts which possibly have overlapping answers,
How do we prove that depth $3$ threshold circuits with polynomially bounded integral weights (call this $\hat{LT_3}$) are in $NP/poly$? (I saw this claimed in the conclusion of this recent paper https://arxiv.org/abs/1705.02397 without any... |
$\lnot \forall x P(x) \models \forall x \lnot P(x)$
$P(x) : x$ is divisible by 2
or $P(x) : x$ is a dog.
or $P(x) can be anything.
I want to show the following sequents are not valid ..Isn't the following sequents equal or the first sequent the whole negation of the statement and the second sequent is the negation of t... |
Let's say we have given unweighted directed graph with $N$ nodes and $M$ edges, and we want to find the $K$-th hamiltonian circuit, ordered in lexicographical order.
For example, if we have complete graph with $4$ nodes, and $12$ edges. The smallest hamiltonian circuit is $1 - 2 - 3 - 4$, the second one is $1 - 2 - 4 -... |
Any edge of a tree is a bridge. What is the minimum number of edges that I will need to add so that there are no more bridges in a tree? I have seen the solution from the internet the answer is $\frac{|V|}{2}$, where $|V|$ is the number of vertices in the tree. How can I prove it?
|
I am trying to generate models for the following sequent.
$$\exists x \exists y \forall z (z = x \lor z = y)$$
What I have come up with is this.
$$A= \{0,1\}$$
So in this model, for all the values of $z$ there exists $x$ such that $z = x$ or there exists $y$ such that $z = y$. Is this model correct? What other models a... |
I read some definitions of the NDTM in several books. Something makes me confused.
Some definitions say that the NDTM $M$ makes an arbitrary choice as to which of its transition functions to apply.
So, if $x \in L(M)$, then $M$ can always guess a branch which leads to $q_{accept}$. And if $x \not\in L(M)$, then $M$ jus... |
I was reading up on chunking and found Rabin fingerprinting is also used to break files into chunks. After reading about this algorithm, I understood how rolling hash is computed using Rabin fingerprint. This is explained almost everywhere. What I don't get is how in Rabin fingerprinting, we know to end one chunk here ... |
I am working on the following algorithm time equation:
T(n) = n^2 + n * T(n-1)
What would be its Big O?
|
i recently asked a related question about the relationship between monads in category theory and Haskell. The answerer showed me the following classes and instances:
class MyMonad t where
fun :: (a -> b) -> (t a -> t b) -- functorial action, known as fmap
eta :: a -> t a
mu :: t (t a) -> t a
class KleisliTriple ... |
I've been trying to tease apart the definitions of type safety and type soundness and I'm having a heck of a time of it. I asked a professor recently and after a bit of thought he said that there really wasn't any difference. However after reading this
it seems like:
Type Safety is a property of the language that says... |
Is the problem
'Given $m=\big\lceil{n^b}\big\rceil$ with $b\in(0,1)$ integers $a_1,\cdots,a_m$ each with $\lceil\log_2 |a_i|\rceil=\big\lceil n^a\big\rceil$ with $a\in[1,\infty)$ is there a subset that sums to zero?'
$NP$ complete?
The reason I ask is this problem can be solved in $2^{O(n^b)}=2^{o(n)}$ time.
|
Question:
L is a language defined as $\ L = \{1^l | l\in primes\}$ (strings of 1s having a prime length). Show that this is not a regular language ($\ L \notin REG$). You may either use the theory of closure or the pumping lemma to prove this.
My try:
So far I have tried to take a word $\ w | w=1^p$ ($\ p$ being the ... |
I would like to know if there is a rule to prove this. For example, if I use the distributive law I will get only $(A \lor A) \land (A \lor \neg B)$.
|
Suppose there exists a list of unsorted int numbers [91,89,90,90,90,89,91].
I need to maximize the profit by selecting an element, in as many steps as needed, which satisfies the condition that,
when element(i) is chosen, the profit would be value of element(i) multiplied by its frequency/occurrence in list, an extra... |
Suppose you have an array of size $n \geq 6$ containing integers from $1$ to $n − 5$, inclusive, with exactly five repeated. I need to propose an algorithm that can find the repeated numbers in $O(n)$ time. I cannot, for the life of me, think of anything. I think sorting, at best, would be $O(n\log n)$? Then traversing... |
Given a database with usernames and the first six bytes of their hashed passwords. A standard hashing function has been used for hashing.
admin 827ccb0eea8a
user c3981fa8d26e
operator 5f4dcc3b5aa7
guest 084e0343a048
The password of admin is 12345.
What value of the hashed password will be added to the database after t... |
In the space hierarchy theorem proof for PSPACE from Wikipedia, we reject the input after $2^{|f(x)|}$ steps on the machine $M$, reportedly to avoid infinite running time.
My question is: how is it that $2^{|f(x)|}$ steps is enough to tell if machine $M$ will run forever or not?
|
I am aware that the question is asked before but i there is still a confusing part for me.
In book the solution is like that:
$T(n) = 2T(\sqrt{n}) + \log(n)$
$m = \log n$ yields
$T(2^m) = 2T(2^{m/2}) + m$
Then $S(m) = T(2^m)$ produces the recurrence:
$S(m) = 2S(m/2) + m$
So $T(n) = T(2^m) = S(m) = O(m\log m) = O(\log ... |
I read that acceptance of languages by DPDA using empty stack is a subset of languages accepted by DPDA using final state because of prefix property.
I understood this statement by taking an example of regular language a*. Here if we use stack then we can't decide when to pop the symbols from stack. If we pop all the s... |
Supervised learning is: given $X$ and $Y$, we want to find a good predictive function $f$ such that $f(X)$ is "close" to $Y$. Examples include XGBoost (ensemble of decision trees), neural networks, $\ell_1$-regularized linear fit, etc.
In the problem I am encountering I have $X$. Each row of $X$ describes each day's sc... |
I am a CS novice who just recently encountered the P vs NP problem. And I was wondering whether plain multiplication is a P problem. If it is, does that mean there is a polynomial relationship between the increasing complexity and the time required to solve? I.e. Is there a polynomial relationship between the time requ... |
Im having a lot of trouble proving that for the Regular expression $R_{1} = \left( a^{*} b^{*} \right)^{*}$ and $R_{2} = \left( a+b \right)^{*}$ that $L \left( R_{1} \right) = L \left( R_{2} \right)$. I was wondering if anyone could help me with this? thanks
|
After completing the time analysis for an algorithm I have been working on, I need some help to write its time complexity properly, let me describe how it works...
The algorithm has two inputs $x$ and $y$.
When $x < 15$, steps to solve are $2^y$, so I know this is $O(2^y)$.
However when $ x >= 15$, the steps to solve b... |
For example, which part will detect these errors, Parser or Semantic Routine?
1) int Array[10.5] ( wrong size )
2) int x="some string"
3) A[10.5] + 3 (not in declaration, but in the middle of the code)
The book that I'm reading says the first one will be detected by parser but the third one will be detected by Semant... |
I create an individual in GP by using the full method. My individual trees have the same shape and size. I use a binary tree with all the leaves in maxdepth.
The problem is, I can not use the mathematical function set because it accepts two values. therefore I changed mathematical function set like sin (val1) to sin (... |
I am trying to generate a type of logic puzzle called starbattles. The puzzles consist of an nxn grid that is divided into n distinct regions. The rules of the puzzle are to place stars in the grid such that there are k stars in each column, row, and region of the puzzle. No stars may be adjacent to one another either ... |
This describes how one can neatly store a binary search tree as an array. I'm looking for a way to store a BST that will allow me to traverse any root to leaf path by loading $\mathcal{O}(log_kn)$ blocks. I call a bunch of nodes a block, the blocks are of size $k$.
My goal is to store a perfectly balanced binary search... |
The role of $x$ in $\frac{\mathrm{d}}{\mathrm{d}x} y$ not only confuses my calculus students, it has also puzzled some well known mathematicians. Questions one might ask are:
Does the $x$ in the denominator bind the $x$ in $y$? (Clearly no, since $\frac{dx^2}{dx}=2x$.)
Can one substitute for $x$ in the denominator? ... |
It states in my lecture notes that there is no CTL formula that is equivalent to A(FG p) in LTL and likewise, there is no LTL formula that is equivalent to CTL formula AG(EF p).
I am just starting to pick up LTL & CTL and cannot figure out why it is not possible. Could someone shed some light?
A(FG p): I would read it ... |
I'd like to know whether recent graph coloring algorithms that one can find nicely listed here have found it's place in real world applications or are they just simply pushing boundaries in this particular field of combinatoral optimization?
I already know that graph coloring naturally arises during register allocati... |
I know to prove instability, we can simply provide a counter-example. But is there a general way to prove that a sorting algorithm is stable? Could you please tell a general method and then show an example perhaps on insertion or merge sort.
|
I was recently in Maastricht and visited the caves and tunnels that lie under the city. (http://www.atlasobscura.com/places/fort-saint-pieter) While on a tour we were told that on numerous occaisions people have lost their light sources and have been unable to make their way out.
https://nltimes.nl/2015/08/05/21-hour-o... |
∃x (P(x) → Q(x)), ∃x P(x) ⊨ ∃x Q(x)
I am trying to find the invalidity of the following sequents.
A = Set of natural number
P(x) : x is odd
Q(x) : x is not divisible by 2
What i don't understand is how can this be invalid ? There will always exist an x that is not divisible by 2 . How can we make this false.
If ... |
The problem (from MIT 6.006 course) is the following:
In this problem, you are given a $2D$ array of integers $A$ that has $n$ rows and $m$ columns. (Assume $m$ is much (e.g., exponentially) smaller than $n$.) Array $A$ has one special property: the integers in every row of $A$ and every column of $A$ are non-decreasi... |
Say one is given a Vandermonde matrix (https://en.wikipedia.org/wiki/Vandermonde_matrix) of dimension $2^q \times k$ such that the elements of the first column of it are $\{0,1,2,..,-1+2^q\}$. (This then uniquely specifies the matrix). Now say one enlarges this to a matrix of dimension $2^q \times (1+q(k-1))$ over $\{0... |
Consider an interval $[x-2^n,x+2^n]$ defined by a binary float $x$ and a power of two $2^n$ typically much smaller than $x$. I would like to know whether an efficient algorithm exists to determine the shortest decimal expansion within the interval. What is the basic idea of such an algorithm? Perhaps such an algorithm ... |
I was digging through research articles to find a data structure that solves the dynamic sorted dictionary problem (representing any subset $S$ of a universe $U = \{0, \ldots, u\}$ with member/predecessor/successor queries), but sadly I was able to find none. I did find succinct solutions to the following problems:
Dy... |
Given a single IDB rule
$$R(x) \ \mathop{:\!\!-} \ A(x), \lnot B(x)$$
Where $A$ and $B$ are EDB predicates, how would I go about calculating changes to $R$ as tuples are added to $B$? As I understand, when tuples are added to $B$, tuples may need to be removed from $R$.
This paper says
We present the DRed algorithm... |
Description of the problem in question:
Say I have a complete graph with positive weighted edges. 1 vertex is specified as the "end". A subset of the other vertices are designated as "start" vertices.
I want to find paths from each start vertex to the end vertex with the following conditions:
As input, each path is gi... |
A select statement waits on $n$ channels until channel $0$ or $1$ or ... or $n-1$ have data.
A barrier lock waits on $n$ channels until channel $0$ and $1$ and ... and $n-1$ have data.
These two constructs seem to mirror co-product and product, respectively, in category theory. While I know there are category theory in... |
I'm trying to construct a greater than or equal to operation by adding some logic gates or building blocks (i.e. multiplexor and decoder) to my current 32-bit ALU
I'm not quite sure how to do this and nothing on google comes up for this operation from what I could tell.
ALU Design:
Question: How do I add a greater tha... |
So I'm currently studying theory of computation, and I was wondering if you could theoretically have more than one initial state in a DFA and if you can prove that a DFA with more than one initial state can depict a regular language? So essentially, can we prove that a language is regular if and only if it is accepted ... |
I'm having a lot of trouble with two problems the first is:
1) (y*w) + y + w
What I tried here is applying the distributive law as follows
(y*w) + (y+w)
((y+w) + y) * ((y+w) + w)
((y*w) + y) * ((y*w) + w)
then applying the absorption law and getting y*w but the answer is y + w, so I'm unsure how to get it using t... |
In compiler at phase lexical analyzer, how does lexical analyze strip out white spaces from source file?.
|
Are there quantum algorithms that solve the boolean satisfiability problem in subexponential time? Do they just give a determination as to whether an expression can ever evaluate to true, or can they also tell which input will cause the expression to evaluate to true?
|
There're some existing tree layout algorithms such as Tidier Drawings of Trees and Drawing Non-layered Tidy Trees in Linear Time. I call them as automatic layout algorithms since positions of nodes are determined entirely by the algorithm instead of the user.
Now I need an algorithm that allows positions of some nodes ... |
How can one show that there exist Boolean functions on $n$ inputs which require at least $2^n/\log{n}$ logic gates to compute?
This problem was originally stated in Exercise 3.16 of Nielsen & Chuang's Quantum Computation and Quantum Information.
|
I know that it is true for NFAs. It seems similar.
|
You are given an array of length $n$. Each element of the array belongs to one of $K$ classes. You are supposed to rearrange the array using minimum number of swap operations so that all elements from the same class are always grouped together, that is they form a contiguous subarray.
For example:
$$
\begin{align*}
&[2... |
I am looking for algorithmic techniques to solve the Subset Sum Problem in pseudopolynomial time. There is, of course, a textbook dynamic programming approach for Subset Sum. Have any other algorithmic techniques (Randomized, Linear Programming...) been successfully applied to this problem?
In [1], the authors state th... |
I have a very large number of constraints such as:
$ A1 \land B1 \land C1 \land D1 \land E1 \land F1$
$ A2 \land B2 \land C2 \land D2 \land E2 \land F2$
$ A3 \land B3 \land C3 \land D3 \land E3 \land F3$
$ A4 \land B4 \land C4 \land D4 \land E4 \land F4$
Here a constraint is a condition. For example, A1 is (response ... |
I am trying to find a good model the following problem:
Given a collection of work packets x, y, z, ..., and a collection of worker nodes A, B, C, ..., assign packets to nodes.
Each work packet has an affinity per worker-node, shown as a cost-value for how long a packet takes to process on a specific node. For example,... |
I'm a fresh year Computer Science student. Our teacher gave us damerau levenshtein distance algorithm pseudo code (which he got from Wikipedia apparently) and asked us to explain how the algorithm works step by step. I've been looking around the net to find an article about that but nothing that explain how the algorit... |
I want to know where can I find some resources on this question, because, after researching for a day and half, I couldn't find information specific to my question. Can anyone help me answer my question? I know that dynamic data structures (such as linked lists) can expand the amount of nodes at runtime, but if that's ... |
I do know what a "left-most-" and a "right-most derivation" is, but I stumble across the term "sentential form" and its specific differences "right-sentential form" as well as "left-sentential form" and I just don't understand what is meant with this term.
Is the concept "sentential form" so different from the concept ... |
A summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a rectangular subset of a grid [Wikipedia]. Is there any algorithm for quickly and efficiently generating the sum of values in a circular subset of a grid?
|
As an example, the sRGB Gamut is 256 x 256 x 256 (all powers of 2). I'm aware that computers are generally binary. However, is it simply a matter of simplicity that sRGB was made this way, or was it ESSENTIAL? After all, it probably could've safely provided just as many detectable colors with 192 X 192 X 192.
|
I'm working on an algorithm and there is an optimization I applied that is unpredictable because it depends on calculations done on top of the input trough several iterations, so as the input values change, the optimization gain oscillates (between a 20% to 90% step count reduction) as is adaptive to the input.
Is ther... |
Given three positive integers $a, b$ and $c$, my task to find the smallest positive integer $k$ such that $(k * a) \mod b = c$.
I can obviously try values of $k$ from $1$ and higher, until I find the right value. My question is, can this computation be done in $O(1)$ time? That is, is there a direct way to calculate th... |
To present interesting type-0 grammars to my students, I am looking for a very simple example of a type-0 language (=recursively enumerable language) that is not of type-1 (=not context sensitive). I am hoping for a language that is generated by a very small grammar, like two or three very short production rules or som... |
I have seen in most of the places written that LL grammars form a subset of DCFL and DCFG. Is there a proof for that?
|
Assume that $x_1,\dots,x_n$ are $n$ integer variables which takes values in a subset of given numbers, say $x_i\in\{5,6,\dots,5000\}$. Let $f_i(x_i)$ and $g_i(x_i)$ both be non-decreasing non-negative functions of $x_i$. Values of both functions are given for all values of $x_i$. Now consider the optimization problem
... |
Within my research of term rewriting systems (TRS) I stumbled upon a paper (Siekmann, J., and P. Szabó. “The Undecidability of the DA-Unification Problem.” The Journal of Symbolic Logic, vol. 54, no. 2, 1989, pp. 402–414. JSTOR, JSTOR, www.jstor.org/stable/2274856.) that stated the following:
We show that the DA-unifi... |
I am competing in a programming contest where the submission phase can be stated abstractly as follows : There is a known universe set, $U$, and a hidden target $T \subset U$. I submit $S \subset U$, and for feedback I am given $|S \cap T|$.
What is a good/optimal strategy for finding $T$ in as few submissions as poss... |
There are several versions of the definitions of the FST and the Mealy machine.
Some of the definitions are almost same. Some have a little differences.
But it seems that they both are a kind of DFA with an output function $G \colon \Sigma \times Q \rightarrow \Gamma \times Q$, where $\Sigma$ is the input alphabet and... |
We say that "An algorithm is a $\beta$-approximation to problem $X$, if for any instance of problem $X$, the solution returned by this algorithm is within a factor $\beta$ of the optimal solution".
Now assume that we have a $\log(N)$-approximation algorithm (called it Alg 1) for problem $X$ where $N$ is the size of pro... |
I have an algorithm which searches a sorted int array for two elements which sum up to a searched value. First I thought that the complexity is $\mathcal{O}(n)$, but the interpolation search algorithm has a similar approach and has a $\mathcal{O}(\log(log(n)))$ complexity with uniform distributed elements.
Which is th... |
I have an algorithm which computes the size of maximum independent set of a graph $G(V, E)$. Let $n=|V|$ be the number vertices, $m=|E|$ be number of edges, and denote the size of maximum independent set of the graph $G$ as $\alpha(G)$ .
Now, I want to estimate the worst-case running time the algorithm needs to compute... |
In competitive programming there is a trick for storing a set of strings(or objects really) to reduce memory - you only keep the hashes of the strings in a hash-table (usually as 32 or 64 bit integers). This data structure has the same properties as a Bloom filter. You never have false negatives but you can have false ... |
[Cross-posted from Math SE - apologies if this is not appropriate.]
I just read these excellent lecture notes by Scott Aaronson, and I found the second homework problem at the end to be incredibly thought-provoking (this course was offered over ten years ago, so I think it's now safe to discuss the homework online):
L... |
Consider the following game: Two players choose numbers from a sequence of integers with even number of elements. The two can only choose from either the front or the end of the sequence. The purpose is to pick a series of numbers that form a sum greater than the opponent's. The first player always starts and tries to ... |
I understand that DCFL they are not closed under concatenation or Union. As without non determinism, PDA cannot decide when to jump to the next one in case of concatenation and without epsilon moves Union is not possible.
However, DCFL is a proper subset of CFL (unambiguous) and CFL is closed under union and concatenat... |
I am trying to prove the following algorithm to be correct:
Sum(A[1..n], s)=
sum = 0
for r=1 to s
i = some random index i in interval [1, n]
sum = sum + A[i]
return n(sum/s)
where A is an array consisting of $n$ integers, where each integer A[i] belongs to the interval $[1, M]$ and $s=1/\... |
Suppose we solve dictionary matching problem for $d$ patterns with the Aho-Corasick algorithm. Then our main data structure consists of a trie with $n$ vertices and auxiliary structures. I want to estimate the dictionary size $d$ via $n$. It seems reasonable that $d = o(n)$, but maybe there is some research, that provi... |
Why there are two ways of accepting the input in PDA i.e. Acceptance by Final sate and Empty Stack I have seen examples which are accepted by both rules?
There are some examples which are only accepted by empty stack but I found they are NPDA's, is there any relation between them
|
Look at this excerpt from the Algorithm Design Manual by Skiena, 2nd Edition
The sum of the first $n$ even integers? Surely, the two sums given do not include only even numbers, right? Is this a mistake on the author's part, or am I missing something?
|
Take a look at this excerpt from the Algorithm Design Manual, 2nd Edition by Skiena.
I have circled the confusing bit. Basically, everything is understandable to me, until that part. How can $Increment([m+1/2])$ be rewritten as $Increment([m])$? Clearly, if m is an integer, then the algorithm will not treat $m+1/2$ a... |
Has there been any attempt at a general theory to describe how an algorithm can be "deformed" to solve the problem more efficiently?
For example suppose we have an algorithm (say sorting a list of numbers) which solves the problem in $O(n^2)$. Can we deform this algorithm (in the "space of algorithms") to an algorithm ... |
One can consider multimedia data as a matrix of pixels, but, of course - multimedia data contains higher-order knowledge as well. E.g. everyone can describe famous paintings in terms of colours, shapes, temper, artistic techniques and so on, only rarey one describes the painting as a matrix of pixels. So - are there sc... |
A regular language is a language that can be represented by a regular expression(or for which there exists a DFA), then why is language represented by 0$^{+}$ not regular?
I am asking this because for the following question the correct answer is option 2
Let L denote the languages generated by the grammar S→0S0∣00. ... |
I have a menu of n items, with each item having a value. Given the total amount spent, I have to figure out all the possible combinations of items purchased. Example, I have three menu items:
item 1: $4
item 2: $5
item 3: $8
with the total purchase price = $14
There is only one solution in the case, 1 purchase of item... |
Let $G$ be a CFG, let $A$ be one of its non-terminals, and let $x$ be a string. Define the language = $ \{ \langle G,A,x\rangle|$there exists a derivation of $x$ in which $A$ is used $\}$. Is this language T-recognizable? Is it decidable?
Obviously, we can determine if there is at least one derivation for $G$, since c... |
Does anyone know whether universal queue automata have ever been considered, and, as for Universal Turing Machines, some "small" universal queue automata are known?
|
Background
Semiautomated file merging is a critical part of version control systems (all the ones I've used anyway!). This is usually accomplished on textual source code without the tool understanding the underlying language – although semantic merging also exists.
I'm interested in whether merging relational data has ... |
I've recently stumbled across the field of Set constraints for program analysis, that is, solving equations of the form $exp_1 \subseteq exp_2$, where (depending on the particular variant of the problem), $exp_i$ is a term involving $\cup, \cap, \sim$, some set of "constructor" functions, and variables. The goal is to ... |
Let the set $A = \{a_1,...,a_n\}$ of objects and $d(a_i,aj) \quad \forall i,j\in[n] \quad i\neq j$.
Let $\;C=\{C_1,...,C_k\}$ the set of clusters, split the elements of $A$ into $C$ such as there is not $C_i$ empty.
We need to maximaze the distance between clusters which is the minimum distance between all the element... |
I've been struggling with a problem that is very similar to a 2014 question posted here. The question in particular is 3(1) and 3(2).
To paraphrase, we are supposed to use paths and an encoding scheme in order to bound the mixing time of a Markov Chain composed of state space $\Omega$ where a given state consists of a... |
Today I read a very interesting article about escape analysis in Java called Escape Analysis for Object Oriented Languages: Application to
Java
I think I have some grasp on how escape analysis works and how it is implemented, but I don't understand how the above algorithm works at all. I have also read two other papers... |
What is the main difference between binary decision tree and binary decision diagram(BDD)? From what I can tell I only understand that a binary decision diagram is a more compact representation because it eliminates nodes that have both edges pointing to the same node, eliminates nodes that have removes and removes t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.