instruction stringlengths 35 29.1k |
|---|
Monad laws in Haskell
Left identity: return a >>= f ≡ f a
Right identity: m >>= return ≡ m
Associativity: (m >>= f) >>= g ≡ m >>= (\x -> f x >>= g)
is widely known, and I think the "Left identity" rule does not make sense.
In category theory, it is true that Monads corresponds to Monoid, but this "Left identity" is t... |
An optional exercise from Programming Language Foundations asks
Can you think of a relation on commands that is an equivalence but not
a congruence?
An equivalence here refers to an ordinary equivalence relation. A congruence refers to an equivalence relation where the equivalence of two subprograms implies the equ... |
The following is Exercise 22.3-6 from CLRS (Introduction to Algorithms, the 3rd edition; Page 611).
Show that in an undirected graph, classifying an edge $(u,v)$ as a tree edge or a back edge according to whether $(u,v)$ or $(v,u)$ is encountered first during the depth-first search is equivalent to classifying it acco... |
I can see that Integer factorization problem is in NP. I am looking for a simple intuition behind this. For example if we take the problem of sorting the complexity is $n\log n$ for merge/quick sort where $n$ is the number of objects to be sorted. Along that line if take $n$ as the number to be factorized, then factori... |
I think the following problem belong to class P, but I don't know how I can prove it, could somebody help me?
Inputs: two numbers $(a,b) \in \mathbb{N}$
Output: $a^b$
|
Using grammar:
$
S \to aABe \\
A \to bcA \mid c \\
B \to b
$
to bottom parse a string $abcccde$, the course of action would be:
$
\begin{array}{c|c|c|c}
\hline
Step & Stack & Input & Action \\ \hline
1 & \epsilon & abccde & Shift \\
2 & a & bccde & Shift ... |
I'm trying to solve this recurrence relation using the iterative method and i keep getting the different answer from using the master theorem.
$$\begin{aligned}
T(n) &= 5T(n/2) +n^2 \\
&= 5^2 T(n/4) + (5/4)n^2 + n^2 \\
&= 5^3 T(n/8) + (5/4)^2 n^2 + (5/4)n^2 + n^2 \\
&= 5^k T(n/(2^k)) + n^2 \sum_{i=0}^{k-1}(5/4... |
I'm having difficulties with an exercise in a theoretical CS class.
The problem is:
let $L_{2}$ be a language defined as follows: after every "a" come atleast two "b" or after every "b" comes atleast one "a".
What is the CFG that creates $L_{2}$?
I'm struggling since 2h... I've found out that for example "abba" is not... |
As per Wikipedia, Algorithm for In-order Traversal of Binary Tree
If the current node is empty/NULL/None return nothing.
Traverse the left subtree by recursively calling the in-order function.
Display the data part of the root (or current node).
Traverse the right subtree by recursively calling the in-order function.... |
I am interested in the problem of deciding if a cut-set of a given size $k$ (i.e. the number of edges crossing the partitions is $k$) exists in a given bipartite graph (both the graph and $k$ are part of the input). Note that this is different from the problems of MINCUT and MAXCUT which simply ask to find the minimum ... |
we have to run a song on a Walkman,for that we need 2 full batteries.Let s say we have a mixed set of 30 batteries (15 are emtpy and and 15 are full)
and then only way to test if the battery full or empty is to put them in the Walkman and try it out.we can not tell which one is empty or full (one we put inside one full... |
It is to show, using a transition system, that the two formulas $A[FG p]$ and $AFAG p$ are not equivalent.
For me, it seems strange that they are not equivalent.
As the first one says that any computation path eventually has $p$ always true.
And the second one says that any computation path contains a state such that a... |
We have to run a song on a Walkman, for that we need 2 full batteries. Let's say we have a mixed set of 30 batteries (15 are empty and and 15 are full) and then only way to test if the battery is full or empty is to put them in the Walkman and try it out. We cannot tell which one is empty or full if we put inside one f... |
today I had to deal with this exercise:
If $x \approx y$, we might expect some cancellation in computing $log(x)- log(y)$. On the other hand, $log(x) - log(y) = log(\frac{x}{y})$, and the latter involves no cancellation. Does this mean that computing $log(\frac{x}{y})$ is likely to give a better result? (Hint: For wha... |
Let's say we have given matrix of size $N \cdot M$, only with zeros and ones. For each element in the matrix, we want to count subrectangles that are covering this element and are made only of zeros. We actually want only the sum of those value, not separately for each of them.
For example:
010 -> 201
001 -> 320
The su... |
Problem : Two players have in front of them a single pile of objects, say a stack of 7 pennies. The first player divides the original stack into two stacks that must be unequal. Each player alternatively thereafter does the same to some single stack when it is his turn to play. The game proceeds until each stack has e... |
I am making early forays into the application of algorithms to best solve a problem and I am finding it difficult to choose the best application.
The problem is give the data below (two columns) find those ids where the linkedId matches entirely:
Input
id linkedId
1 103
2 107
1 107
2 103
4 64
6 120
7 10... |
I'm trying to convert some English statements to first order logic statements and I'm trying to use Prolog to verify the translations. My question is: how do I convert a first order logic statement (having $\forall$ and $\exists$ quantifiers) into Prolog rules?
For example, there's this English statement:
Every voter... |
Consider the language $L = \emptyset\emptyset^∗ + \emptyset$.
How many words does $L$ contain? Zero or one?
Note: $\emptyset^∗ =\{\epsilon\}$.
|
So this is a question within a bigger question for which I've reduced to this so far:
If I have a tree (phylogenetic) with known weights for leaves, how would I find the weights for all internal nodes such that the sum of the differences between the weights of two endpoints of edges is minimized?
I.e. Given a tree $T$... |
How do we show $$\lambda x . x (\lambda y .y) \equiv_{\alpha} \lambda y.y (\lambda x . x)$$?
I was going through the slides here and it asked to do the above but by page 16 of the slides we have not defined what lambda applications are suppose to be. Thus is remained complete unclear because I don't know what the synt... |
The answer is no to what i have learned but i am finding difficulties to absorb it reason being . We say for every language we have a grammar as language without grammar makes no sense even in general scenerio also. i have taken this argument as my base for the conclusion of my answer as i found this argument somewhere... |
I wanted to show:
$$ (\lambda x . (\lambda y.x))yx \equiv_{\beta} y $$
the definition of beta equivalence is on page 17 of these notes.
I did a few attempts but got different things like $x$. I think my main confusion is how to interpret:
$$ yx $$
at the end. Does that mean we are applying $x$ to $y$ or that we are app... |
There are $n \times m$ coins lying on an $n \times m$ grid. Each coin is either facing up or down initially. We can do the following operation repeatedly:
Flipping a row of coins;
Flipping a colomn of coins;
Flipping a diagonal line of coins;
Flipping a counter-diagonal line of coins.
The problem is to check whether... |
It seems to me that Turing could've just presented the following argument:
Theorem: Given a computational model $\mathcal{M}$ capable of conditional branching and indeterminate repetition the halting problem of $\mathcal{M}$ is undecidable from within $\mathcal{M}$.
Proof: Suppose $H$ solves the halting problem in $\ma... |
If we have $L \in p$ and $L' \neq \emptyset$ and , $L' \neq \Sigma^*$ . is $L \leq^p L' $ ?
I read this question Reduction between $\Sigma^*$ and $\emptyset$
Maybe this question is irrelevant to my question, but I'm little seconfused.
|
I was testing performance of NodeJS vs GoLang with a very simple script. Situation one is three nested for loops to do a Sin calculation and Situation two is just one for loop.
It turns out that for three for loops, NodeJS is much faster (about 3 times), but for one for loop Go is much faster (about 3 times as well). C... |
Can someone explain what is the reason for thread-pooling in Linux, even if the threads are light to create and destroy??
|
I have asked this question on Stack Overflow, I am asking it here in the hope to get more traction.
The relative rounding error for a floating point number x is defined as
$e_r = |\frac{(round(x) - x)}{x}| = |\frac{round(x)}{x} - 1|$ (1)
Assuming that the rounding to nearest mode is used for $round(x)$, the absolute ... |
I want to analyze complexity of traversing a BST. I directly thought that its complexity as $O(2^n)$ because there are two recursive cases. I mean $T(n) = constants + 2T(n-1)$. However, AFAI research it is $O(n)$. Can you show it how come and my wrong?
void printInorder(Node node)
{
if (node == null) ... |
The most common proof for Floyd-Warshall's algorithm is an induction proof on the outer-most loop, which says
$\delta^k(i,j)=\begin{cases}
\min\{\delta^{k-1}(i,j),\delta^{k-1}(i,k)+\delta^{k-1}(k,j)\} & \text{for}\,k\geq 1\\
w(i,j) & \text{for}\,k=0\,\text{(i.e., base case)},
\end{cases}$
where $d^k(i,j)$ is the short... |
I'm taking a computer theory class and my professor told us that a pushdown automaton cannot use data structures other than a stack (like a queue or multiple stacks). Why is that?
|
I am trying to solve the following problem:
Input is $2D$ array of integers, $M$, which corresponds to friendship relations. For example, if $M[1][2]=1$, $1$ and $2$ are friends (assuming symmetry it is also true that $M[2][1]=1$). If $M[2][3]=1$, then $\{1,2,3\}$ is a community. If all other entries are $0$, then $\{0... |
Can anyone help me construct a deterministic PDA for the following language:
$$L=\{w\in(a,b)^* \mid \#_a(w)\neq \#_b(w)\}$$
Or can anyone check if the following solution is correct?
|
Question 1: Is it possible to create an algorithm for deterministic Turing machine that will run not in P neither EXPTIME?
Question 2:
For me it seems that the answer for my question is it is impossible. If my reasoning is correct, it means that any function that describes complexity will have polynomial(x) or 2^polyno... |
In computational geometry, is there any algorithm to find all vertices that are inside of a shape?
All vertices of graph has $x$- and $y$-coordinates
Shape is a set of points with $x$- and $y$-coordinates (unicyclic graph)
I need a fast algorithm. I am trying to avoid iterating over all vertices
Example:
|
I was reading through the computer network fundamentals. I noticed that there are headers added at each layer in the OSI model. However, can we not have just one header above the App layer that defines the header details of every layer ?
I would think answer would be No. But any reasons why ?
Thanks
|
I've already asked this question on stack overflow, but guys have suggested me to ask my question here.
Let's consider classic big O notation definition (proof link):
The $O(f(n))$ is the set of all functions such that there exist positive constants $C$ and $n_0$ with $|g(n)| \leq C \cdot f(n)$ for all $n \leq n_0$
Ac... |
I'm working on a problem for a P2P network for games. The problem is the following:
Consider two opponents on a grid, each stores it's own position.
Player 1 wants to know if it sees player 2. In other words, if player 2 should send it's positional data to player 1 without revealing it’s position in the process.
The pr... |
I have $8008$ binary grids of size $6 \times 10$ (they are all grids with the property described below), which I want to distinguish between with at most $13$ queries. A query will determine if the cell $A_{i,j}$ of a grid is $0$ or $1$.
The grids all have a nice structure. If you find a $0$ in a cell, all cells above ... |
I’m working on a project that involves a robot and a very large number of reference points. The robot moves around, while the reference points are fixed in space. I would like the robot to be able to tell which reference points are within a fixed distance of it at any point in time. This must be done in an online fashi... |
There is a proof in Sipser showing that $NL = coNL$ (theorem 8.27 in the 3rd edition).
In the proof idea, the first sentence is: "We show that $\overline{PATH}$ is in $NL$, and thereby establish that every problem in $coNL$ is also in $NL$, because $PATH$ is $NL$-complete." I'm having trouble understanding this.
Sipser... |
I have been looking through the recursive formulation for the coin change problem here and am wondering if it is possible to define the function $ C(N, m) $ in one parameter as $C(N)$, therefore not depending on the set $ S_{m} $? What would this function look like in general? If a concrete example is needed what would... |
My question is that can we say that runtime of the binary search is $\Omega(\log n)$?
I know it is both $\Omega(1)$ and $O(1)$ for the best case, and $\Omega(\log n)$ and $O(\log n)$ for the worst case. And for this reason the time complexity of binary search is $\Theta(\log n)$.
However, I still cannot interpret if ... |
The generalized perceptron convergence theorem is for a defined threshold T.
When you do the maths it all comes to an upper bound and a lower bound.
The lower bound looks like this!
Therefore
$$ (x^{\ast})^T x(k) > k \delta. \qquad\qquad (4.67)$$
We can see if the threshold is equal to zero, this is still true.
But w... |
In a sliding window ARQ scheme, the transmitter's window size is N and the receiver's window size is M. The minimum number of distinct sequence numbers required to ensure correct operation of the ARQ scheme is
min(M,N)
max(M,N)
M+N
MN
Answer given is M+N but my understanding is
According to the given question the com... |
I'm currently studying a paper which uses extensively the term 'min-max theorems' in graph theory, and claims to present a tool allowing to generalize these theorems. (here is the link to the paper if needed)
Among those, we can find for example :
The max-flow-min cut theorem.
Edmond's disjoint arborescences theorem (... |
I am reading the introductory chapter in Parameterized Algorithms by Cygan et al. and I am having some problems with the distinction between complexity classes $\mathsf{W[1]}$ and $\mathsf{XP}$.
They explicitly define complexity class $\mathsf{XP}$ on p. 13 as the those problems that, given an instance $(x, k)$ of a p... |
I was going through the lecture of prof. Erik Demaine and he said that a problem X is NP-Hard if it is at-least as hard as every problem Y that belongs to NP class.
He further said that if we can prove that there exists a problem that belongs to NP but not to P, then we can absolutely be sure that NP hard problems don... |
First of all I did find similar questions here on Computer Science but nothing what would provide real answer for this problem.
I have a graph which i condense into SSC (strongly connected components) by Kosaraju's algorithm. Now what I need is to find connections between those SSCs. The best would be to somehow inject... |
For a constraint satisfaction problem, what does it mean for an assignment x to extend an assignment a?
Sorry if this is super trivial, I did not find an answer
e.g here: No Small Linear Program Approximates Vertex Cover Within a Factor 2 − $ \epsilon $ pg 16 x does not extend \alpha
|
This is the definition of simple grammar that I got from the book "Formal Languages and Automata" by Peter Linz.
There is a homework question that asks for a simple grammar for the language L(aaa*b + b).
This is the answer that I found.
I don't see how this could be right, or much less how there could be any answer to... |
Been trying to figure it out for an hour myself and another hour looking around, I cannot find anything with the $c^{mn}$ part.
$$L=\{a^mb^nc^{mn}\mid m>n\}$$
|
I lack the vocabulary to appropriately express the question succinctly, so I apologize if the title question is confusing.
Suppose you can define a binary infix operator that produces tuples, and you want this operator to be able to simultaneously:
Extend a tuple to arbitrary length by appending additional elements
Su... |
Problem statement:
Let $\Sigma = \{a, b, c\}$, and consider the task of multiplication encoded in the language $L = \{a^n b^k c^{nk} : n \geq 0, k \geq 0\}$.
Prove that L is not regular using the pumping lemma.
Relevant sources:
Sources (from three different people) arguing in favour of cases (where the links that are... |
I'm trying to find out how to determine the size of the matrices $n$ such that Strassen's algorithm for matrix multiplication is better than the regular algorithm. I know that Strassen's algorithm is $\Theta(n^{lg 7})$, and regular matrix multiplication is $\Theta(n^3)$.
My reasoning goes along the following lines:
W... |
Let $n$ be any positibe integer and set $N=\{1,\dots,n\}$. Now select two arbitrary but different subsets of $N$, say $S$ and $S'$. We are interested in finding a function $\pi(A)=\sum_{i\in A}a_i$ such that we always have $\pi(S) \ne \pi(S')$. For example, we can define $a_i = 2^i$. This function satisfies the propert... |
Here is a modification of the weighted interval scheduling problem.
Given $n$ intervals by their end points $s_i$ and $t_i$ for $1 ≤ i ≤ n$, I want to minimize number of intervals so that every interval has a nonempty intersection with one of the selected intervals. In other words, select $S ⊆ {1,..., n}$ such that for... |
As said the answer is pretty simple "no", but that is not what i encountered. Here is the summary : i took a regular language , produced two ways of accepting same language (the ways in my understanding produce same language -please correct me if i am wrong ),then formed the minimal DFA for both of them,used equivalenc... |
I apologize for the lack of an even better title. The main reason I couldn't find a better one is because I have a problem that I cannot find reference anywhere. I am pretty sure it has a name, but I'm afraid I simply don't know it.
I'm given an algorithm that starts with four numbers $a$, $b$, $c$ and $d$ which can be... |
Problem:
There are $n$ points on a map, $p_1,..p_n$. There are two officers located initially at $(0,0)$ coordinate. They want to patrol all of these points with a minimum traveling (each officer separately patrol a point). The point $p_i$ must be visited before $p_j$ if $i< j$
I can write a backtracking algorithm to c... |
I am currently reading about the Halting Problem in my course on the theory of computation and the following was given in my lecture slides
Now my question is that if $d$ is the description of a Turing machine, what exactly is $d$ from a strictly mathematical point of view? The way that $d$ is written above seems to ... |
An algorithm is requested to calculate all balanced binary trees which can be built with $N$ nodes, having exactly $L$ leaves. A balanced tree is a binary tree in which the difference between the heights of the left and right subtrees is at most 1, and the subtrees are themselves balanced.
I tried to use dynamic progr... |
I encountered this problem from game development which I will formulate in a more formal way:
Given a sequence $A = a_1, a_2, \dots, a_m$ and a permutation of $\{1, \dots, n\}$, $B = b_1, b_2, \dots b_n$, find all $i$ such that for all $1 \leq j \leq n$, $a_{i + j}$ is the $b_j$th smallest element of $a_{i + 1}, a_{i ... |
I would like to know where I can find challenging exercises that ask to prove the correctness of an algorithm.
The invariant of most of the exercises I’ve found on the internet are quite easy (factorial, binomial coefficients...).
That’s why I was wondering if there exist a book or some online ressources where I can fi... |
For language $L = \{ x \in \{a,b\}^* \mid \#_a x = \#_b x \}$, I came up with the following CFG:
$$S \rightarrow aSbS \mid bSaS \mid \varepsilon.$$
It can be easily shown that it is correct (quick example, for string $x = aabb$ we have these derivations: $S \rightarrow aSbS \rightarrow^* aaSbSb\varepsilon \rightarrow^*... |
I am probably just missing the correct term for my problem to find the solution but here it goes:
I have a set of tasks with a given duration and an interval for each task in which it has to be completed. I now need to find start times for the tasks, so that
each tasks is completed within its interval
no task overlap... |
It seems impossible for me to find a pattern for integers $n$ such that $$n \equiv 1 \quad(\bmod 7)$$ in order to construct this DFA.
Is there smart way to do it without a machine which has memory or completes operations? A hint would be greatly appreciated.
|
If we consider any smoothing technique like laplace or delta smoothing. Intuitively we can see that the we are stealing from sequences with non zero probablity and re distribute to sequences with zero probablity and there by it should be a probability distribution function. But how do we prove this mathematically say f... |
Given $L=\{a^ib^jc^k | i\neq j \space and \space j=k\}$.
Is this CFL? How do I write CFG for it or prove it with pumping lemma?
Thanks.
|
Say we want to place n items on the real line. Let us denote the position of item i by $p_i$. We have interval constraints on the position $p_i$, i.e. we are given $l_i, r_i$ such that $l_i \le p_i \le r_i$. My problem is: given a specific item s, how do I compute the maximum gap possible to the right of s? By maximum ... |
So from the above diagram, we can move either right or down. So a binary tree is built that way. It's written "If we had intermingled common nodes across different branches, we would have got a graph instead" I am unable to visualize how a graph can be formed out of this. Will it be a graph with only 2 columns? Please... |
Can I reduce the find max (or find min) problem to the sort problem? Because if so, knowing the lower bound for find max is Ω(n) I can also infer that the lower bound for sorting is Ω(n) too?
I'm confused with this spread of lower bounds and applicability of reductions.
|
I am trying to prove that given a DAG. There exists a valid topological ordering that has v in front of u iff there is no path from u to v. The proof is related to the fact that reverse DFS post visit order satisfies the condition of topological order.
How do I construct a proof?
|
Consider the situation, when you're given M byte arrays of size N, and you need to check if all of them have unique content (so there are no two arrays that have the same sequence of bytes). What would be the best option to check this condition?
From my point of view, there are several approaches available for this pro... |
Let $C$ be an array with length $n$ (assume the elements are cities with some properties). We have some properties sorted by importance. For example, 1.area, 2.population size, .... We use the following algorithm to find the best city according to sorted properties:
We choose the first property and examine each city. T... |
Consider a system with a two-level paging scheme in which a regular memory access takes 150 nanoseconds, and servicing a page fault takes 8 milliseconds. An average instruction takes 100 nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is 90%, and the page fault rate is one in every 10,000 instructio... |
I have a problem. I want to know how to solve this in polynomial time (is it possible?).
There are $n$ customers that must be served by single machine. For every customer $C_i$, it has a profit $P_i = a_it + b_i$ where $t$ is the finish time and $a_i<0$. Yes, the profit can be negative. For every customer $C_i$, it has... |
Unlike traditional problems dealing with push and pop sequences of distinct numbers, I would like to know the procedure to determine the validity of the stack operations for sequences of non-distinct numbers.
For example,
Push : 1 2 1 2 2 2 1
Pop : 2 2 1 2 2 1 1
is a valid operation for stack.
Any way to figure this ... |
Past few days I've been struggling with floating point number exercises, trying to learn how they work and what are their limitations. The exercise I've encountered today is as follows:
The Euclidean norm of an n-dimensional vector $x$ with components $x_{1}...x_{n}$ is defined by:
$$||x||_{2}=\left(\sum_{i=1}^{n} x... |
What are some examples of when to use preorder/postorder practically? When does it make more sense than in-order?
|
I need help with the following practice problem on network flow:
A cohort of $k$ spies resident in a certain country needs escape routes in case of emergency.
They will be travelling using the railway system which we can think of as a directed graph $G = (V, E)$ with $V$ being the cities. Each spy $i$ has a startin... |
For the following algorithm,
$X\leftarrow \{(i, n - i) | i = 1, ..., n- 1\}$
while $\max_{(a, b)\in X}b > 0$ do
$\quad X \leftarrow \{(|a - b|, \min\{a, b\})|(a, b) \in X\}$
return $\max_{(a, b)\in X}a$
show that the algorithm does not run in $o(n \log ^k n)$ for any constant $k$.
Summary: the algorithm uses the Eule... |
I am following a course on complexity theory where languages are a part of the course. There is a proof that no matter how hard I try to understand, it is till so complex that I cannot make it to half of the proof. Namely, the proof of the statement that the intersection of a CFL and a regular language is again CFL.
Th... |
Please consider the following question given in a booklet:
I have read about databases from Database System Concepts - by Henry F. Korth, but never saw an instance where we could do a NULL comparison in relational algebra queries - unlike SQL queries.
(C) is given the correct option, but my question is:
Is the stateme... |
Is it possible to solve the max sub-array product problem using divide and conquer?
Given an integer array numbers, find the contiguous sub-array within an array (containing at least one number) which has the largest product.
Example 1:
Input: [2,3,-2,4]
Output: 6
Explanation: [2,3] has the largest product 6.
|
Let $(Q,\Sigma,\delta, q_0, F)$ be a finite automaton, does
$$
(q_1a+q_2b)c=q_1ac+q_2bc
$$
hold for any $q_1,q_2\in Q$ and $a,b,c\in \Sigma$?
Here $Sa=\{\delta(q, a)\mid q\in S\}$ and $qa=\{q\}a$ for any $S\subseteq Q$, $q\in Q$ and $a\in\Sigma$. The operation "$+$" means set union.
|
I solved a problem similar to the knapsack problem.
There are two packages with a capacity of $P$ on a production line. We want to put $N$ items in them with the weights $w_1,...w_n$ in a pre-defined order (the best order). We can put an item in the package 1 or the package 2 or close one package and replace it with a ... |
I am reading William Stallings operating system book which gives this pseudo-Code for disabling interrupt to achieve Mutual Exclusion
while (true) {
/* disable interrupts */;
/* critical section */;
/* enable interrupts */;
/* remainder */;
}
But I don't get why there is a While loop in the code which is true
thi... |
I know that RAID-5 consists of block-level striping across multiple disks, but using an additional parity-check block on each disk .. and that at least two disks are required for striping.
And it's obvious that each parity block is specific to each disk it belongs to (and so there is no need for allocating an additiona... |
Given rank deficient matrix $A$, I want to randomly construct vectors $\vec{x}$ such that:
$0 \le x_{j} \le 1$
$0 \le b_{j} \le 1$ where $\vec{b} = A\vec{x}$
Matrix $A$ is about 10 x 15. I want to generate $10^{5}$ $\vec{x}$ as an initial guess in each iteration of a solver.
Below is my attempts.
Least square and re... |
Hi everyone and first of all thank you for been reading.
I'm a little confused about data hazard dependences when a "Store" instruction is followed by a "Load" instruction.
(Assume that we're working with a 5 stages pipeline processor withouth data forwading paths)
So if I have the following code now:
Store R3,R8,of... |
I am trying to use a genetic algorithm to solve a problem. However, I find it difficult to represent the chromosomes in my problem. In the problem, I have two categories of parameters, and each gene inside the chromosome has a specific range of values.
For example, Category $A$ has chromosome $X$ that has the following... |
I am looking for references to efficient algorithms that solve knapsack problem where all profits are equal.
More formal definition of the problem from a Wikipedia article on KPs:
If all the profits are 1, we will try to maximize the number of items which would not exceed the knapsack capacity:
maximize $\sum_{j=0}^n ... |
Neural networks in machine learning are inherently a continuous model of computation. Yet we use digital logic circuits with floating point numbers to "emulate" this continuity.
I am wondering: is there a possiblity to develop an analog-based ASIC for neural networks, which might fit them well due to their inherent co... |
The books I'm reading on complexity theory primarily are about complexity of decision problems by Turing machines.
I'm interested in computational complexity of circuits, both boolean and continuous circuits (I'm not sure to what extent there is a complexity theory of continuous circuits). Do you know of a good introdu... |
I'm reading a blog post on deep Q-learning, and it contrasts traditional lookup-table-based Q-learning with deep Q-learning:
What I wonder about in this picture is: Why does the deep NN not also take a state and action as input? I assume that this has something to do with computational efficiency. Essentially, in th... |
I know that similar questions have been answered several times, and based on the answers, I attempted a solution to my problem. But I simply do not get the right results. The problem is as follows. I wish to solve the following optimization:
$max(ax_1)$
subject to
$x_1 = |x_2-x_3|$
where $a$ can be both positive and ne... |
Working with fixed size integer representations,
use a number system with b-complement notation, base b = 9 and
n = 4 digits.
What is the smallest number that can be represented in this number system?
State the number in decimal, and also express it in this number
system.
I assume that it will be 0888 for max, and 800... |
Could the run-time of the Strassen's algorithm be improved by adding Memoization to it?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.