instruction stringlengths 35 29.1k |
|---|
I'm trying to cluster around 16000 images into ~200 clusters, using kmeans with metric as euclidean distance or cosine distance. I understand that i need to extract keypoint descriptors to compute features for each image. I'm looking at SIFT as an option but, SIFT outputs different number of keypoints for each image th... |
I have problems to determine the size of the following sets in dependancy of the parameters $m, n>0$:
$$M_{m,n}=\{a^iwa^{m-i}\mid 0\le i \le m,\;w\in\{a,b\}^n\}$$
It is easy to see that $|M_{m,n}|\le (m+1)\cdot 2^n$ since there are $m+1$ possibilities for $i$ and $2^n$ possibilities for $w$. If the sets would take the ... |
I am solving some example exercises in preparation of a Computational Theory examination.
In Exercise 2, I am tasked with building an NFA and DFA of the regular expression: $(b|bba)^*a$
My question is: Can I simplify $b|bba$ inside the parentheses to $bba$? Are they indeed equivalent or will I be breaking some generali... |
Everyone knows computing speed has drastically increased since their invention, and it looks set to continue. But one thing is puzzling me: if you ran an electrical current through a material today, it would travel at the same speed as if you did it with the same material 50 years ago.
With that in mind, how is it comp... |
I know that resolution is refutation complete,
but what can we conclude if a resolution procedure leads to a situation with no more chance to operate the resolution?
Given a propositional formula which we want to check its satisfiability,
( a + b ) ( ¬a + c )
after one resolution the formula become
( a + b ) ( ¬a + c... |
Properties of concurrent algorithms are usually divided into two categories:
Safety - something must not happen.
Properties in this category are for example partial correctness and sometimes deadlock-freedom (the latter depending on the author).
Liveness - something that must happen eventually.
Properties in this cate... |
I found this in information theory paper, P.3883*
the authors states the following
Most existing theoretic studies of network coding focus on DAGs due to its simpler structure and dure to the fact that one can always convert a cyclic network to its acyclic counterpart by taking into account the time index and the caus... |
I have an array of 2 dimensional points describing a path. I want to reduce the number of points needed to describe this path by using line segments that connect multiple points on the same line, allowing for some minimal deviations.
For example, given the points (0,0)-(50,50)-(100,100), the path can be optimized by on... |
I am just trying to understand a few minor details regarding images that are compressed with lossless algorithms such as RLE.
If a bmp image is compressed using RLE, when does the decompression occur when viewing the image? does the image viewer have a built-in library to decompress the image and then view it? or is i... |
So I wrote an implementation of Hopcroft's algorithm. While testing, I discovered that it would sometimes produce an automaton that wasn't equivalent to the original. At first, I figured it must be a bug in my code, but after going over the algorithm by hand with a small example, it seems to be a bug in my understandin... |
I have two questions regarding a paragraph about table-driven agent programs from Modern Approach to Artificial Intelligence 3rd Edition.
"Let $\mathbb{P}$ be the set of possible percepts and let T be the lifetime of the agent (the total number of percepts it will receive). The lookup table will contain $\sum\limits_{... |
In the book "Approximation Algorithms" by Vazirani (legally available online), part of the hint to Exercise 9.6 (on page 77 of the book, page 95 of the PDF) says "Establish a domination". I've never heard this terminology before in the context of computer science/approximation algorithms/bin packing (I'm not so sure wh... |
I was wondering if there are cases in which the star closure of a language can make the resulting language easier to parse. In particular, if I have this grammar:
S -> c|AS|A
A -> aAa|bAb|e
I can see that $L(A) = \{x x^R : x \in \Sigma^*\}$ (where $x^R$ denotes the reverse of $x$). That language is not even determinis... |
I want to know what is the definition of rate of convergence (non-asymptotic) of iterative methods ?
For example is it true that if $\|x_n - x^*\| \leq \frac{K}{n}\|x_0 - x^*\|$ then the rate of convergence is $O(1/n)$.
|
I've been thinking about ways of measuring code, and, quite frankly, I can't think of truly objective, semi-universal ways of evaluating the quality or "strength" of code to say, "Yes, this is better than that based on X, Y, and Z metrics" that are popular or exist. I've looked at SonarQube, and although I think their ... |
I know that a fractal is a non ending pattern, like Pascal's triangle or Sierpinski's triangle, which are the same as Rule 90 from Elementary Cellular Automata.
But, what about the other rules from Elementary CA? Are they also considered to be fractals?
Is there a definition relating Elementary Cellular Automata and fr... |
Graphs are usually defined as a set of vertices $V$ together with a set of edges $E$ consisting of elements $V \times V$. I'm interested in a slight generalization of this, where instead one has two sets $V$, $W$ and the edges are taken from $V \times W$. The adjacency matrix of such an object would be rectangular, as ... |
I came across this sentence in the Wikipedia article on Shell short, which states that
If the file is then k-sorted for some smaller integer k, then the file remains h-sorted.
I've seen this claim in other texts like Lafore as well, but I can't wrap my head around why it's true. Of course I can't find a counterexam... |
I've a tree with weighed nodes, the problem is to flag a subset of nodes with the following constraints:
The selected nodes must be the optimal solution (maximal sum of weight).
If one node is flagged no adjacent nodes can be flagged.
If a node is flagged it will be called: "directly controlled", the adjacent nodes in... |
Karp reduction (polynomial-time many one) is used in complexity theory to define NP-completeness. However, Cook reductions (polynomial-time Turing) is more powerful and intuitive from information theoretic perspective since it could offer an insight into the information content of hard sets in NP.
Intuitively, if we sa... |
Suppose we forget about optimizing and just want to find a feasible solution to a set of equations:
$$\sum_i w_{ij} x_i = W_j.$$
Here we are given $w_{ij}$ and $W_j$, and want to solve for $x_i$. Also $x_i$ are restricted to be 0/1 and we're promised that $w_{ij}$ and $W_j$ will be non-negative integer constants and w... |
I've been studying Computation Theory, and in an exercise I am asked to construct a PDA that accepts the language $L=\{x\in(a,b), \#_a(x) = 2\#_b(x)\}$, where $x$ is the input string and $\#_a(x),\#_b(x)$ the number that $a$ or $b$ appears in the $x$ string.
That means that the following sequences should all be accepte... |
I'm trying to find the $k^{th}$ smallest element of an array by using Randomized Quicksort, But below code giving erroneous result can anybody help.
from random import randint
lst=[1,3,5,2,4,6]
k=6
n=6
def swap(i,j):
t=lst[i]
lst[i]=lst[j]
lst[j]=t
def rand_partition(p,q):
# i is the pivot position ... |
I want to determine whether this decision problem is decidable. I have tried to establish reductions from Halt and "Accepts empty-string", but I've not yet found a solution.
Can someone help me out?
|
is there a mean of creating a cluster of machines, that can be seen as an entire system, using perhaps mac OS X or mac os x server, and use parallelism and GPGPU optimisation to compute all the tasks of a system,as a single machine? Kind Regards
|
I recently read that a feed forward neural network with a single hidden layer can represent any continuous function to great precision (ref.).
Then how can we justify adding more that one hidden layer to our network ?
|
I'm reading CLRS Section-4.5: The Master method for solving recurrences. There is a line saying
$f(n)$ must be polynomially smaller than $n^{\log_b a}$.
What is meant by polynomially smaller? Can anybody explain it to me with an example?
|
Whats the intuition behind multiplying the factor $\log n$
Master Method Case 2 (CLRS Section 4.5)
If $f(n) = \theta(n^{\log_b a})$, then $T(n)= \theta(n^{\log_b a} \log n)$
In generalized form sometime it can be written as
If $f(n) = \theta(n^{\log_b a} log^k n)$ with $k = 0$, then $T(n) = \theta(n^{\log_b a} \log^... |
Is there a difference between a non computable problem and an undecidable problem? Or is one included in the other?
|
I A many one reducable to B and given A is decidable then is B decidable ?
preparing for an exam and please let me know if this holds
I understood how if B is decidable then A is decidable
and if A is not decidable then B is not decidable
|
In an exercise, I am asked to find a context free grammar for language $L = \{a^{2^k}, k \in \mathbb{N}\}$.
I have been trying to use a "doubling" variable. If $a^{2n} \in L, n\in\mathbb{N}$ then use this variable to double the $a$'s that have been produced by the other language rules.
Is this thinking valid? So far I ... |
Fractional cascading allows me to search in k ordered lists. It requires every list to have same ordering (how would I otherwise insert elements from the cascade below, preserving order?). But why is this better than merging those k lists and doing binary search on it?
|
I have been doing some research into the limits of computation and I have come across the terms intractable and undecidable. Are these two terms the same thing?
What does intractable mean and what is an example of an intractable and undecidable problem?
|
Knuth's TAOCP chapter 7.2.1 discusses generating all the $n$-bit binary strings.
I am interested in the total number of bits that change during this process.
During generation we store an $n$-bit string and can change some of the bits of the string in each round, with the string output at the end of each round.
Call th... |
This is probably a silly thought, but suppose we have a computer that's programmed to perform an infinite sequence of calculations and suppose the $i^\text{th}$ calculation takes $1/2^i$ seconds to complete. Then this computer can do an infinite number of calculations in a finite amount of time.
Why is this impossible... |
The Interleave lower bound is a lower bound for the amount of operations any Binary Search Tree needs to make for a sequence of accesses. It is used in the construction of Tango Trees, and is based on Wilber's lower bound.
The Interleave lower bound is proved by defining a Transition Point for every node $y$ in a stati... |
My problem is due to the fact that I am manipulating a set of amounts that span over some intervals of time (start date/end date) and that are rounded to cents. I have to multiply each of them by some fraction (percentage), and I have to round the results to cents. Then I have to match the sum of what I calculated to t... |
I am trying to enumerate all non-isomorphic graphs of size n and found this question: Enumerate all non-isomorphic graphs of a certain size
The accepted answer describes a method to do this:
Assume we know all non-isomorphic graphs of size n-1. Take each of them and add a new vertex in all possible ways. Then for all t... |
$f(n)=f(n-\sqrt{n})$
I believe $f(n)\in O(\sqrt{n})$
However I cannot seem to prove it, my intuition comes from the fact that we can remove $\sqrt{n}$ exactly $\sqrt{n}$ times, but if $n$ shrinks then does anything change?
|
When reference counting is used for automatic memory management (e.g. Objective C or Swift), it is well know that “loops” give problems. E.g.
class Car
{
Engine engine;
}
class Engine
{
Car installedIn;
}
Swift (along with other systems) avoids this problem by allowing the reference from the car instance ... |
I am reading about red-black trees in Introduction to Algorithms, Second Edition by Cormen. Pages 316, 317.
I don't understand why we need to rotate the given tree. See (c) and (d) in the attached picture.
The author says that the following properties of a red-black tree can be violated after a new node has been inser... |
An AVL tree is one that satisfies the height-balance property which states that: For every position p of T, the heights of the children of p differ by at most 1.
Below is an example AVL tree. However, I've highlighted a node whose child's height would imply that their difference is not at most 1.
Can someone explain to... |
I want to learn more computer science in theory and practice. However, I really don't know where to find more practical exercises in languages like Java or Python. I feel like the best way I could learn all the concepts and ideas is by coding on my own. I would thank very much for any suggestion of websites, books or s... |
My teacher told us that when the ram runs out of space it will push a program in the cache, i argued that the program should go to the swap space in the hard drive, plus the memory cache cannot hold instructions because instructions and data have different access patterns, it can only hold data frequently accessed.
So ... |
create a grammer for {a^nb^m, n>0, m=2^n+1}
itS unrestricted grammer. I tried to but couldnt understand. if you know the answer please breif it. coz i m new in this subject
|
Here's an example of what I'm talking about. Suppose I have a languages
$$
L_{1} = \{a^ib^i \mid i>0\},\\
L_{2} = \{c^i \mid i>0\}
$$
and
$$
L_{1}L_{2} = \{a^ib^ic^i \mid i>0\}
$$
Is it true that if $L_{1}$ is irregular and $L_{1}$ has no common symbols with $L_{2}$, then $L_{1}L_{2}$ is irregular? How would you prove... |
In classifying the following formula's asymptotic complexity using master theorem, I have $a = 8$, $b = 4$, and $d = ?$
$T(n) = 8T(n/4) + n\sqrt n$
How do I handle $n\sqrt n$ in this case to get $d$ ?
|
Below is the code,
class SibTreeNode extends TreeNode {
protected Object item;
protected SibTreeNode parent;
protected SibTreeNode firstChild;
protected SibTreeNode nextSibling;
.....
}
As per below diagram, I could not understand the purpose of parent member in every node.
Why do we require parent member ... |
I'm sorry I don't know the technical terminology for this. All I see in my notes is fixing a grammar. Can someone please help explain this? What exactly is this called?
|
I am reading the book by Arora and Barak, in which they try to prove there exists a langauge $U$ such that $P^{B} \neq U$.
I completely understood the proof except one problem in the end, they use crucially the fact that a Polynomial Turing Machine will halt within steps $\frac{2^{n}}{10}$ My doubt is it is not necessa... |
Is there any special algorithm of lowest complexity for finding 2nd largest element from a set of 4 elements?
|
Is there a linear time algorithm that, given a string of length n, tells if it is a sequence of non overlapping palindromes (each of even length, in a binary alphabet)?? I found algorithms that return the longest palindrome, but this does not apply since a string like "aabbaabb" should be accepted since it can be divid... |
Design an $\epsilon$-test for the following property in the dense graph model: $G(V,E)$ is a union of three disjoint cliques.
I've been sitting for a few hours and I don't have any idea of how to solve this one ... anyone has any ideas / leads?
I have tried to pick the vertices randomly and then conclude from the gra... |
I proposed this method of converting a two's complement binary number to decimal to my professor and he said it was wrong. Some older guy in the class just shook his head at me and gave me a condescending stare. I'm willing to admit I'm wrong when I'm wrong but I can't find a case where it doesn't work.
Example
Take a ... |
First let me clarify what I mean by a number of things.
A language is a decidable set of natural numbers which encode functions from natural numbers to natural numbers $ \mathbb{N} \to \mathbb{N}$. A language is said to be total if it only encodes total functions from naturals to naturals. A language is turing complete... |
I think this is implied in this paper by Aaronson (http://www.scottaaronson.com/papers/bqpph.pdf) but I am not sure.
Begin with $NP \subseteq BQP$ (*)
$\Sigma_{2}^{P} = NP^{NP} \subseteq BQP^{BQP} = BQP$
$\Sigma_{i+1}^{P} = NP^{\Sigma_{i}^{P}} \subseteq BQP^{BQP} = BQP$
With this inductive step we have $PH \subseteq BQ... |
I have the following language:
T = {M | there exists w such that M accepts w within |w| steps}
I am trying to prove that this language is not recursive and that it is recursive-enumerable. To prove that it is NOT recursive I considered the following steps:
1) Assume that it was recursive
2) Conside input w of infinit... |
I am currently reading a couple of papers about event processing. In the context of ordering events, "2g-precedence" is frequently mentioned. I don't know what it is, and I cannot find much information about it. In this paper I was able to find a short explanation that is way over my head, though:
[It is assumed] that... |
Sorry in advance if this question sounds dumb...
As far as I know, building an algorithm using dynamic programming works this way:
express the problem as a recurrence relation;
implement the recurrence relation either via memoization or via a bottom up approach.
As far as I know, I have said everything about dynamic ... |
I want to know exactly till which layer in the OSI model the 127.0.0.1 (loopback) packet goes till it is returned to the upper layer. I read some where it goes till data link layer. but as i was told data link layer cannot see the ip address then how data link layer decide that the packet has to be send "up" instead of... |
I was on wikipedia on list of unsolved computer science problems and found this:
Is public-key cryptography possible?
I thought RSA encryption was a form of public-key cryptography? Why is this a problem?
|
I want to trace the shortest path between a set of points on 2D space. The points have integer coordinates and visually appear to follow a well-defined unique path, though they're disordered.
The precondition is very simple: For each point there's always a set of nearby points within a narrow arc, and another (possibly... |
How would one go about classifying the time complexity of Ackermann's function, and can we say that all primitive-recursive functions are asymptotically bounded by the complexity of the Ackermann function as an asymptotic upper bound?
Edit: I want to make it clear that I am interested in the time complexity of computin... |
I'm learning about using image registration to align two images, e.g., two photographs of the same scene taken from a slightly different location. What factors influence how well we can align the images? Does the distance to the objects in the image influence its effectiveness of alignment, and if so how? What about th... |
Say I have a real valued convex function $f$ on the hypercube $[-1,1]^n$ and let $f'$ be its restriction on the discrete hypercube $\{-1,1\}^n$.
Is there any $poly(n)$ algorithm that for any class of $f$ (and $f'$) can find the minima of it?
Is there any relation known between the point where $f$ minimizes and the ve... |
I have always considered strings scalar and the main reason for that is that in programming we treat string values a lot like primitive values. But this and this Wikipedia definitions, as far as I understand them, speak against the scalar nature of strings.
In programming scalar types are often seen as the opposite of... |
Let's say I have a database of freight orders. The job is to match freight carriers with customers who need their freight moved. I have the customer's information, the freight carrier's information, and all details related to the freight orders including date ordered, date shipped, the amount of money it took to hire... |
I have tried to solve the following exercise but I got stuck while trying to find all the critical pairs.
I have the following questions:
How do I know which critical pair produced a new rule?
How do I know I found all the critical pairs?
Let $\Sigma= \left \{ \circ, i, e \right \}$ where $\circ$ is binary, $i$ is u... |
On the Wikipedia for PEG it is claimed:
Any PEG can be parsed in linear time by using a packrat parser, as described above.
However, packrat parsers can't handle left recursion.
You can eliminate any left recursion to create another grammar that recognizes the same language as the left-recursive one, however, those g... |
So usually Sudoku is $9 \times 9$, but this question extends to $n^2 \times n^2$ puzzles with $n > 3$ as well. There are many polynomial time deduction rules that can make progress in finding a solution to a Sudoku puzzle. But then sometimes guessing values and following chains of conclusions might be required to elimi... |
From Cornell
Suppose we want to throw a party for a company whose organization
chart is a binary tree. Each employee has an associated fun value, and
we want the set of invited employees to have the maximum total fun,
which is the sum of the fun values of the invited employees. However,
no one has fun if some... |
I'm reading up on graph theory using Diestel's book. Right on the outset I got confused though over proposition 1.3.1 on page 8 which reads:
Proposition 1.3.1. Every graph G contains a path of length $\delta(G)$ and a cycle of length at least $\delta(G)+1$ (provided that $\delta(G) \ge 2$).
Following the proof I can ... |
From both my own exploration of Google Deep Dream using Dreamify for IOS, and from Google Image results on the topic. I've come to 3 conclusions about the networks understanding of images that seem too common to be coincidences.
I would like to know if these are recognised as consequences of the approach, or otherwise ... |
I have two datasets, one of animal migration patterns (collected over the course of a couple years) that consists of many points on an x, y plane (latitude, longitude), and the other of ocean surface temperatures (also a set of lat, long points). What kind of neural network can be used, if any, to see some pattern, or ... |
Let L be a language over Σ i.e., $L\subseteq Σ^∗$. Suppose L satisfies the > two conditions given below.
L is in NP and
for every n, there is exactly one string of length n that belongs to
L. Let $L^c$ be the complement of L over $Σ^∗$.
Show that $L^c$ is also in NP.
My attempt:
If L is a language in NP then L ... |
for the past few days I've been studying Binary Indexed Tree (aka. Fenwick tree) data structure.
I understand the basic form of BIT (point update, range query), and I see the intuition behind it, but when it comes to range update - point query BIT I don't see the intuition behind it.
Let me be more specific:
let tree ... |
I had taken a course long ago on complexity theory. I only remember basic things,
so I am reading "Introduction to the Theory of Computation by Michael Sipser". The book in its first chapter introduces DFA and NFA.
If we are given a DFA $D$ where $\sum=\{0,1\}$ ( the alphabets ), then how difficult is the problem of ... |
I was preparing a presentation in work on GPON & other optical network technologies using documentation provided by a supplier, and the claim it made was "GPON networks have a capacity of up to 100Tbps".
Instantly that looked odd to me as I know the throughput of the most advanced version of InfiniBand only goes up to ... |
The following example was given in an online lecture I was watching.
A phone directory is 1000 pages long, and we have to find the name "Zurich Smith". The algorithm is as follows:
Split the phone directory into half. If the name is in the first
half, get rid of the second half; and if the name is in the second
half,... |
The Product Matching problem is defined as follows:
Input: Text T=t0,...,tn and pattern P=p0,...,pm over alphabet Σ=N .
Output : All of the i places in the text where exists ci which holds
ti+j = ci * pj for every j=0,...,m
For example:
T= 2,3,9,12,1,8 P = 1,3,4
so in index 1 there is a match for ci=3 because:
1*3 = ... |
I know that regular languages are those that can be described by regular expressions. For the language {0,1}*, is the corresponding regular expression (0∪1)* ? If so, does replacing braces with parentheses and commas with union always work when converting from regular language to regular expression?
|
A well-known approach to eliminate the possibility of a deadlock when accessing exclusive ressources is enforcing a partial (or total) order in which the ressources may be requested.
Which publication initially introduced this method?
|
My professor recently mentioned that the average depth of the nodes in a binary search tree will be $O(log(n))$ where $n$ is the amount of nodes in the tree. I ended up drawing out a bunch of binary search trees and I don't think I am understanding the concept correctly. For example, if $n=4$ the tree is either going t... |
If not, is there a decision procedure that successfully classifies any
polynomial time algorithm as poly-time within a time polynomially bounded
by the length of the input algorithm?
|
What is the set
$$L_R = \{w\#y\space|\space R(w,y)\}$$
Specifically what kind of conditional is $R(w,y)$?
Also what's the purpose of $\#$?
This comes from page 2 of the Clay paper on P vs NP:
http://www.claymath.org/sites/default/files/pvsnp.pdf
|
I was reading the chapter of van Emde Boas in CLRS (page 547 section 20.3 3rd edition) and it says:
Furthermore, the element stored in min does not appear in any of the recursive $vEB( \sqrt[\downarrow]{u})$ trees that the cluster array points to. The elements stored in a $vEB(u)$ tree V, therefore, are V.min plus all... |
I've been reading Sedgewick's intro to algorithms book, and he says that the reverse postorder of a digraph's reverse is not the same as the postorder of the digraph, however in both cases it seems that we get the reverse of topological order, so at first I thought that it's the same, but then I looked on his website a... |
What is the evidence that P could equal NP?
I guess this is the same as asking:
If it's known that $P \subseteq NP$ (depending on standard), then why is this not enough? Why assume that P could equal NP?
|
I am reading a book about Neural Networks, that explains the backpropagation algorithm. It explains that the error function is the sum of error of all inputs, and that the algorithm minimizes this sum, which makes perfect sense to me, but than in goes on stating that to achieve that the gradient is calculated for each ... |
The Clay paper gives a short proof on this in page 2:
http://www.claymath.org/sites/default/files/pvsnp.pdf
However,
Where does it come from that these are inclusive sets and not separate? Or that $|P| ≤ |NP|$?
|
A verifier for a language A is an algorithm V, where $$A = \{w \mid V
\text{ accepts $\langle w,c \rangle$ for some string $c$}\}$$ ($c$ is called a certificate or
proof)
What's the definition of $\langle , \rangle$ here?
|
Heapsort(A)
1 BUILD_MAX_HEAP(A)
2 for i=A.length downto 2
3 exchange A[1] with A[i]
4 A.heapsize=A.heapsize-1
5 MAX_HEAPIFY(A,1)
In the book on algorithms by CLRS the running time of this algorithm is given to be $O(n\lg n)$ as the for loop is executed $n-1$ times and each call of MAX_HEAPIFY takes $O(\lg n)$... |
I have been studying the Selective Background Updating in Running Gaussian Average Method, as discussed in the Wikipedia (the Variant method). The details of the algorithm, as I understand, is as follows:
For each pixel, at initialization $(t=0)$, set $\mu_0=I_0$ (the initial intensity of the pixel), and $\sigma^2_t=c$... |
Quantum computers are going to have enormous number of operations per second (in some situations exponentially more than classic computers).
Does it also hold for memory size? Are QC going to have exponentially increased memory?
|
There are given $n$ balls. Their indexes: $\{1,...,n\}$.
Initially all of them are painted in $green$. (other possible color in my problem is $red$).
It is possible to paint interval of balls in color $red$ or $green$, for example $paint([a,b], green)$ - ball in given interval will be paint in green.
What's more, the... |
The problem is the following:
Write the recursive definition for the set of all Strings Q over the alphabet {a, b} (i.e. the set of strings consisting of a's and b', for example a, baba, abbbabababba...)
I somewhat get the gist of what recursion definitions consist of, but this one has gotten me stumped a little bit, s... |
Suppose that we're given $n$ integers $c_1, c_2, \dots, c_n$. We want
to know if there is any assignment of $+$ and $-$ signs such that
$$ \pm c_1 \pm c_2 \dots \pm c_n = 0. $$
Does anyone know of a polynomial-time way to do this? Since there are $n$ integers, there are $2^n$ assignments of signs to consider, which... |
In a sliding window protocol, if we use the maximum possible capacity of the channel as the size of the sliding window, efficiency will be theoretically 100%.
What is the logic behind not doing this?
My guess is that this is done for throttling. Are there any other reasons?
EDIT: After reading the answer by bakuriu, I ... |
What does it mean exactly a "uniform shuffle" algorithm ?
Is this method considered a uniform shuffle ?
public void shuffle(Comparable[] a) {
int n = a.length;
int k, j;
for (int i = 0; i < n; i++) {
k = StdRandom.uniform(n); // k in [0, n-1]
j = StdRandom.uniform(n); // j in [0, n-1]
... |
Implement f(a, b, c, d) = Σ m(3, 4, 5, 6, 7, 11, 15) as a 2-level gate circuit
(a) Using OR gates and NOR gates.
(b) Using NOR gates only.
I have found that F=ab+d using Karnaugh map.
I have also been able to construct the logic expression using OR gates and NOR gates as in part a of the question.
Can you please ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.