instruction stringlengths 35 29.1k |
|---|
I'm taking the Algorithms: Design and Analysis II class, one of the questions asks:
Which of the following statements is true?
Consider a TSP instance in which every edge cost is either 1 or 2. Then an optimal tour can be computed in polynomial time.
Consider a TSP instance in which every edge cost is negative. The d... |
I'm taking the Algorithms: Design and Analysis II class, one of the questions asks:
Assume that P ≠ NP. Consider undirected graphs with nonnegative edge
lengths. Which of the following problems can be solved in polynomial
time?
Hint: The Hamiltonian path problem is: given an undirected graph with
n vertices, dec... |
I'm new to studying formal languages, so apologies if I get a lot of basic stuff wrong, but I'm trying to get an intuitive understanding of why the difference between two Recursively Enumerable languages (A and B, say) is not itself RE? I.e. why for A-B = Z, Z is not RE?
The basic set notation and maths I understand, b... |
I'm new to the study of formal languages, and I wondered if languages of a certain type are objectively of that type (RE, REC, regular, etc), or if their type varies on their context? I had this thought:
If I had a language A that is recursive for some Turing Machine, TM(A), would it be possible to design another TM, T... |
I have read that the number of multiplexers required is equal to the number of bits in the TAG field. Is it true? If yes then why?
I know that the size of each multiplexer has to be S to 1, where S is the number of sets in a k-way associative cache (For Direct Mapped, no. of sets = no. of lines). That's because we have... |
I have a problem with this exercise. This is the LALR(1) parsing table for the grammar G. How can i get the productions of G?
Thanks :)
|
I know that this problem is a known NP-Complete problem, but I'm curious as to why a particular algorithm won't work. Given a graph $G = (V,E)$, and edge weights $w(e)$, why can we not create a new graph $G' = (V,E')$, and flip the sign of each edge weight, i.e set the weight of each edge $e' \in E'$ to $w(e') = 0-w(e)... |
PDA's are usually defined using the 7-tuple convention.
$M=(Q, \Sigma, \Gamma, \delta, q_{0}, Z, F)$
F is the set of accepting states.
I want to design a PDA accepting by empty stack, so using this notation makes no sense, as I don't need F and I want to make the acceptance condition clear.
How is this usually done? C... |
I am trying to find a solution to the ex. 4.6-2 of the Introduction to Algorithms by Cormen, Leiserson, Rivest, Stein (the third edition). It requires, for recurrence relations $T(n)=aT(n/b)+f(n)$ where $a\geq 1, b > 1$, $n$ is an exact power of $b$ and $f(n)$ is an asymptotically positive function, to prove that if $... |
I'm trying to understand the question in my title in an intuitive way:
If I have an RE language A, then some TM, say TM(A) accepts on it. If I take a subset of A, say A2, then all elements of A2 will cause TM(A) to halt in the accept state.
However, is it in general possible to then create a TM for A2, say TM(A2), suc... |
I was tutoring a grade 4 student about CPU and I got confused as there are also the other units of a cpu like arithmetic and logic unit and memory unit. So, is the above statement actually true even if ALU is the one which does the arithmetic and logical operations?
|
I think I'm able to prove NTIME($n^\alpha$) $\subset$ EXPTIME for arbitrary $\alpha$.
Is this a new result?
If it was, would there be a way to deduce NP $\subset$ EXPTIME from it?
|
As I am studying the application of Buchi automata in formal software verification, I am interested in the computational complexity (or links to papers) for the algorithms used to solve the problem in practice.
Let me recall the mathematical intuition behind model checking using these techniques.
Buchi automata are the... |
I know that once I have a graph or decision tree representation of a problem, there are many different ways I can get a computer to solve the problem. They're called search algorithms, and go by names such as Depth-First Search, or Breadth-First Search or A* Search, etc.
However, I have the following game that I would ... |
We'll say $P$ is a symmetric property if $\forall x\in \{0,1\}^n:x\in P\iff \forall \pi \in S(n): f_{\pi }(x)\in P$ where $\forall i\in [n]:f_\pi (x)_i=x_{\pi(i)}$.
Given a symmetric property $P$ we want to find an algorithm which tests $P$, meaning given a vector $x\in \{0,1\}^n$ we want to say if $x\in P$ in sublinea... |
Say I have a kiln for making castings. There are 3 shapes. I need to produce the following castings:
102 of A
364 of B
70 of C
I can put 50 molds in the kiln at a time.
I can have 75 molds made in any combination.
First, what is the optimal combination of molds to make.
Second, what is the schedule to make the castings... |
In the 1ML – Core and Modules United (F-ing First-Class Modules) paper, the author gives the following example for why module types do not form a lattice under subtyping:
f1 : {type t a; x : t int} → int
f2 : {type t a; x : int} → int
g = if condition then f1 else f2
There are at least two possible types for g:
g... |
In a multi-armed bandit, the objective is to maximize the expected cumulative reward. This objective is usually (equivalently?) stated in terms of expected cumulative regret.
Question: Why not just deal with the reward? Why formulate the objective in terms of regret?
|
I have seen the parameterization of the very well known problems like vertex cover, hitting set etc which are NP-hard (NP-complete precisely). Many researchers in the past have been studied the parameterization of these problems. My question is why researcher's don't study the parameterizations of the problems unlikel... |
A teacher at a school has to do this on a regular basis. Let's say 12 students should be divided into either 4 groups of 3, or 3 groups og 4.
Each student can pick up to 3 other students that person would most rather be with.
I tried to set this up as an undirected weighted graph, and implement shortest path algorit... |
I'm doing a research on a finite horizon decision problem with $t=1,\dots,40$ periods. In every time step $t$, the (only) agent has to chose an action $a(t) \in A(t)$, while the agent is in state $s(t) \in S(t)$. The chosen action $a(t)$ in state $s(t)$ affects the transition to the following state $s(t+1)$. So there i... |
Like turing machine, but your tape is finite. To make a program valid it should have a limit result when the length of tape tends to infinity.
Whether the tape has two ends or is cyclic doesn't matter, for placing a special dot on cyclic tape is like a two-end tape, and running back at the end on a two-end tape makrs c... |
We know how DSU(Disjoint Set Union) can be used to find the connectivity between two users. However, I was wondering if it can be used with a Segment Tree.
Let me explain my idea further. Suppose we have $N$ people, numbered from $1$ to $N$. I have a list of input specifying if two people are friends or not. Running a ... |
Would not know if this is the best SE website to ask, but I could not find anything better, especially because the answer might involve a fair amount of computer science (although this is an hypothesis).
I hold a MSc. in Statistics, and thus have extensively explored Gaussian Mixture Models. That's why, upon buying my ... |
Is the capability of every programming language the same since it is eventually translated into machine code. Python, Java etc. are all together instructions the CPU is going to process. So, you could (theoretically) do the exact same thing with ever language, don't you?
|
I'm reading the book "Lessons in Scientific Computing" by Schoerghofer and it says:
If x and y are real numbers of the same sign,
their sum x + y has an absolute error that adds the two individual absolute
errors, and the relative error is at most as large as the relative error of x or y. Hence, adding them is ins... |
5 stage pipline
addi $t1,$zero,0x30
lw $t2,0($t1)
sw $t2,0xff18($zero)
addi $t2,$zero,100
Question is to find hazards existing in the code and the answer is:
Hazard 1: Between lines 1 and 2. Register t1. Solved using
forwarding.
Hazard 2: Between lines 2 and 3. Register t2. Solved using
forwarding.
But I found ... |
I am familiar with the basics (and perhaps a substantial amount of basics) of imitation learning and reinforcement learning. In IL (imitation), we take demonstrations from an assumed expert, which we also assume has the most efficient policy.
What does this statement mean: This will train a policy network using the ex... |
I have a collection of subsets $\{S_1,\ldots,S_m\}$ where each $S_i\subset \{1,\ldots,n\}$. I would like to cover the maximum number of elements from $\{1,\ldots,n\}$ by choosing a single element from each $S_i$. What is the optimal way to do this?
For example, say I have $S_1=\{1\}$ and $S_2=\{2,3\}$ and $S_3=\{3\}$ a... |
i am trying to find a cfg for this cfl
L = $\{ w \mid w \text{ has an equal number of 0's and 1's} \}$
is there a way to count the number of 0's or 1's in the string?
|
If the question above makes any sense!
|
According to Wikipedia:
Shannon's entropy measures the information contained in a message as opposed to the portion of the message that is determined (or predictable). Examples of the latter include redundancy in language structure or statistical properties relating to the occurrence frequencies of letter or word pair... |
Problem statement: Solve $T(n)$ for $T(n)=2T(n-1)+n$, $n > 1$, and $T(1)=1$.
My attempt: I tried back substituting but I am unable to find a general pattern:
$$\begin{align*}
T(n) &=2^2 T(n-2)+3n-2 \\
&=2^3 T(n-3)+7n-10 \\
&=2^4 T(n-4)+15n-34 \\
&=\cdots
\end{align*}$$
|
Here is another GeeksforGeeks problem that asks how to find the shortest Uncommon Subsequence of 2 strings?
For example,
Input : S = “babab” T = “babba”
Output : 3The subsequence “aab” of length 3 is
present in S but not in T.
Input : S = “abb” T = “abab”
Output : -1
There is no subsequence that is present
in... |
I hope you can help me -
Given a lot of sets containing integers,
I'd like for any two sets, to quickly (i.e. O(1)) ask whether they intersect.
Note that I don't need the exact intersection, rather just a yes/no answer.
Also, I am fine with some false-positives.
Also, the representation of the sets should be space-... |
Let L be a set of recursive funtions with $L = \{i\in \mathbb{N}|f_i\space is\space surjective\}$ where $i$ is a gödel number of f.Is $L\in RE,\space coRE$?
I can't think of a way to show either of the two.
|
I built my own thermostat that controls the boiler heater for the radiant floor heating in my house and I would like to develop / implement a smarter temperature control algorithm. What I am specifically interested in is the ability to predict when to turn on the heating so that a certain temperature is achieved accord... |
I am trying to solve this recurrence relation with two variables:
$$T(n, k) = T(n - 1, k - 1) + T(n - 1, k)$$
The base cases are:
$T(n, k) = 1$ if $k = 0$
$T(n, k) = 0$ if $k > n$
I was wondering if standard techniques like characteristic polynomial and generating function would work in this situation.
|
From Algorithms 4th:
Quicksort with 3-way partitioning uses ~$(2\ln 2)NH$ compares to sort $N$ items, where $H$ is the Shannon entropy, defined from the frequencies of key values.
$ H = -(p_{1}\log_{2}{p_1} + p_{2}\log_{2}{p_2} + .... + p_{k}\log_{2}{p_k}) $
Given $N$ keys with $k$ distinct key values, for each $i$ ... |
I'm trying to better understand benchmarks that are commonly used for computer hardware. I've been unable to find an answer to this question. Extra credit if you can provide a breakdown in percentage per instruction of a blender benchmark.
|
Graph invariant is a property that holds for two isomorphic graphs.
For example, degree sequence is graph invariant. We can write
$d(G) \ne d(G') \Rightarrow G \ncong G'$, although $d(G) = d(G')$ does not mean that $G \cong G'$.
I search for a name (and maybe some existing examples) for complementary graph invariant. ... |
Mathematical Physics is a well defined scientific fields that deals with the application of mathematics , mathematical tools , and mathematical methods in the theories and the problems of physics.
Is there a well defined scientific field that deals with the application of mathematics , mathematical tools , and mathemat... |
Show that if the transitive closure can be computed in T(|V |) time then
BMM can be solved in O(T(3n)) time.
I didn't understand the proof in the context of building edges. I added the proof
i tried to write an example
Michael P. Kim, Editted by: Bill Kuszmaul people.csail.mit.edu/virgi/6.890/lecture3.pdf
Thanks
|
I have seen some people make an argument that given the fact that Context Free Languages are proper subset of REC which is closed under complementation thus complement of a CFL must be in REC. I cannot wrap my head around this argument.
What I know about a CFL(say L) is that the complement of this CFL(say L') need not ... |
If
Capacity = 24 KiB Associativity = 6 Line Size = 32 B
As far as I know:
$$Capacity = Associtivity * Line Size * Sets$$
so
$24576 = 32 * 6 * Sets$
$Sets = 128 = 2^7$
thus 7 least significant bits are needed to identify set number.
Am I doing it correctly?
|
I'm considering turing machines with tape alphabet equal to $\{0,1\}$ and the blank symbol equal to $0$. Is there a name for this type of Turing machines? Isn't this type the one computers are based on?
|
N-Queens problem - maximum number of function calls.
We say, that a backtracking algorithm (code below) 'checks' a setup of N queens, when the function isFree(n-1, y) is called for $0\leq y < n$ (so we check a possibility of placing n-th queen to already set n-1 queens). Justify that for $n\geq 4$ algorithm checks no ... |
How to efficiently ¹⁾ choose from a set of numbers $S$, a given number $n$ of disjoint subsets, each with a given sum $K$ of chosen elements?
¹⁾ Not as in $P$, I just want something smarter than $O(n^{|S|})$.
Ex. Let’s say we want $n=3$ subsets with the sum of $K=3$ chosen from $S=[1,1,1,2,2,2]$.
The correct solution ... |
In the proof of the correctness of Dijkstra algorithm, there is a lemma stating as follow:
Let u be v's predecessor on a shortest path P:s->...->u->v from s to
v. Then, If d(u) = δ(s,u) and edge (u, v) is relaxed, we have d(v) =
δ(s,v), where the funciton δ(x, y) denotes the minimum path weight
from x to y.
I ... |
I have a few knapsacks of given capacities.
Also, much more items of given weights and values.
As usual, items have to be put into knapsacks to maximize profit.
What is different from a standard MKP, is that there’s a requirement
that each knapsack has to be filled completely. I.e. the sum of
weights of its items has ... |
To experiment, I implemented a discrete HMM; the transition matrix and emission model are randomly, uniformly generated. Then, a sequence of random states and emissions are produced by the HMM. Then I run smoothing (forward-backward algorithm) to identify the most likely states at each time. Finally I run the viterbi a... |
The smallest grammar problem is to find a single-string CFG. So given a finite list of language samples, known to all lie in some CFG, can we, using the smallest grammars (approximated) of each respective sample, compute an approximate smallest CFG for the language?
I want to make a parser generator that automatically... |
I need suggestions for algorithm for Pseudo random number generators that will produce a near gaussian distribution (bell curve) for automatically generating test data. I know that PRNG produce recurring 'patterns, but google has revealed none that expressively produce gaussian distributions. Do you have an recommend... |
Is it possible to find $a$ or $b$ given that $a \oplus b = c$ and $c \oplus b = a$ when I only have the value of $b$?
|
I have seen a few standard hyphenation algorithms for non-monospaced fonts, where you are free to squeeze and separate words and letters, but I haven't seen any related to monospaced fonts specifically. Wondering if there are any good resources on the topic. Such as how to best properties to use when hyphenating a mono... |
I'm curious about the right way to characterize symbol $A$ in a CFG like this one:
$$
\begin{align*}
A &\to A B\\
A &\to x\\
B &\to y\\
B &\to \varepsilon
\end{align*}
$$
$B$ is certainly nullable. However, should $A$ be considered nullable? It feels like the answer is probably "no" (and most first-follow implementatio... |
Descriptive complexity is a useful way to free yourself from computational considerations when studying complexity. One of those considerations is the encoding of the structures you are working on.
However, the way we usually see integers in descriptive complexity is exactly the same way we're used to with Turing machi... |
How to transform a decimal of $\frac{23}{6}$ into binary?
$\frac{23}{6}$ is equal to $3.83333\bar{33}$, where the digit $3$s are repeated forever.
I do know how to translate finite decimal into binary, but
is there any procedure to translate such Infinite decimal like $\frac{23}{6}$ into binary?
Any hint is appreciate... |
Given a set of values like [4, 8, 1, 5, 2, 6, 9, 2, 3, 5, 11, 9], how can I find the largest positive interval between any two of them? For example in the one I just listed, index 0 to index 1 has an interval of 4 because 8 - 4 = 4. But the largest positive interval is between index 2 and index 10, because 11 - 1 = 10.... |
Suppose we have a decidable language B (there exists some TM that decides it). Suppose we have another TM M which only recognizes B but does not decide it - there are words not in B that M doesn't halt on (for words not in B M might either reject or not halt).
Let A = {w | M does not halt on the word w}.
Which of the f... |
Do functions with the following properties exists for x being arbitrary stream of bytes:
op(f(x1), f(x2))=f(x1+x2) and op(f(x1), f(x2))!=f(x2+x1) given that x1!=x2 where plus denotes concatenation and op is an easily computable operation
f(x) is fixed length of about 160-512 bytes
f does not need to be hard to revert,... |
Will it be wrong to use g for reducing (λx.λy.x) first in step (2) instead of using to reduce λg?
Is there a rule against it?
|
I am wondering what the reason for the following is
We know that ,
exponential has a taylor representation :
$$exp(x)=1+x+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+...$$
Using the first n terms , in R , I compute
$\exp(-10)$ and get one answer.
However, if I compute $\frac{1}{\exp(10)}$, I get a slightly different answer.
F... |
I've heard that any algorithm using iterations can be changed into one that uses recursions and vice-versa.
But which type of repetition is preferable for minimum amount of computational effort and resource consumption ? Iteration or Recursion ?
|
Given a digraph $G(V,A)$ and a number $k$, we want to find two vertex subsets $S,T\subseteq V$ such that:
$|S|+|T|=k$
For every $v\notin S\cup T$, $v$ has no arcs coming to $S$, and no arcs coming from $T$. In other words, from $v$'s point of view, $S$ is the source, $T$ is the terminal. Hence their names.
So, can th... |
I developed an algorithm with the following multi-variate complexity:
$$O((k^n+kn)l^{kn}),$$
where $n,k,l$ are variables.
I have very little knowledge of complexity theory, and I'm not sure whether this expression can be simplified. Since $k^n$ dominates $kn$ it seems reasonable to $O(k^nl^{kn})$. Is this correct?
Ass... |
For the proof of a maximum of (n 2) min-cuts in any n-vertex undirected multigraph using the random contraction algorithm, we need to know that no min-cut shares an edge with another different one.
My attempt to prove this was using a contradiction argument, supposing there was a common edge across 2 different min-cuts... |
Computer science has automata theory with lessons on regular expressions and FSM. How are these different from regex engines used in programming such as C++, Perl, PHP etc.?
I would like to know some differences i.e. stuff that can only be done with regexps in programming but cannot be done in formal regexps in compute... |
Hi I'm trying to solve this exercise but I can't find any material online, it's not an homework I actually have sort of a solution (it looks incomplete though), but from that I can't really understand much about how to tackle the problem. Anyway we're asked to find a term $\Delta$ such that:
$$
\left\{\begin{matrix}
\D... |
I have been given several examples I the aim is to explain why it is not a Huffman code. So, for instance, the first one was:
$\{00,01,10,110\}$
This code is not Huffman becuase it has just one codeword of maximum length whereas there should be two as a minimum.
Next, the one I hava a problem in proving:
$\{01,10\}$
Wh... |
Suppose we have a graph with vertices from 1 to n.The graph is undirected and the starting point is 1 and we have path from 1 to any other vertex.We also have positive weight on each edge and there are two types of edges - black and red. The black edges are in the form (1,x) where x is a vertex and red edges can be any... |
Let's say I have two computers on a network. I want to write code in some language on machine A, send the code in an efficient way over a network, and run the code on machine B. It seems to me that this would be inherently slow and would run into a bundle of problems (not having required dependencies) but perhaps some ... |
Bachmair and Ganzinger (1991), 'Rewrite-Based Equational Theorem Proving With Selection and Simplification', page 4, defines an order on equations. (This is an arcane piece of machinery but a critical one in the overall attempt to get to the point where equations can be applied in one direction, thereby dramatically im... |
This question is related to my previous one.
Let the following recurrence relation be given: $T(n)=aT(\lfloor n/b \rfloor)+f(n)$ where $a\geq 1, b > 1$ and $f(n) = \Theta(n^{\log_ba})$. Then $T(n) = n^{\log_ba} + \sum_{j=0}^{\lfloor \log_b n \rfloor - 1} a^{j}f(n_j) = n^{\log_ba} + g(n)$. It should be proved that $g(n... |
A Quadratically-Constrainted Quadratic Program consists of optimizing a quadratic objective function while imposing quadratic constraints, which can be inequalities or equalities. Obviously, describing the problem with inequalities alone can suffice, as $a\le b$ and $a\ge b$ is equivalent to just $a=b$. For this reason... |
I am studying database from Database System Concepts.
The author was explaining foreign keys and referential integrity with the help of following schemas:
$$ instructor(\underline{ID},\space name,\space dept\text_name,\space salary)$$
$$ course(\underline{course\text_id},\space title, \space dept\text_name,\space credi... |
What layer of OSI model does define the route of information transmission between sender and receiver computers?
A) Session layer
B) Physical layer
C) Data link layer
D) Network layer
E) Transport layer
In this question I think answer must be Network layer.But my teacher insists that answer is Transport layer.Even th... |
I've been reading about min heaps, currently looking at this article, and I am very confused by something.
The article makes the following statement:
If a given node is located at index 'x' in the array, its left child
exists at index = 2x, and its right child exists at index = 2x + 1.
Each node's parent exists a... |
I have been trying to find if there are other matrix type representations logical circuits, in the example below, $$\begin{bmatrix} 1 & 0\\ 1 & 1\\ \end{bmatrix} \equiv \, \, \Rightarrow$$ where:
$$ \begin{bmatrix} X, \ \neg X \end{bmatrix}\begin{bmatrix} 1 & 0\\ 1 & 1\\ \end{bmatrix} \begin{bmatrix} Y \\ \neg Y \\ \... |
(I originally posted this on stackoverflow but thought it would be a better fit here)
I'm trying to understand the Ketama hash code used in consistent hashing.
link and snippet below:
public static Long md5HashingAlg(String key) {
MessageDigest md5 = null;
try {
md5 = MessageDigest.getInstance("MD5");
... |
What should be algorithm to find all the disjoint paths between any number of pairs of cells given in matrix?
We will say two paths will not intersect if there there is no cell common between any two paths.
My approach is : I will pick first cell pair and create a path between them. Now it will work as obstacle for pat... |
I have an LP with a (non-fixed) number of logical constraints in the form of $X_1 \rightarrow X_2$ (where $X_1$ and $X_2$ are linear functions inequalities of the $n$ input variables). To express these logical operations I introduce binary variables (as in here) $\gamma_1$, $\gamma_2$ so I end up with a Mixed Integer L... |
I have n elements to connect. Each element has a given length. My objective is to connect all the elements, so that I get one large, with length sum of all elements. The elements must be connected the way the same way they are inputed, but I can choose in what order to connect them. If I connect two elements, they will... |
What is the run time of the following piece of code in Big-Oh notation? The first loop runs n times in the worst case. But I am having difficulty in finding run time of nested loop which runs V / deno[i] times to be exact. So I think the total runtime would be O(n* V/deno[i])? Please correct me if I am wrong.
int deno[... |
Consider the following language
$L$ = {$<G><w>$ | $G$ is a CFG and $w\in L(G)$}
Now, I wish to prove that $L$ is Turing decidable. My gut tells me to construct a Turing machine that simulates a NPDA that decide whether $w$ is indeed in $L(G)$. The TM will hold two tapes: one for the input and another to simulate the st... |
My book states that the language
$$L_1 = \{a^nb^n\mid n\geq 1\}$$
is of type 2 (context-free) but not of type 3 (regular) since there is no regular grammar to produce it. However, I can't really imagine how this grammar should not be applicable or why it shouldn't be a valid type 3 grammar:
$$S \to aS \mid bS \mid b\,.... |
Compressibility is defined as
$$C=\frac{2^{HN}}{2^{H_{max}N}}$$
The book is made up of a simple alphabet of only {a,b,c,d} which occur with probabilities $$P(a)=0.2, P(b)=0.4, P(c)=0.1, P(d)=0.3$$
In class we were given the example of calculating the entropy of a simple string of coin tosses, where $N$ is the number of... |
If I have a set of processes, let's say 9 and I know the burst time and the waiting time for SJF algorithm and also know that processes arrive in groups of 3 processes at M1 moment, M2 moment, M3 moment (M1, M2 and M3 are given), how can I decide at what moment each process will arrive?
|
I know recurrence relation corresponding to quick sort worst case is
$T(n)=T(n-1)+T(0)+\Theta(n)$
and time complexity is $O(n^2)$.
This happens when we select pivot which is either largest element or smallest element in the current sub problem.
This can occur when array is sorted in either descending or ascending orde... |
If given any language L, how do I find the complement of said language?
I lack the basic understanding required to determine if a language is co-recognizable. I understand that a language, $L$, is co-recognizable if the complement of that language, $\overline{L}$, is recognizable.
But given a specific language, I have ... |
Recently, my demonstrator said that all instructions are eventually converted to zero-operand instructions just before they get executed. yet another demonstrator said that this "doesn't make any sense", and I don't know who to believe; none of them really gave any logical arguments.
So, I want to know is any of them r... |
I am new to minimum spanning trees. But have used the last few days on a problem I think matches MST, but cannot really figure out the connection.
The problem is a minimum cost problem where N ordered sections 1...N all need to be connected. I.e. section N_k needs to be connected to it's adjacent neighbors N_k-1 and N_... |
From this:
Maybe you already know this, but it's impossible to convert nurbs to bezier splines exactly because nurbs are rational functions, and bezier splines are polynomials.
I don't understand what it means, and don't yet know if it really means that there is absolutely no way to convert a NURBS curve into a cubi... |
Let assume that I have the following two automata A1 and A2 :
I have to do the intersection of the two, so I did this :
My question is related to the "∅". If I have two incomplete automata without dead states, and given a specific state, one automaton has a transition for one symbol but the second doesn't have it, w... |
Is there a good source on the type theory of HOL/Isabelle/other HOL-based LCF-style theorem provers?
|
Does order of traversing CFG matter in solving bidirectional dataflow problems, from a performance perspective?
|
This TED-ED video talks about some of the most basic sorting methods (bubble sort, insertion sort and quick sort,) in response to a scenario where a librarian ends up with a stack of 1,280 unsorted books, and must quickly sort them into alphabetical order.
A number of commenters pointed out that a far more practical me... |
Using a heap, you have O(log(n)) insertion and O(log(n)) removal. Using a linked list, you have O(n) insertion and O(1) removal.
Why is it better to have log-n for both than n for one and constant time for the other?
|
Wikipedia says that "a dense graph is a graph in which the number of edges is close to the maximal number of edges." and "The maximum number of edges for an undirected graph is $|V|(|V|-1)/2$". Then why do even use $ |E| = \Theta (|V|^2)$?, understand that $\Theta$ is the correct(tightest) bound in asymptomatic notat... |
Can any RAM BSS model based machine, or machines which are variants, recognize boolean languages(languages such as P, NP, or the like)? If so which languages are recognizable by RAM/BSS nachines, or its variants?(A variant could be to allow comparison. Or a RAM/BSS with weaker assumptions).
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.