instruction stringlengths 35 29.1k |
|---|
Consider a list of n integers.
And assume we take each integer from this list sequentially and add it to a red-black tree.
Then for the n! permutations of the list how many red-black tree arrangements are there in total?
N.B: Some permutations result in the same arrangement.
|
Given a deterministic DPA, is it possible to tell whether it halts on all possible inputs? Is this problem decidable?
The standard halting problem is "Given a DPDA and an input $x$, determine whether it halts on input $x$", and that problem is decidable. But what about the variant above?
|
The approaches I've seen to abstractly talking about the semantics of a programming language like Turing machines, various lambda calculi, and Hoare logic seem to be talking about the behavior of entire programs / entire expressions. Lambda calculus does regularly involve free variables, perhaps it isn't the best examp... |
I am trying to come up with an algorithm that calculates the length of shortest rectangle movement in a given bitmap.
For example, let's say we have a 24x24 bitmap where 1 is black pixel and 0 is a white pixel.
{{0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,1,1,1,0,0,1,0,1,1,1,0,0,0,0,0,0},
{0,... |
So i know that $L =$ { $ {w_1 w_2 : |w_1| =|w_2| , w_1 \neq w_2} $ }
is a CFL, but i cannot make a PDA for it because it doesn't make any sense to me why this is CFL
i even know the grammar for it but i cannot draw the PDA because :
even if we determine the middle of the string, if we push every word of w1 to the stac... |
$L = \{ a^n (a+b)^n | n>0\}$
A book I'm reading says it is, but considering we can't know where the second part gonna start, and it might start with a as well, then how can we accept this using a DPDA? Like after reading the first part ($a^n$) how can we be sure that it's the end of the first part or not considering... |
Consider a problem such as weighted model counting for propositional logic. The problem of enumerating all models M of a logic formula f and summing their weights w(M) is #P. What happens if the weight is a function of the model and the task of computing the weight w(M) given M is in itself #P? Whats the complexity of ... |
The following commentator writes:
Having studied this extensively back when they were called Genetic Algorithms, I would like to offer a few insights.
One of the biggest reasons they fell out of favor for more "mathematical" approaches was that no one could really explain why exactly they worked. It makes sense on the... |
What i mean is that can we code each CFL ( the same way we code each turing machine in the Universal Turing Machine ) and build a Linear bounded Automata in such a way that for each input ( which is a code of a particular CFL) decides whether this is a context free language ( accept ) or not?
I hope my question makes s... |
Given a large rectangle and a set $S$ of small rectangles each with a value $v_i$. My problem is to find a collection of rectangles $T\subseteq S$ to put in the large rectangle so as to maximize the overall value $\sum_{i\in T}v_i$, subject to the constraint that the selected small rectangles cannot overlap with each o... |
Given an undirected graph $G = (V, E)$ with $n$ vertices and $m$ edges, how many $k$-colorings of $G$ exist? A $k$-coloring is a function $c: V \to \{ 1, 2, \dots, k \}$ such that $c(u) \neq c(v)$ for all edges $\{ u, v \} \in E$. Let $f(G, k)$ denote the number of $k$-colorings of $G$.
There is a well-known formula, s... |
For a computer architecture, called ComputerA, a MIPS-like instruction set will be used. 64 instructions are reserved for R-type instructions and 64 more instructions are reserved for I-type and J-type instructions in total. Also, there are 128 registers in the system and the size of one register is 64 bits.
According... |
In the solution to problem 2 of this exercise sheet:
The height of $n$-node Binomial Heap is always $O(\log{n})$. Show
that this is not the case for Fibonacci Heaps by exhibiting, for
any positive integer $n$ a sequence of Fibonacci-heap operations that
creates a Fibonacci heap consisting of just one tree... |
How to minimize the DFA given in the picture
|
I am working on a problem where I have a set of goal nodes of which some, all, or none of will appear in a search tree.
Is there a search algorithm which returns the lowest cost path to one goal node, when there are potentially many different goal nodes present in a tree, or failure?
This can obviously be solved by ite... |
$L = \{a^n b^n c^n ... d^n | n>0 \}$
so for example $L = \{a^n b^n | n>0 \}$ , $L = \{a^n b^n c^n| n>0 \}$ and such
can the turing machine accept these in O(n)? if yes then what about a better time complexity like O(logn) or O(1)?
my take on this is: yes because we can use n number of tapes and we go through all of the... |
What would be some implications of $NL$$=P$? Would it be possible to get recommendations on good sources/papers I can read to learn more about this? Thank you
|
Question:
A binary Tree T is semi-balanced, if for every node m in T:
$$
\frac{R(m)}{2} <= L(m) <= 2*R(m)
$$
where, L(m) is the number of nodes in the left sub-tree of m and
R(m) is the number of nodes in the right sub-tree of m.
Write a recurrence relation to count the number of semi-balanced binary trees with N n... |
So i remember reading somewhere that we can convert any turing machine into a turing machine with 2 states (or 3, i don't remember) but there was no proof for it and i couldn't find it either
So my question is :
For every turing machine, what is the minimum number of states that we can have after converting it to this ... |
In the book, Operating System Concepts, 9th Edition, there is this paragraph that I don't quite wrap my head around.
Swapping is constrained by other factors as well. If we want to swap a
process, we must be sure that it is completely idle. Of particular
concern is any pending I/O. A process may be waiting for an ... |
For kosaraju's algorithm to traverse the graph in reverse order the naive solution is to reconstruct the original input graph in reverse order and dfs on it. Is there any way I can avoid creating copy of the graph in reverse order? how can I dfs on the same original graph going back across the edges?
|
An apology might be in due for asking another question about prerequisites, but I was confused about the starting points.
I have come across various terms such as "Modal Logic", "Temporal logic", "First -order Logic", "Second order Logic" and "Higher order logic".
What exactly does "Logic" mean in this context? How do... |
Prove that the language $LM =\{\langle M,x\rangle\mid \ M \text{ accepts }x\text{ and rev}(x) \}$, where $\mathrm{rev}(x)$ is the reverse of the string $x$, is undecidable with a reduction from $A_{\mathrm{TM}}$. Note that the empty string belongs to $LM$.
|
I have extracted DenseSIFT from the query and database image and quantized by kmeans. The challenge is to find those SIFT features that quantized to the same visual words and be spatially consistent (have a similar position to object centers). I have tried few techniques:
using FLANN() on the SIFT (normal SIFT) coordi... |
Give context-free grammars that generate formulas in propositional calculus, taking into account:
variables represented by single lowercase letter
Operations are conjunction (∧), disjunction (∨), negation (¬),implication (→) and double implication (↔)
Parse trees should reflect the following precedence order,
1: Form... |
I know that Good-Turing smoothing helps us to trim a bit of probability from some more frequent events and give it to the events we've never seen. Thus it keeps our model from assigning zero probabilities to unobserved events. But while dealing with a dataset, I encountered an interesting result. Here is the data I obs... |
I developed an image processing software and I need to do a numerical analysis of it, considering the error propagation associated to its operations and the uncertainty of float type variables caused by the inherent rounding up that happens with this type of variables.
Considering the IEEE 754 standard the machine epsi... |
While doing the multiplication 1.4*0.8 in a python program, I got the result as 1.1199999999999999.
Why didn't I get 1.12 exactly?
In C programming language, the same expression gives 1.1200.
|
i want to prove that $3^n$ has a greater growth than $n2^n$ or $3^n = O(n2^n)$. but how can i do it mathematically? by induction or contradiction or other ways of proof.
|
This was an interview question that I was told is supposed to be an open ended discussion of the trade-offs.
You have a collection of comparable objects and want to be able to do the following:
1. Lookup, add, delete objects
2. Get and/or extract Min, max objects
3. Objects should be unique (no duplicates)
A max-heap ... |
If both $A$ and $B$ are NP-complete languages, would $A \times B$ be necessarily NP-hard? Here, $A \times B = \{\langle u,v \rangle \mid u\in A, v\in B\}$.
So my colleague's answer was no, it's not necessarily NP-hard because you can verify in polynomial time that $u \in A$ and the same for $v \in B$, but you see this... |
When using double hashing, the second hash function is defined as $$h_2(x)=A-x\mod A,$$ where $A$ is a prime number less than the capacity of the hash table. But why must $A$ be a prime number?
(This differs from Why is it best to use a prime number as a mod in a hashing function? because the prime number in question i... |
The biclique vertex-cover problem asks whether the vertex-set of the given graph can be covered with at most "k" bicliques (complete bipartite subgraphs).
It has been shown that "Biclique Vertex-Cover" is not fixed-parameter tractable unless P = NP in Covering Graphs with Few Complete Bipartite Subgraphs.
Most of the w... |
I'm trying to solve this recurrence equation in this way:
$$
T(0)=O(1)\\
T(n) = 2T(n - 1) + n \\
= 2[ 2T(n - 2) + (n - 1) ] + n \\
= 2[ 2[ 2T( n - 3 ) + ( n - 2 ) ] + ( n - 1 ) ] + n \\
= 2³T(n-3) + 2²(n-2) + 2(n-1) + n$$
And I get:
$$ \sum_{i=0}^{n} 2^i(n-i) $$
That's right?
|
A computer system uses 32-bit memory addresses and it has a main memory consisting of 1Gbytes. It has a 4K-byte cache organized in the block-set-associative manner, with 4 blocks per set and 64 bytes per block. What are the number of bits in each of the Tag, Set, and Word fields of the memory address ?
A block has 64 b... |
I wonder if the knapsack problem with diminishing prices is already studied?
The problem is similar to the regular knapsack problem, except the price of each item is a decreasing function of the total size of the already selected items.
Given $n$ items each with size $s_i$ and price $v_i(s)$, where $s$ is the total siz... |
When doing the "inexact" analysis of the Merge Sort, the literature that I have seen usually consider that the input is an array with a even quantity of numbers and the recurrence relation is:
$T(n) = 2T(n/2) + \Theta(n)$
But how I can formally prove that even if I consider any input, the complexity stays the same? Whi... |
I'm studying the master method to solving a recurrence. It describes three cases, the last one of which depends on what lower bound a function f(n) has.
I usually find out the upper bound of a function from its highest term exponent. How would I figure out its lower bound Ω?
|
I'm reading through the first chapters of "Introduction to the analysis of algorithm" by Sedgewick. I wasn't familiar with the use of generating functions, and complex analysis in general to analyse algorithms. I do understand the use of the tool is in practice simple (at least it seems to me in that way from what I re... |
In direct memory management, CPU references address of 15-bits. Main memory size is 512 * 8 and cache memory size is 128 * 8. What is the size of Tag and line in bits?
Block size=8=2^3
I have found the number of bits in the word field as follows,
Block size=8=2^3
Therefore, word bits=3 bits
Now number of bits in line f... |
For example, if we have a graph G = (V, E) and a subset of vertices $U \subset V$. We can set $w(e)$ where $e \in E$ to be a non-negative real number. We want to minimize the total edge weight, but make sure that for all $(u, v) \in U \times U$, $l(u, v) \geq c$, where $l(u, v)$ is the shortest path from u to v, and c ... |
What is known about the succintness of NFAs, relative to regular expressions?
In order to clarify the question, let me explain what I know. The regular languages can be characterized by any of the following:
A language is regular iff it can be recognized by an NFA.
A language is regular iff it can be recognized by a ... |
Hi so this is my first week learning about automata and I have an exercise I'm going through. I'm supposed to draw a diagram for the DFA that accepts all strings of a and b where the third last symbol is a b.
So it's like : $\{a,b\}^*b\{a,b\}^2$ right?
And if I would draw it I would do this to check the end:
I believ... |
I am using a genetic algorithm to find the best way to pack circles inside a box without each touching the others and filling as much space as possible. My doubt is if an individual from a generation must be a circle or all the circles.
Can anyone help me on how would I go from here? Thank you
|
Assume I have some non-convex function $f(x_1, x_2, ...)$ and I want to optimize it to find a global minimum. I feel like it is easy to show that this problem is in the class NP with the decision problem
Is there a set of points such that f < C?
Where C is some constant. However, I am not sure if these problems are in... |
It can be easily seen that solving systems of polynomial (i.e. not necessarily linear) equations is NP-Hard via reduction from SAT. Furthermore, because the existential theory of the reals is decidable in PSPACE, solving systems of polynomial equations is as well. What else is known about the complexity of this problem... |
The recurrence of selection sort is $$T(n) = T(n-1)+ O(n).$$ Can we apply the master theorem to this recurrence? I am confused because the master theorem can be applied to the following recurrence
$$T(n) = aT(n/b) + f(n),$$
where $a \ge 1$ and $b > 1$. But for selection sort, $b=1$. I am trying to apply the master theo... |
This question is in a sense the converse of Will quantum computers out-scale classical computers at P-problems?. We know that there are oracle problems (e.g. unstructured search) for which we can prove that quantum computers can only give a fixed polynomial speedup (in that case quadratic) for the number of oracle cons... |
I am using a genetic algorithm to fit the max number of circles into a box. Right now my cromossomes are both coordinates of the each circle. I am not sure how to crossover and mutate the x and y coordenates in order not for the to converge but to keep a distance.
Can someone please shed some light? Thank you
This is w... |
Given are some vertexes, arranged in a list (so there every vertex is connected with two others and there are no circles in the graph). Every Vertex contains one number. Now you can lower the Number in one vertex and higher the one in one of the Vertexes connected to it by 1 in one so called "step". How would an Algory... |
Given a number system with only 3 and 4. Find the nth number in the number system.
There is a solution given here but its very vague without explaining the mathematics/ concept behind it. Can someone please help me derive the logic for framing an algorithm for this question?
One approach that crosses my mind is, we ca... |
I'm looking for an algorithm to generate/enumerate all possibilities for partitioning a set of size $n$ to $k$ non-empty subsets, each with size at most $b$.
More specifically, given a set $V$ where $|V|=n$, how to enumerate all possibilities to choose subsets $X_1, ..., X_k \subseteq V$ such that
1) $1 \leq |X_i| \leq... |
Given the following algorithm, to find the maximum and minimum values of an array - don't mind the language:
MaxMin(A[1..n])
max = A[1];
min = A[1];
for (i = 2; i<=n; i++)
if (A[i] > max)
max = A[i];
else if (A[i] < min)
min = A[i];
print(max, min);
I need to do ... |
Could you explain to me the input size of the algorithm with these cases? I can't understand the cases with multiple input parameters. Thanks.
algorithm_1( a[1,...,n], b[1,...,n] )
for i ← 1 to legth[a] step 1 do
for j ← 1 to legth[b] step 1 do
x++
return 0
-
algorithm_2( a[1,...,n], b[1,... |
This question was posted to me:
What property of our relation $R$ between worlds must be true if we know that the following formula is valid?
$\square \bot$
I am completely stumped and have no idea what to do. Will appreciate any help.
|
This is a question from a past-yr mid-term paper from my school(using Python language). Attached below is a diagram to show how a robot will move. Don't mind if the link seems dubious as I just used an online screenshot app to make the link, can't find an online link that describes the scenario well.
From the same pape... |
There already are many questions and answers about the importance of the regularity condition in case 3 of the Master Theorem. My question is about when can we safely assume the regularity condition is satisfied when f is only provided as a $\Theta(g(n))$, which is actually what happens most of the time when we don't w... |
"more precisely 'inference rules'" is what wikipedia says twice.
Other references I've looked at (the Alice book, Ullman lecture notes cited, Maier textbook) name them as Armstrong's Axioms, use them for inference. talk about axiomatisation and decidability, etc.
Wikipedia's links to axiom vs inference rule isn't helpi... |
Based on GeeksforGeeks and many other sites, the C/C++ compilers will create the same token for float/int etc.
However if we have something like this:
int A[10.5];
then will there be a parser error or semantic error?
The book that I'm reading says the parser rather than the semantic routines will detect it, but after... |
Is there any way that for specific dataset I can measure entropy and information gain for two or more attributes together? Let's say we have the following dataset:
$\begin{array}{cccccc|c}
x1 & x2 & x3 & x4 & x5 & x6 & y \\
\hline
0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 1 & 0 & 1 & 1 & 1\\
0 & 1 & 0 & 1 & 1 & 1 & 1\\
0 & 1... |
0 0
1 1
1 0 2
1 0 0 4
1 0 1 5
1 0 0 0 8
1 0 0 1 9
1 0 1 1 11
1 0 0 0 0 16
1 0 0 0 1 17
1 0 0 1 1 19
1 0 1 0 1 21
1 0 1 1 1 23
1 0 0 0 0 0 ... |
Let $A$ be an array of size $n$, and $f(i, r, a_r)$ be the number of indices $k$ such that $a_k$ = $a_r$ and $i \le k \le r$.
Example to clarify:
Imagine the array: $[1, 2, 3, 2, 2, 3, 4, 5]$. $f(0, 3, a_3)$, for example, would be equal to 2, because there are 2 elements in the array that appear before $a_3$ (which ... |
Some chap said the following:
Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin.
That's always taken to mean that you can't generate true random numbers with just a computer. And he said that when computers were the equivalent size of a single Intel 8080 mi... |
Given a rooted tree with $n$ weighted nodes and a number $1\leq k\leq n/2$, what is an efficient algorithm for finding a subset of the nodes having
$k$ elements
no node being an ancestor of another
maximal sum of the weights (among all subsets fulfilling the previous two conditions)
Edit: Comments suggest dynamic pro... |
Is it possible to write a 1-tape Turing machine in order to simulate a deterministic PDA? How would this be done?
|
Is the following problem in P?
Does a graph $G$ have $3$-colouring, where each colour is used exactly $|V|/3$ times?
I believe it is as we are trying to sample three sets (one for each colour) of vertices without replacement, giving a running time of $O(|V|^5)$. The first set is for three colours, the second for two an... |
My question is exactly what the title says. If I have that $f(n)=\omega(h(n))$ and $g(n)=o(h(n))$ hold, then does $f(n)=\Theta(g(n))$ hold as well? My intuition says that the second part is false, but I couldn't put this idea on paper.
|
How do I solve the following recurrence relation?
$$
T(n) = 1 + \sum_{j=0}^{n-1} T(j).
$$
I thought of solving it by generating its recursion tree. I found that the height of the tree would be equal to $n$ but wasn't able to find the cost of each level.
|
In my college course notes, we are given two examples.
Example 9.1.1:
$$ M(K, \Sigma, \delta, s) $$
where
$ K = \{q_0, q_1\} $
$\Sigma = \{a, \# \}$
$s = q_0$
$ \delta = \begin{array}{|c|c|c|c|}
\hline
q & \sigma & \delta(q, \sigma) \\ \hline
q_0 & a & (q_1, \#) \\
q_0 & \# & (h, \#) \\
q_1 & a & (q_0, a) \\
q... |
I'm having a rough time understanding the Rank Selection method for Genetic Algorithms. Here is what I think it does:
Tour1's Fitness: 0.87
Tour2's Fitness: 1.22
Tour3's Fitness: 1.03
Tour4's Fitness: 0.58
We rank them using their fitness:
4) Tour2 -- Highest rank (N)
3) Tour3
2) Tour1
1) Tour4 -- Lowest rank (1)
... |
Say we have a function called GenBiasedBit. This function returns 1 with probability p (where p is an unknown real number between 0 and 1 exclusive) and returns 0 with probability 1 − p. How could I write a Las Vegas algorithm (called GenUnbiasedBit) that returns 1 or 0 with equal (nonzero) probability, using calls fro... |
Say that I have a superscalar processor and I am given the latency, issue and capacity (in clock cycles) for different instructions.
What is the general formula for latency bound and throughput bound? (I will convert to cost per instruction and billion instructions per second)
This field seems to be too niche to find i... |
The question:A directed graph is doubly connected if every two vertices are connected by a directed path in each direction. Let DCG = {| G is a doubly connected graph} Prove that DCG is NL-complete. (You may use the fact that PATH is NL-complete.)
PATH = {: G is a directed graph with a path from s to t}
My attempt:
to ... |
I want Regular Expression for language L defined over {a,b} and L does not contain substring 'bbb'. I tried something but could not get proper answer.
|
I'm studying for an exam and came across this question. I feel like it's much simpler than I am making it out to be, but I'm not sure.
Suppose we have a corpus in which Zipf’s Law holds. If the most frequent term occurs one million times, and the next most frequent term occurs 250,000 times, how often should we expect ... |
In "The Complexity Theory Companion" Hemaspaandra and Ogihara define an oblivious oracle TM as an oracle TM where the queries are dependent on the input and not on the oracle. They then show how to turn an oracle $\mathbf{NL}$ machine into an oblivious one. I wanted to know whether this construction will work for other... |
Parsing s-expressions is almost trivial. This is true for both automated processes (and thus implies ease of implementation of such processes) and for a human readers of printed s-expressions. It is the latter property that is the subject of this question.
The main cause for this simplicity is the one to one correspond... |
I was presented with the problem of breaking the unit cube $[0,1] \times [0,1] \times [0,1] $ into tetrahedron shapes. The first two pieces are easy, but it's not so easy to visualize after that. I found:
$\{ (0,0,0), (1,0,0), (0,1,0), (0,0,1) \}$
$\{ (1,1,1), (1,1,0), (1,0,1), (0,1,1) \}$
What remains is a triang... |
I have a set of 3 elements and need to generate a randomized sequence containing each element n times with the condition that one element can only occur m times in a row.
So with elements [0,1,2] n = 4 and m = 3:
[1, 2, 0, 0, 0, 1, 1, 2, 2, 2, 0, 1] valid
[1, 2, 0, 0, 0, 0, 1, 2, 2, 2, 1, 1] invalid
The only solution... |
Imagine this game. I pick a permutation $p$ of $1..n$ and give you an oracle. When the oracle is queried with any sequence of $n$ numbers $\in 1..n$, it masks each number by applying some unknown bijection $f$ and then permutes the masked values using $p$. Your goal is to repeatedly query the oracle to recover $p$ with... |
I am working through the Russell and Norvig AI book and came across the following on the top of page 706.
The section concerns Decision Tree pruning and testing a given attribute against the null hypothesis. The example at hand deals with a binary decision tree and $p_k$ denotes the number of positive ("yes") responses... |
Yesterday I found a question here, that asked, if the value of the flow across the edges of the MinCut is at capacity.
I think the question has been deleted.
But I want to confirm that for the edges that are on the MinCut, after the MaxFlow is found, their flow values will either be zero or equal to their full capaciti... |
This is an exam question from my algorithms and data structures course.
You imagine an hash function with h: U->{0,..m} (this is from the original question, but i think m-1 would be correct) and n values to hash.
You want to keep the expected number of collisions below or equal to 1.
How do you determine m in dependenc... |
What would be the complexity of the following recurrence?
$$T(n) = 2T(n-1)$$
|
How can we construct an algorithm which finds $\mu$ that minimizes $\max | x_i - \mu |$ in a linear time for an array of numbers $[x_1, x_2, \ldots, x_n]$?
I take $g = \max_{i\in \{1,\ldots,n \} } x_i$ and $l = \min_{i\in \{1,\ldots,n \} } x_i$, and $\mu = l + \frac{(g - l)}{2}$
Is it true and why it minimizes the func... |
In theory operating system is a special program run by itself without help so that also mean normal program can still run by itself mean that the need for api is not must have so finally can we have an os without api ?
|
The following program implements a simple algorithm for binary multiplication:
-- Numbers as infinite streams of bits, least significant bits first
data Bits
= O Bits
| I Bits
-- Increments a number
suc :: Bits -> Bits
suc (O xs) = I xs
suc (I xs) = O (suc xs)
-- Adds two numbers
add :: Bits -> Bits -> Bits
add (... |
Entropy is the randomness collected by an operating system or application for use in Cryptography or other uses that require random data. The formula for Entropy is $$H(p_1, ..., p_k)=-\sum_{i=1}^{k} p_i\log_2(p_i)[bit]$$
So if I were to calculate the Entropy of a coin toss. it would be
$$H(\frac{1}{2}, \frac{1}{2})=-... |
An Associated cache and one million word main memory are divided into 256 word blocks. How many blocks are there?
|
I have seen many problems in graph theory and in other related fields which admit a sublinear (in input size) running time $\mathcal O(n^{1/2})$ algorithm, where $n$ is the input size. I am not sure but to me it seems that fine grained complexity may be one possibility to prove that there is no algorithm with running ... |
I've been trying for hours to figure out, how to form a CFG describing this language $L$:
$$L=\{ w\in\{a,b\}^* \mid w\text{ is of the form }a^nxb^{n+2}\text{, where }x\text{ is a string of length }3\text{ in }\{a,b\}^* \}.$$
The problem I'm having is related to the first $n$ of $a$'s. I can't wrap my head around how c... |
I'm looking for some pointers on proper mathematical (FP?, category-theory?) terminology.
My apologies if the below is somewhat imprecise; I suppose the precision is precisely what I'm looking for in the answer.
Say you have a particular Abstract Syntax Tree. Now you also have some editor that allows you to annotate ar... |
Is there any automaton (or automaton translation) as expressive as LTL that can only read disjunctions of atomic propositions per each transition? Standard LTL-to-automaton algorithms allow the automaton to read conjunction as well as disjunction of atomic propositions.
|
I'm looking for a optimization problem on planar graphs which is APX-hard, which means that it doesn't admit a PTAS (approximation scheme). It would be even better is the difficulty of the problem does not depend on some weight value but only on the structure of the graph (because in this case it's probably possible to... |
In the book Handbook of Data Structures and Applications, section 5.2.5, (copy of the relevant section available here) about leftist queues, the author(s) state the following:
For the complexity analysis of of the initialization operation, assume, for simplicity, that n is a power of 2. The first n/2 melds involve max... |
I want to create an algorighm (with dynamic programing) similar to 1/0 knapsack problem but, I have one extra condition isVegetable or isFruit.
Assume we have N food items where we know number, weight, value, 0 || 1 where 0 means isFruit and 1 meas isVegetable. We have two conditions, one is max knapsack weight and se... |
Here is a lower bound proof for the comparison-based sorting problem:
Any comparison-based sorting algorithm can be considered to work by putting elements into their final positions one by one (Take the last time one element is put into its final position.).
To put the element $e$ which is the $i$-th one being put int... |
I am trying to find the relation between the vertical displacement of an object to the depth of the object.
Say, there is an object in an image and as the center of gravity of this object moves vertically upwards, we know that it is moving away from the camera.
We know at the same time, that the dimension of the image... |
In a modern instruction set like x86-64 there are many many many ways to accomplish the same task using a series of old simple instructions all the way up to the complex SIMD instructions. If one wanted to determine the semantic equivalence of a series of instructions, could this be done rationally or must it only be d... |
I'm trying to understand how A* works on some simple examples, and something struck me as odd. I could fairly easily come up with situations in which A* "failed". Here is an example:
Take a 2x2 grid, in which you can only move in one of 4 (orthogonal) directions (no diagonal movement). Denote the node at (0, 0) by A, t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.