instruction stringlengths 35 11.4k |
|---|
Following Deep MNIST for Experts tutorial on Tensorflow, I realize I don't understand where the choice of numbers comes from when initializing weights.
In the tutorial, they first show the below function for creating random weights.
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return... |
Is it possible to transform binary strings of length $2^n$ to $n^c$ binary strings of sized $n^d$ such that
$$\forall s_1,s_2 \; \exists i \in \{1,\cdots,n^c\} \; f_i(s_1)\neq f_i(s_2),$$
Where two strings $s_1,s_2$ have length $2^n$ and $\forall i\in\{1,\cdots,n^c\}, \; f_i(s_j)\leq n^d, \; j\in \{1,2\}$?
It seems ... |
I'm trying to understand and use the Faster R-CNN algorithm on my own data.
My question is about ROI coordinates: what we have as labels, and what we want in the end, are ROI coordinates in the input image. However, if I understand it correctly, anchor boxes are given in the convolutional feature map, then the ROI regr... |
I would like to ask for references to algorithms that can project shape information about an object to 1 dimension. Specifically I am training a neural network to be able to identify objects with similar shape as the ones in the training set. The objects in my case are molecules for which the positions, masses and radi... |
Given a connected, undirected, weighted graph $G$, the following "cut condition"
For any partition of the vertices of $G$ into two subsets, the minimum-weight edge with one endpoint in each subset is unique.
is not necessary for $G$ to have a unique minimum spanning tree.
However, is this "cut condition" sufficient f... |
I am working on a cryptography project. Let's say I want to build a public key cryptosystem using the 3-partition problem, which is NP-Complete, as a basis (just like RSA uses integer factorization).
Now, I am having trouble coming up with a trapdoor function that helps me enconde it. Let's say I have $T=\{t_{1}, t_{2... |
I am studying about PIO mode and DMA mode for accessing IO devices, and based on what I have read, in PIO mode the data transfer have to go through the CPU.
So I have unchecked DMA in Windows 7 (which I guess will enable PIO mode):
And I copied and pasted a large file to see the CPU usage, and the CPU usage was still ... |
I'm currently studying informed search algorithms.
I've found a paper telling that A* is a recursive algorithm but I can't see where's the recursion part of this algorithm.
Why is A* considered as a recursive algorithm?
|
How does a demultiplexer ignore/discard/block the non-required outputs?
A demultiplexer channels the input to one of the outputs, but there are several outputs. When one output is selected (depending on the state of the select line(s)) then rest of the outputs are 0/low (am I right?).
Now, if the input is 0/low then t... |
Any r.e. subset of $A\subseteq\mathbb{N}$ which contains the set $$\mathrm{Tot}=\{i\mid i\ \mbox{is an index of a total function } f\}$$ must, by a standard argument (of Post?) contain some partial recursive function indices.
Given a partial function index (and every total function), it's pretty easy to construct many ... |
There is a language:
$L=\{w: w\in \{a,b\}^*, |w|_a\ \equiv |w|_b \equiv 0$ $(mod$ $5) \}$. My idea for DFA is - we count number of $a$$\pmod{5}$ and separately we count number of $b$$\pmod{5}$. So we end up with $5*5=25$ states, because each state have to keep track for both number of $a$ and $b$$\pmod{5}$. Is there a... |
So given some erroneous Reed Muller code-word's syndrome as well as the Parity-Check/Generator Matrix how would one find the error vector?
The approach I took naively was to build the syndrome table, and use the syndrome to find the expected error vector, but unfortunately its too costly and for systems where $m \geq 1... |
I have the following quotation from my compiler's course (in the context of graph coloring):
Because it is slow, graph coloring tends to be used in batch
compilers, while linear scan tends to be used in JIT compilers.
I couldn't find a clear definition online. So, what makes a compiler be a batch compiler?
|
what is the height of avl tree with n nodes ? Can you explain it with formula ? I couldn't find any formula to solve this problem.
|
I want to use these two functions in two hash-tables with open-addressing. Is there any problems with these functions? If yes, why they are not appropriate?
H(k,i) = (k mod m + 3i mod m) mod m
H(k,i) = (k^2 + 2k + i(k mod m)) mod m
|
Suppose you design a computer with a ten-stage Pipeline to execute one instruction, with each stage taking 5nsec
A)how long will it take to execute a program that has 30 sequential instructions.
Answer: 195nsec
B) how long will it take to execute a program that has 30 sequential instructions in a non-pipeline computer... |
A magnetic disk has 1000 cylinders, 10 tracks per cylinder, 128 sectors per track, 1 KB per sector. The rotation time is 6 msec, maximum seek time is 150 msec, switching between adjacent cylinders takes 15 msec, and switching between adjacent tracks within a cylinder takes no time. Assume this disk has 4 MB of data sto... |
This was from a test from my university:
Consider $T = t_1, t_2, \cdots, t_n$ a set of intervals of the form $(s, e)$, representing the start and end time, respectively. Now, select the minimum number of intervals such that their "union" intersects all other intervals. The question then asked for an optimal greedy algo... |
I have two questions,
Does $T_\mathrm{best}(N) = O(f(N))$ imply that $T_\mathrm{avg}(N) = \Omega(f(N))$?
Does $T_\mathrm{avg}(N) = O(f(N))$ imply that $T_\mathrm{best}(N) = O(f(N))$?
Where,
\begin{align*}T_\mathrm{best}(N) &= \min \{T_1, \dots, T_N\}\\
T_\mathrm{avg}(N) &= \frac1N \sum_{1\leq i\leq n} T_i
\end{align*... |
Given a type hierarchy $(\tau,\sqsubseteq)$ and a signature $(VSym, FSym, PSym, \alpha)$, one says that the typing function $\alpha$ assigns to each variable symbol $x \in VSym$ a non-empty type $A \in \tau \setminus\{\bot\}$ and is written as:
$$ x: A \tag1$$
Furthermore, for every type $A \in \tau \setminus\{\bot\}$,... |
I have a problem in my Algorithms Class which i am trying to solve for the past two days but I can't. I want to fully fill a container with the MINIMUM number of given boxes with dynamic programming. My container has a certain size and I have different box sizes AND quantities of them (so i have 24 boxes of size 20, 15... |
Splay trees offer armotized O(log n) access to tree elements. However, if you keep repeatedly appending elements to a splay tree, without splaying any other elements, it degrades into a linked list with O(n) access. Is there a way to avoid that? I have the idea of splaying a random element during an append, but will th... |
I'm working out some details to implement a division algorithm, I'm following the explanation given in this book (chapter 5) for who is interested.
Anyway I need to work out how many bits are necessary to represent a value $\omega$ bounded by
$$
| \omega | \leq \rho r^{k+1} y
$$
where
$$
\begin{array}{l}
\frac{1}{2} < ... |
In my theoretical computer science book I have the following statement regarding the space complexity of $f(n)=2^n$:
$$\log(n) = O(f(n))$$
I can't understand how this is true, any help will be greatly appreciated.
|
I've found a simple multiply-with-add hash function in an old Usenet post.
Can someone identify what hash algorithm is it? An algorithm name or any attribution?
size_t hash(const char* data, size_t length, size_t seed = 1)
{
for (size_t i = 0; i < length; i++)
{
seed = seed * (UCHAR_MAX + 2U) + data[i];... |
When running Dijkstra against the following graph:
1 3
A -- B -- C
\ /
2 \ / 1
\ /
D
...I come up with the following:
Current
A B C D
A 1(via A) - 2(via A)
B 1(A) 4(via B) 2(via A)
C 1(A) ... |
When working with certain low-powered / embedded CPUs that are bad at using the stack, I need to avoid putting local variables there, instead opting to make them static variables. But this can waste a lot of address spaces since not every local in every function needs their own unique address. Rather, by looking at the... |
I've been recently studying inline caching as a technique to optimize method dispatch in object oriented languages. Basically, the idea is that one can remember what was previously dispatched and predict that things will go on in the same way.
My question is whether this technique has been used in pure functional lang... |
The Multiple-Choice Multi-Dimensional knapsack (MMKP) problem is defined as follows. The input is $N$ groups of items, each item in each group has a value, and requires $m$ resources. The total available resources is given by a vector $R = (r_1, r_2, .., r_m) $. The goal is to choose exactly one item from each group, s... |
There is a contradiction in the Johnson’s algorithm presented in CLRS edition 3 page 700 that I can't understand.
Johnson’s algorithm uses the technique of reweighting, which works as follows: for each edge $(u,v)$ that may has a negative weight, a new weight is assigned which is as follow:
Given a weighted, directed ... |
INSTANCE: A two-way nondeterministic finite state automaton A over single Alphabet I.
QUESTION: Is there an string x (over I) such that A accepts x ?
Since a 2-way NFA with N states, there’s an equivalent nfa with n^(n+1) states. So that’s we get the exponential time from.
I am clear about that, but if I understand co... |
I was experimenting with a WAVL Tree code I wrote.
One thing I noticed is that on average, there was much less rebalancing actions after delete than after insert. In fact, average rebalances after insert were about 2.5 per insert, and 1.8 per delete.
This results were consistent, even when we inserted and deleted in co... |
I am trying to solve this algorithm exercises (http://neuralnetworksanddeeplearning.com/chap1.html#exercise_513527) in Michael Nielson's online book: Neural Networks and Deep Learning (http://neuralnetworksanddeeplearning.com/chap1.html#complete_zero).
In another word, he says that there is a way to use four neurons t... |
Suppose you design a computer with a ten-stage Pipeline to execute one instruction, with each stage taking 5nsec
A)how long will it take to execute a program that has 30 sequential instructions.
Answer: 195nsec
B) how long will it take to execute a program that has 30 sequential instructions in a non-pipeline computer... |
prove that for every $0 \le \alpha(n), \beta(n) \le1 \; s.t.$ there exists $c \in \Bbb{N} \;s.t \;\alpha(n)+\beta(n) \le 1- \frac{1}{n^c}$ then $BPP(\alpha(n), \beta(n)) = BPP$.
I tried to show that by running k times we can get the error to be exponentially small using the chernoff inequality, for $0\le\delta\le1$
$$p... |
I have recently come across the following papers:
S. Baktir and E. Savas. Highly-parallel Montgomery multiplication for multi-core general-purpose microprocessors.
In E. Gelenbe and R. Lent, editors, Computer and Information Sciences III, pages 467–476.
Springer London, 2013.
P. Giorgi, L. Imbert, and T. Izard. Parall... |
I'm trying to find time complexity $T(n)$ of the algorithm by a given pseudocode:
1: for i:=1 to N do
2: begin
3: len := 1
4: while i - len >= 1 and i + len <= N do
5: begin
6: if a[i] > a[i - len] and a[i] > a[i + len] then
7: len := len + 1
8: else
9: break
10: end
11: print(i, len)
12: ... |
I need to find the shortest path in a Directed Unweighted Cyclic graph. And it has to be optimal (find a path if exists one) and also optimal in terms of space and time complexity, being time complexity the most important.
I think BFS is the solution. But am not sure.
What I am doing is mapping database tables into a g... |
I have the following problem, create a Grammar on the Language {1,0} that accepts
"strings with a length divisible by 3, or strings with a number of 0s divisible
by 3, or BOTH".
I created grammars for each part, but I'm not sure how to account for the "BOTH" clause.
I started by making a regular expression:
1*(01*... |
I found this question here but I don't think the answer is correct.
Here is the original word break question:
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
Return all such possible sentences.
For example, given s = "catsanddog", dic... |
In the field of deep learning, people often talk about factors of variation which, in my understanding (in terms of dimensionality reduction), are the latent variable directions capturing variability in the data. I also often come across the term distributed representations which are basically the features of the input... |
Please can someone confirm that my description of the application of Dijkstra's algorithm is correct for this graph?
1 3
A -- B -- C
\ /
2 \ / 1
\ /
D
Step Current Node
B C D
1 A 1(A) - 2(A)
2 B 1(A)... |
Continuing from this answer: https://cs.stackexchange.com/a/56072/43035
I don't understand how it's possible to map many transition functions $\delta_1,...,\delta_n$ of a NDTM into just two transition functions $\delta_0',\delta_1'$. How will conflicts be handled?
For example: $\delta_1(q_1, a) = (q_2, b, R)\\ \delta_2... |
Consider the following problem:
given an undirected graph with weighted edges (positive and negative) I would like to know if there is a k-length acyclic path with negative weight.
Is there an algorithm for that with a good complexity?
Maybe I can find the lighter k-length acyclic path and check if is negative, but it ... |
As I understand one can modify BFS for unweighted graph or Dijakstra for weighted graph to find all possible shortest paths from $s$ to $t$ in linear time. But how can this be, when there are $O(2^n)$ such paths?
What am I missing here?
|
I've come with an idea for reduction from the set-cover problem to the vertex-cover problem, But I'm not sure if this reduction is correct. I saw in this post's comments that "There cannot be a nice reduction of this sort".
Consider the set of $S$ to be $S_1,...,S_n$ where the element of $S$ is $s_1, ..., s_m$. In the... |
This is a question based on this one
I've also tried this problem but I can't seem to understand Henry's solution to it.
Why is the average distance between the sticks $(n+1) / (k+1)$ and not $n/ k$
|
I have a small problem with the first order logic, in particular, predicate logic
Let us take this sentence as an example:
Each teacher has given a form to each student.
From this sentence, can we have different reading?
This is my try to solve such problem, I did not know if this is the answer for such question:
Ever... |
Kleene's recursion theorem implies that every Turing complete programming language that satisfies certain properties have quines. This website claims that this is incorrect, and that there is a Turing complete without a quine.
I give a slightly simplified version of what they gave. Start with a Turing complete programm... |
I was thinking of grammars for indendation-sensitive languages and it looks like CF grammars would do the trick if combined with parameters. As an example, consider this fragment for simplified Python grammar in ANTLR-like format:
// on top-level the statements have empty indent
program
: statement('')+
;
//... |
I have two numbers, which are each the product of a large number of smaller numbers that I know. I want to find the GCD (Greatest common divisor) of these two numbers. Is there any way I can make use of the partial factorization I have to speed up the process?
In particular, each larger number is the product of $2^{15}... |
Can anyone let me know, why 2PC is blocking when the coordinator fails? Is it because the cohorts don't employ timeout concept in 2PC?
Good reference: Analysis and Verification of Two-Phase Commit & Three-Phase Commit Protocols, by Muhammad Atif,
Elaboration of the question:
Let’s say, a coordinator sends 1st message (... |
Weak semaphores are often defined as
if a process (or thread), say p1, performs a V operation and some
other process is waiting on that semaphore, then the first process
(i.e. p1) is not allowed to immediately perform another P operation on
that semaphore. Instead, one of the waiting processes must be given
it... |
I know that given the following huffman tree:
you can say that C occurs most in the dataset from which it was generated and D and B occur the least. Can you also say that the left most leaf on a level has a occurence that is greater than or equal to the rightmost?
|
I shall call this the "Curtain Hook" problem.
Please excuse my lack of formal maths notation as it has been over 20 years since I have needed it.
A standard pencil pleat curtain has L number of loops on the back (evenly spaced along the width) with which to hang the curtain. The curtain pole will come with H number of... |
Here is the motivation and how it should behave, but I need a help how to implement it.
I have several (typically) incomplete orders given as ordered values, for ex.:
1. A, C, D
2. D, E
3. X, B
4. B, C
5. C, F
6. C, A
and the resulting order should be:
A, X, B, C, D, E, F or A, X, B, C, F, D, E or A, X, B, C, D, F, E
T... |
Wiki: https://en.wikipedia.org/wiki/Byzantine_fault_tolerance
In the paper "Reaching Agreement in the Presence of Faults", M. Pease et al. proved that there is no protocol (of some kind) to solve the problem for $n \leq 3m$, where $n$ stands for the number of generals and $m$ stands for the number of traitors. The key... |
Given an execution time $t(c_1)$ and linear speedup $s$, how do you calculate the execution time for $c_2$ processor cores?
(Assuming Gustafson's law, or in other words, $t(\infty)=0$)
My ideas:
I haven't found any references that give formulas for calculating execution time, surprisingly. However, I think you can deri... |
I am on a journey understanding Dijkstra's algorithm.
My familiarity with mathematical terms is not great, so I have put the algorithm into my own English. I understand this is not ideal, but this is part of my learning process.
What are the major areas of misunderstanding in the description below?
We maintain a list ... |
We clearly know that 2-QCNF is in $\mathsf{P}$. Since that, if I understand it right, it is possible to solve it with #SAT solver (because $\mathsf{P} \subseteq \mathsf{\#P}$). But how can we only knowing amount of positive assignments for some non-quantified formulae solve 2-QCNF? And why this doesn't hold (at least, ... |
If $X,Y$ are complexity classes in the polynomial hierarchy with $X\subseteq Y$. With abuse of notation assume $X,Y$ also as the TMs that accept languages in classes $X,Y$ respectively.
Then is it always true $X^Z\subseteq Y^Z$ if $Z$ is another complexity class?
If not what is an easy way and example to understand $X... |
1. Consider the following algorithm for deciding GCD:
“On input :
1. If z doesn’t divide x or y, reject. O(n)
2. For i from z + 1 to min(x,y) do: O(2^n)
2.1. If i divides both x and y, reject. O(n)
3. Accept.” O(1)
Analyze the al... |
I'm trying to write a Turing machine that can convert a number in binary representation to a number in decimal representation. For example if the input on the tape is 1101 the output should be be 13. Where should I start from?
|
Algorithms like Knuth's algorithm or this one, works for a range that is known in advance(like shuffling numbers 1 to 11), in this case the range will never change. You'll always get a random no. between 1 to 11.
But in my case the range can increase like if the generator generates 2 random numbers {3,5} from the range... |
Suppose we have two context-free Languages $L_{1}$ and $L_{2}$, and we form a new language $L_{3}=L_{1} \circ L_{2} = \{\alpha\beta | \alpha \in L_{1},\beta \in L_{2},|\alpha|=|\beta|\}$. Is it possible that $L_{3}$ is not context-free?
|
I have two objective functions say f1 where I have to minimize (X+Y) and another function f2 where I have to maximize (A-B). The two functions are conflicting.
I need to convert them into a minimization problem involving one single objective function using the weighed sum approach where the final form would become f3 ... |
Suppose I have a set of points in 3D which are all co-planar, and which describe the vertices of a convex polygon. I know the coordinates of all of these vertices, I know the unit normal to the plane of the polygon, and I know the order (in a right-hand sense with respect to the normal) in which the vertices go around ... |
So I never really understood the von Neumann architecture, and have started to revise it as I wasn't in school during the lessons of the CPU. Can't really get help through my teacher as they wont respond to their email.
I have learnt about the von Neumann architecture, and now I need to know how the architecture differ... |
I'm studying several disk scheduling algorithms; however, I'm kinda confused with SCAN. I understand the concept, but I don't understand the example given in the book. I think that the author made a mistake, but I want to be sure.
The example is the following:
Description of SCAN: The disk arm starts at one end of the... |
In arithmetic coding a word is coded as the binary encoding of a number in a certain interval. The interval is determined from a sequence of nested intervals according to the probability distribution on the letters of the word.
This encoding and decoding process is totally clear to me, but what wonders me is how an en... |
I am a TA for an introductory CS course, and one question given to students was how to use BFS to determine the diameter of a graph. The students were told they wouldn't be graded for efficiency, so the expected answer was a brute force algorithm where they ran BFS from every node to every other node and returned the m... |
I'm trying to apply homotopy type theory as a theoretical foundation for describing how database query plans solve relational algebra queries. I'm modeling the problem as, given a set of input function types and constraints on composing them, and a goal function type, find a composition of the input functions which ha... |
So class P is the class of languages that are decidable in polynomial time on
a deterministic single-tape TM.
I can show that the decider for a language L* runs in polynomial time.
So is it true that this language in class P?
STARCLOSED DFA = { | A is a DFA, and L(A) = L(A)*}
|
Just out of curiosity:
Do there exist algorithms for which the Big-O cannot be found out?
I have done a quick search in the google search bar:
"Big o, impossible to evaluate"
"algorithms without big o"
And these gave results which were unsatisfactory. Mostly, teaching me how to find the big o. Nothing I haven't learned... |
Given two entangled qubits in the state ${|00⟩+|11⟩\over \root \of 2}$, I have trouble getting the way of applying a 1-qubit gate (let's say a Hadamard) to 1 of the entangled qubits (let's say the first one). Actually I have several questions:
Following this link, Ran G. says that "You can apply a quantum gate on any ... |
I want to use Android's gyro/accelerometer/magnetometer to predict (over a very short time interval) how image points corresponding to a fixed object will change (without trying to scan for them in the image). In particular, suppose we have an object of known size with model points $v_1, \dots, v_N$. In this question... |
Wikipedia defines straight-line programs in the following manner:
In mathematics, more specifically in computational algebra[disambiguation needed], a straight-line program (SLP) for a finite group G = 〈S〉 is a finite sequence L of elements of G such that every element of L that belongs to S, is the inverse of a prece... |
Here are some sequences:
'0.66666'
[3,0,1,2,2,2,0,1]
'banana'
'bandana'
'11221122'
I would like to find the index and length of the substring in each which is repeated (even if partially) for the most terms and which repeats until the end.
I wrote a function in JavaScript that successfully returns the
expected output:... |
I am reading about Representative Grammars from book, where I encountered the following grammar:
$$ E \rightarrow E + T \ | \ T $$
$$ T \rightarrow T * F \ | \ F $$
$$ F \rightarrow (E) \ | \ id$$
The above grammar is left-recursive, which is bad. So in order to eliminate left recursion, they changed it to the followin... |
Can someone help me prove that $L = \{ a^ib^jc^k | i < j \ and \ i+2j+3 < k \}$ is not a context free language?
I've tried applying the pumping lemma for CFGs and proving case by case (taking x=uvw, at first v is int $a^+$, then v is in $a^+b^+$ etc.but I'm failing to find a contradiction). Any help is welcomed.\
PS: ... |
For languages $L_1, L_2$ over some alphabet $\Sigma$, we define
$$ \textit{Shuffle}(L_1, L_2) = \{a_1b_1a_2b_2 \cdots a_nb_n : n \geq 1 \wedge a_1, \ldots , a_n \in L_1 \setminus \{ \varepsilon \} \wedge b_1, \ldots , b_n \in L2 \setminus \{ \varepsilon\}\}$$
I think that RE are closed under shuffle, I tried to use th... |
Given integers $d$ and $l$, compute the number of grid points $x \in N^d$ that satisfy $\sum_i x_i^2 \leq l$ (i.e. $||x||_2^2 \leq l$). (Think of $l$ as $r^2$).
The problem is obviously in #P. Is it in P or a smaller class? What if in place of $l_2$ we use $l_p$?
|
I have some good basics -I think- in computervision (using openCV) and am considering to build a quadcopter to create a 3D maps while flying.
I would like to place a camera on each side of the quadcopter (ie, left, right, front and back) to continuously provide +/- 360 degrees images. Then stitch those four images toge... |
I am having a hard time determining the Big-O notation based on the runtime of the algorithm. I would really appreciate it if any one of you could give me some hint/ or tips in answering the question.
|
If $T_n = \{ \langle M \rangle \mid M \mbox{ is a Turing machine and } |L(M)| = n\}$ where $n$ is $0,1,2....$
I need to show that if $n \geq 1$, $T_{n+1}$ reduces to $T_n$. I know I need to create a machine where that machine accepts $|L(M)|-1$ strings, which I could then use to verify with $T_n$. I'm just confused as ... |
I have been searching for matching algorithms similar to the Gale Shapley, or stable marriage algorithm, but with no luck.
The question is if there are other algorithms that are similar to the GS and used for the assignation of persons or items based on preferences?
|
I studied the subject of building a lexical analyzer using finite automata, through the classical way: Regular Expression -> NDA -> DFA. And I found it elegant, and a more solid approach for building a lexer.
Now my question is, what are other benifits from building a lexer this way, rather than the "ad hoc" way?
|
Given a directed graph $G = (V, E)$ with all edge weights being non-negative and two disjoint subsets of nodes $S, T \subseteq V$, design an algorithm to find the shortest paths among $S$ and $T$, (formally, $\min\{d(s,t): s \in S, t \in T\}$) in $O(m \log n)$ time, where $|V| = n$ and $|E| = m$.
|
It is known that any (deterministic, single-taped) Turing-machine that runs in time $o(n\log n)$, decides a regular language (e.g., see this link). Thus, there exists an equivalent Turing-machine that runs in time $O(n)$. In other words, if $t(n)=o(n\log n)$ then $$\mathsf{DTIME}\left(t\left(n\right)\right)\backslash\m... |
Given a set S of integers, the task is to partition the set into subsets such that:
Total number of partitions is maximized
Each partition has sum at least K
This looks like a variant of bin-packing problem, in which the bin has to filled upto a minimum capacity and the objective is to maximize the number of bins. I ... |
I've seen both ways of counting the bits when determining where to place the parity bits in a 1 bit error correction Hamming code. Some people count the bits starting from the left, others do it by starting from the right.
When to use one or the other? Does this depends on the Endian ordering?
|
I am training a Variational Autoencoder (type of convolutional neural network), and have been plotting cost over time. The result is a noisy curve, shown here:
I would like to write a function that gives the probability that the cost function has bottomed out, i.e. that its slope going into the future is zero. Due to t... |
I was asked to construct a Turning Machine that computes the increment of a binary string by 1- The Turing Machine receives a binary string and accept a string which is an increment by 1 of the input, written to the left of the head . I was given the fact that the head first reads the MSB.
I thought of an Idea but I do... |
Consider the following problem:
We have an extremely large set of nodes, $\pi_0, \ldots, \pi_{N - 1}$ with $N$, e.g., in the order of millions. Each node has a boolean variable $b_0, \ldots, b_{N - 1}$. Some of the nodes will have $b_i = \top$, others will have $b_i = \bot$.
Now, I need a procedure that can scale to th... |
I want to build a context sensitive grammar for the language $\{a^{2^n}\mid n\geq 0\}$. I think it should be something like this
\begin{align*}
S &\to aA \mid a\\
aA&\to aaaA \mid aa
\end{align*}
|
I am trying to create a data structure for handling the subsets of the real line of the form $[x,y)$. That is, suppose $X \subseteq \mathbb{R}$ and the data structure supports two types of operations: $add(X, [x,y))$ and $remove(X,[x,y))$. Each of these two queries return the number of disjoint semi-intervals in $X$. F... |
In "Big O", common notations have common names (instead of saying, "Oh of some constant factor"):
O(1) is "Constant"
O(log n) is "Logarithmic"
O(n) is "Linear"
O(n^2) is "Quadratic"
O(n * log n) is ???
Is it just "n log n" or does it have a special name like the above?
|
What is the formal name in type theory of the operation that creates a "matrix of types" from product types (such as std::tuple in C++)?
For example if we consider std::tuple<int, float, char> t1 and std::tuple<std::string, double> t2 (in C++, but the same question remains for any product type in any language), what w... |
Given a simple graph $G$, A subset of vertices $V_G$ is called "very independent" if there is no edge between each pair of the vertices in $V_G$ and for each pair $v,v'$, there is no vertex which is connected to both $v$ and $v'$.
In other words, a very independent subset is an independent subset of vertices like $V_... |
The problem: Let a formula in $\varphi\in 2kCNF$ where there's an assignment $\alpha$ such that for every clause, $l$ in $\varphi$, $\alpha$ satisfies at least $k$ literals of $l$. Suggest a randomized algorithm for finding a satisfying assignment for such $\varphi$.
So basically I've read about the $WALKSAT$ algorit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.