instruction
stringlengths
35
29.1k
I have a set of coordinates, in practice gps coordinates. Some of them are in clusters and some of them are scattered. Which are which is allready determined. Thus I know which ones are in a particular group and which are not. The ones in a cluster I want to graphically mark as a group by drawing an outline around the...
I posted a question "Arbitrary Programs that halt" some days ago and now i think my doubt is a lot more clear. I concluded that in any arbitrary program that halts, control flow operations, calculation operations ( 2+3 , "1 && 0", etc ) and memory assignment ( x:= "Hello" ) can be easily represented by Models of Co...
I noticed that CPU's like the 8086 and especially the 8080 have the ability to access more memory than what one would normally assume. The 8080, for example, has an 8-bit word size but can use a 16-bit memory address. From what I understand, a standard instruction has the opcode in the beginning and then the address on...
As far as I understand we got SYSENTER/SYSEXIT instructions because system calls via interrupts were slow (right? I might be wrong though). Therefore my question is why system calls via interrupts are slow? And how do we optimize them via SYSENTER/SYSEXIT instructions? Thank you
How does one implement mutex on a single processor system without using spinlock mechanism. Mutex is to be implemented in user space (for any user level library like pthread lib for example).
Last year, Ilya Sutskever and collaborators came out with a paper about a recurrent LSTM net that learns sequence to sequence mappings for machine translation. It's somewhat surprising that the authors used LSTM instead of Hessian-Free to train this net since the first author was one of the innovators behind the develo...
Is there any other standard FP^NP-complete problem other than the Traveling Salesman Problem? For instance, in the canonical propositional logic?
I was asked if my computer program (in Java) was deterministic. I'm wondering how could it be not? There is no such thing as a non-deterministic Java program right? Even if I use a random number generator to make branching unpredictable, it is still really non-deterministic (but harder to prove so).
If an algorithm runs in exponential time with exponential input then we say it runs in polynomial time ? Why ? Doesn't the algorithm run in exponential time anyway ? How the input size affects ? Thanks.
What is the best book for a beginner in Introduction to number theory? I am new to this field and getting deeper into cryptography, so I think reading some intro books about number theory can be of help.
Could you please help me to understand the mathematics behind MIPS (million instructions per second) rating formula? The formula for MIPS is: $$ \text{MIPS} = \frac{ \text{Instruction count}}{\text{Execution time} \ \times \ 10^6}$$ For example, there are 12 instructions and they are executed in 4 seconds. So the CP...
Given an input $m$, I am trying to find an algorithm that will give me the number $p$ that is closest to $\tfrac47 m$ and co-prime with $m$. Where $m$ is odd, I have no problem producing an outcome close to the target, simply by squaring $2$ until close enough to the target. When $m$ is even, I have a bit more trouble....
I'm trying do implement the Schur decomposition of a matrix, but I can't find any good articles for the theory. Could someone share one?
Connecting to When states that are not accepting states become accepting states in NFA, what happens?, what is the formal language described by inverting accepting states of NFA? By inverting, I mean that rejecting states become accepting states and accepting states become rejecting states. Is there a nice expression f...
K-means is a clustering algorithm which works like this: def kmeans(int k, Coordinate[] points): Step 1: initialize k cluster centers to any (distinct) coordinates Step 2: check which points are closest to which cluster centers Step 3: move the cluster centers so they are central to their nodes ...
Automatic storage reclamation, aka garbage collection, comes in two main families, sometimes cooperating: the reference count collectors and the tracing collectors. I may develop specifics of each family if there is demand for it but my question is about tracing collectors. Tracing collectors, in their simpler form can...
I am a domain scientist and I study biophysical systems. When I asked a colleague in CS for suggestions about how to design a multi-scale simulator, he mentioned the term "compact model". Now, I can't find a very good definition of this term. I can find the book "Compact Modeling" edited by Gildenblat but this is a col...
The well-known Four color theorem states that every map which is divided into regions, can be colored using 4 colors such that no two adjacent regions have the same color. In fact, there exists a quadratic algorithm for 4-coloring planar graphs. Suppose you are given a map (e.g. the world's map) and a list of $k$ const...
I'm currently preparing a presentation about LTL and a book says that the language $L = (a(a \cup b))^\omega$ cannot be described by any LTL (or FO) formula which is understandable but how does the corresponding Büchi automaton $\mathcal{A}$ look like with $L(\mathcal{A}) = L$?
I have a weird question. I was just wondering if there were some problem with two solutions; one (A) being exponential time, the other one (B) being polynomial time. However the constants involved are such that, in "practice", the algorithm (A) performs better. For instance, we could have something like $(1 + 10^{-100}...
I have to find a solution for this equation: I have to find the set of solutions a, b, c, d for all possible combinations of values 1 <= x <= n. $a^5 + b^5 = c^5 + d ^ 5$ I first thought about using a heap, because it is what I am learning, but I can't seem to come up with a pattern. I was told that my algorithm should...
Given N items you want to put into a tree, think very generally here like a phone tree, and your goal is to keep the tree from getting "too wide" and "too deep". How many children (K) do you put at each node? I seem to recall hearing of some proof, many years ago, K was best when set to Euler's number. Therefore in rea...
If a very severe interrupt occurs, say a divide by zero, this will quit the program. How is this done, is there a special instruction in the processor or is it a software routine? And after quitting the program, where will the CPU jump to?
I've read a definition that says that "co-semi-decideable' means that a TM is halting on all inputs NOT in the language. I've heard the word come up a lot, and I've so far assumed that halting just means to stop and asess an input. But just to be clear, would somebody be so kind as to give me an easy to understand of w...
I have a grammar, $L \to A \langle A \rangle^*$ $A \to () \mid (L)$ but I am not sure how to generate parser for $\langle A \rangle$. I know in other case, for example, if $E \to T \langle^*T\rangle^*$ then I can create parser like proc E begin T; while symbol='*' do T od However in my case don't have...
I need to prove that $L(f(M)) = L(M)\cup \{\varepsilon\}$ where $M$ is a DFA and $f$ is the function $f(M) := (Q\cup \{q_f\}, \Sigma, \delta', q_f, F\cup\{q_f\})$ and $q_f$ is a new state not in $Q$ and $\delta'(q,a) = \begin{cases} \delta (q,a) & \text{if }q\in Q\\ \delta (q_0,a) & \text{if }q...
I know that DCFL is closed under complementation and intersection with regular languages. By using these we can prove that a language is not DCFL. Are there any other techniques that will help me to prove a language L is not DCFL?
Weighted MaxSAT is in $\mathrm{FP^{NP}}$, see [1] Theorem 17.4, i.e. Weighted MaxSAT can be solved with at most a polynomial number of calls to a SAT oracle. The proof in [1] makes use of binary search with a search space from weight $0$ to the sum of all weights. But I am struggling with the fact that the weights coul...
A TA dropped by today to inquire some things about NP and co-NP. We arrived at a point where I was stumped, too: what does a Venn diagram of P, NPI, NP, and co-NP look like assuming P ≠ NP (the other case is boring)? There seem to be four basic options. NP ∩ co-NP = P In particular, co-NPI ∩ NPI = ∅ NP ∩ co-NP = P ∪ N...
Given a graph $G(V,E)$ and a subset of vertices $T \subseteq V$, define $\mathsf{cutset}(T)$ = the set of edges connecting a vertex at $T$ with a vertex at $V\setminus T$. Our goal is to preprocess $G$ such that, given any set $T$, we can quickly return an edge in $\mathsf{cutset}(T)$, or reply that $\mathsf{cutset}(T)...
Suppose there is a CFG with the rules S--> Aa A--> Bb B--> A B--> Epsilon To my best understanding the left most derivation would go like this.. S==> Aa ==> Bba ==> Aba ==> Bbba ==> bba or S==> Aa ==> Bba ==> Aba ==> Bbba ==> Abba ==> Bbbba ==> bbba or S==> Aa ==> Bba ==> ba Of these which is the true left mos...
I work for a company that has several projects involving computer vision. The literature rarely has papers on the exact problems we are solving. Furthermore, the state of the art in much of computer vision is often not reproducible or not ready for actual applications. Furthermore, the rate at which new papers come...
Is it possible to find out a string only having its corresponding suffix array/table and knowing that the string contains only, for instance, letters "f", "g", "r"? If so, how is that possible?
In this question, I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of a microkernel with a preemptive scheduler (a thread has no way to prevent the scheduler from preempting it). I'm explori...
I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of a microkernel with a preemptive scheduler (a thread has no way to prevent the scheduler from preempting it). I'm exploring how minimalisti...
According to A Study of Wheat and Chaff in Source Code, 95% of code is "chaff", or "non-core functionality", whatever that means. Is this really a sensible study? Does the IT World article correctly represent the original paper? It's hard to believe 95% of the code I write is "non-core". Maybe an example would help. Th...
Which of the following strategies is more feasible? Strategy 1: Remove the element from the array, compress the array and reheapify. Strategy 2: Update the value of this node to the current maximum value in the heap + 1, then delete_max.
From what I know If the predicate $P(t,x_1,...,x_n)$ belongs to some PRC class $\zeta$ then so do the predicates $(\forall t)_{\le y}$  $P(t,x_1,...,x_n)$ $(\exists t)_{\le y}$  $P(t,x_1,...,x_n)$ But what about the unbounded quantifier? what difference does it make if I replace $(\forall t)_\le$ with $(\forall t)$ and...
Are there any recommended books or other sources about research in IT? For example, I want to do some research on the subject 'Internet of things'. What would be the best way to approach this? What methods should I use?
Some people in n groups, hates from each others. the hates relation are symmetric. (a hates b, b hates a, also). suppose we know list of all people that hates from others. (which one hates from which ones...). we want to divide these people into two groups such that no one in each group hates from others in the same gr...
In pancake sort, the primary operation is: flip all pancakes above a given position. What about flipping all pancakes between two given positions? Anybody knows if this has been studied? To illustrate the problem, here is a quick brute-force, greedy implementation in Python 2.7 (not quite sure it always converges thoug...
From Tanenbaum's Structured Computer Organization: Figure 2-4(a) illustrates a pipeline with five units, also called stages. If one pipeline is good, then surely two pipelines are better. One possible design for a dual pipeline CPU, based on Fig. 2-4, is shown in Fig. 2-5. Here a single instruction fetch unit f...
Given a vector $x=(x_1,\cdots,x_n)$ such that $0\leq x_i \leq1$ and $\sum_{i=1}^n x_i=1$. I would like to find a vector $x^*$ such that ($l_1$ norm ) $||x-x^*||_1\leq \delta$, where $\delta >0$. How can we generate the $x_i^*$ so that still $\sum_{i=1}^n x^*_i=1$?
Let $\phi$ be a Boolean formula and $\mathrm{Tseitin}(\phi)$ the corresponding Tseitin transformed equisatifiable formula. It is well-known that one can get a variable assignment for $\phi$ by solving $\mathrm{Tseitin}(\phi)$ and dropping the auxiliary variables. For example, see Wiki, quote: "When a satisfying assignm...
If a (n,d) random graph is a n-vertex graph defined as : Choose d random permutations $\pi_1 \ldots \pi_d $, from [n] to [n]. Take edge (u,v) if $v = \pi_i(u)$ for some i. I am trying to prove that, for every n and $d \geq 2$, a (n,d) random graph is a (n,2d,1/10) edge expander with probability 1 - o(1). For a given ...
I'm in an undergraduate class where we're studying formal grammars right now. I asked my teacher if there was any known set of rules for creating context free grammars that Was guaranteed to produce an unambiguous grammar. Allows for the creation of any possible unambiguous grammar. I am well aware that determining ...
If you look at page 13 of the lecture slides here there is this line $H(Y) = H((1-\pi)(1-\alpha), \alpha, \pi(1-\alpha))$ I don't really understand what the term on right hand side is. At first I thought it's joint probability of binary random variables but that does not make sense. After a while I notice that the firs...
I've been assigned an exercise in my university. I took it home and tried to program an algorithm to solve it, it was something related to graphs, finding connected components, I guess. Then I made the most trivial thing that came into my mind and then showed to my lecturer. After a brief observation, he perceived tha...
I'm working on a simple project of software engineering that should combine two patterns. I choose Abstract Factory and Decorator patterns to modify (dynamically) objects created with the concrete Factory classes. My question is: is delegating object decorations to those Factory classes a design error? Here's the UML ...
Everywhere from Wolfram's "New Kind of Science" (p. 57) to Wikipedia they say that, out of all possible 256 (=2^8) elementary cellular automata rules, 88 are inequivalent (as defined in the Wikipedia article). Now, the problem is that I am failing to reproduce the 88 number. No matter how I try - I always get 72. And i...
I have encountered the following problem that I found very interesting to solve: Given an array of positive integers $\{a_1, a_2, ..., a_n\}$ you are required to partition the array into $3$ blocks/partitions such that the maximum of sums of integers in each partition is the minimum it can be. Restriction: you c...
This question is concerned with the first order unification. Suppose I have a set $D$ of equations and a solution to these equations. Let this solution be a set $S$ of substitutions. Now, suppose I remove some equations from $D$. Is there an algorithm that just uses these removed equations and quickly updates $D$, or t...
I'm a Computer Science Graduate but I didn't study digital image processing during my college years. Now I'm thinking of learning it, but I'm little bit confused about where to start. Is there any short series of undergrad-level lectures that I can follow, combined with any hands-on mini project (like processing and id...
Can anyone help me find an example of a function $f:\mathbb{N}\rightarrow\mathbb{N}$ which satisfies $\forall n\in\mathbb{N}: f(n)\ge n$ and is decidable, i.e. there exists some Turing machine $M_f$ such that $M_f(x)=f(x)$, but is not time constructible, meaning that any machine $M_f$ deciding $f$ runs in time greater ...
Question: Is the following statement true or false? If $A \subseteq \{0,1\}^* \Rightarrow A^*$ is semi-decidable I thought that since every language is automatically of type 0, it follows that $A \in RE$, and since RE is closed under the Kleene star operator, it follows that $A^* \in RE$ and therefore semi-decidable. H...
I don't understand why GCD is not Strongly Polynomial Time? Can you explain in an example, why the storage size cannot be Polynomial Bounded? So is GCD in the Complexity Class P?
Why do people care about whether a strongly polynomial time algorithm for linear programming exists or not? Does this have any practical improvement?
Is inverting a matrix in the Complexity class $\text{P}$ ? From the runtime I would say yes $\mathcal{O}(n^3)$ but the inverted matrix can contain entries where the size is not polynomially bounded by the input?
Given any computational problem, is the task of finding lower bounds for such computation really possible? I suppose it boils down to how a single computational step is defined and what model we use for the proof, but given that, do we really prove a lower bound then in general? What I means is that can we prove someth...
I have been looking into the sweep line algorithms of finding intersection of line segments and polygon partitioning using monotone polygons. The algorithms require a dynamically balanced binary tree which stores the sorted sequence of the elements in the leaves of the tree. I am familiar with Balanced Binary trees lik...
During my college I studied C/C++, C#.Net and ASP.Net. Now one my friend suggested me to learn Python & MATLAB also. He wasn't much specific why to learn these languages, He said it would be helpful to get a job with these languages. I've also seen lots of good resume, mostly they have Python (Scripting Language), MATL...
what is the best book to gain an introductory understanding of approximation algorithms? I'm looking for something along the lines of the Sedgewick, that has examples written in a well known language and not psuedocode.
I've tried googling it, but found nothing. Here is the context it's in: From Bayesian Reasoning and Machine Learning: Adjacency matrices may seem wasteful since many of the entries are zero. However, they have a useful property that more than redeems them. For an N x N adjacency matrix A, powers of the adjacency matrix...
I recently started studying bayesian networks and I am now implementing an exact inference algorithm: enumeration. I am aware of the complexity and inefficiency of this method but I want to fully understand it. As far as I know there are three basic 'steps': Use Bayes Rule on query / evidence variables. Use summation ...
I'm looking to improve my object-oriented design skills and I came across a problem which asked to design classes to represent a mathematical expression such as (a + b) * ( c - d / e) in memory so that it could be evaluated (by adding an evaluate method if need be in the class some time later) The simplest solution I c...
A question about postfix/RPN came up in my class due to the current ACSL competition. Is it a rule or convention that 4 + (5 * 6) in infix is written 4 5 6 * + in postfix, as opposed to 5 6 * 4 + in postfix? When the second postfix example is translated into infix, the order of the arguments is switched, but should tha...
It's said that a program include algorithms, however if we refer to their definition, an algorithm is a sequence of instructions written to perform a specified task and a computer program is also a sequence of instructions to perform a (some) tasks with computer. Then what makes a program different from an algorithm? ...
I believe that the following NPDA accepts the language $$\{w : w \in \{a,b\}^*,n_a(w)= n_b(w)+1 \}\,,$$ where $n_a(w)$ represents number of symbol $a$'s in string $w$. Is there a two-state NPDA that accepts the same language?
I am trying to understand the sentence from a paper by Patrascu: Unfortunately, we do not have linear perfect hashing. Instead, we use a family of hash functions.... with almost-linearity The context is a reduction between two variants of the 3-SUM problem: In the usual variant, 3SUM, given an array $A$ we have to f...
I am trying to calculate all pure strategy Nash equilibrium in a mxn game. It requires to check all pure strategy pairs (m.n pairs). Suppose player 1 has m strategies. Algorithm should start with the first pair (1,1) and compare (1,1) with (2,1),(3,1),...(m,1). Same for all strategies, exp: (3,4) is compared by (1,4),...
There are N nodes in a graph and some of them are connected with edges. All nodes are of type T1. The goal is to update all nodes to type T2. At any step you can choose any set of nodes and change their type to type T2 with the only restrictions that no nodes in the chosen set can be connected with an edge (i.e. this s...
I have read many papers and books about ontologies and I am trying to figure out that how they are used in a real project? For example how the ontology for a soccer player robot can be defined and used with a cognitive architecture in order to make it intelligent? Are ontologies relations between terms in that domain o...
I want to show a polynomial reduction from TSP to Metric TSP. I know the rule is: $(G, k) \in TSP \iff (G', k') \in MTSP$ where $G$ is some graph, and $k$ is some bound. It seems like whatever I map $G$ to, the way I map $k$ to $k'$ should make it such that if $k$ is the length of the minimum path, $k'$ is also the len...
Are data and return addresses both pushed on the same stack space? If yes, couldn't this piece of code cause problems: CALL r1 //the PC is now the contents of register 1, return address is pushed on the stack. POP r2 //pop the top of the stack and put the data in register 2. RET //return from subroutine The P...
I have a Boolean function that outputs a one on half of its inputs and outputs a zero on half of its inputs, the inputs are assumed to be coming from the uniform distribution. Another way of saying this is the output is one half the time and zero half the time, on average. What is the scientific notation for describing...
I have a quick question. I have a huge database and I am try to sum all the elements in a column of my data base but there are over 100,000 values and I consequently, get integer overflow (returns NA). How do I get around this in R?
I understand that a 1 counter automata is a special kind of PDA where the stack alphabet consists of one symbol (ignoring the fixed bottom symbol) but what about 2 counter automata? Is it a special kind of PDA where the stack alphabet consists of two symbols? Can we generalize like so: a k-counter automata is a PDA wit...
How many combination of "n" bits are there in terms of n? And if this is derived, Given 4 bits for representing negative and positive numbers, what is the largest positive number that can be represented?
I'm following a course on Distributed Systems http://www.ict.kth.se/courses/ID2203/index.html and currently learning about asynchronous models. I can't seem to reconcile a given time-space diagram of an execution with the symbolic definition of the execution as a sequence of configurations and events. In the model, a...
I understand big O notation in computational complexity theory, but I don't see how it applies in the equation below. From Pattern Recognition and Machine Learning: If we weren't familiar with the rules of ordinary calculus, we could evaluate a conventional derivative $dy/dx$ by making a small change to the varia...
Why does there seem to be a preference for using Huffman (or Arithmetic) coding instead of a Lempel-Ziv type compression algorithm for Burrows-Wheeler Transformed data? I noticed that data compressors such as Bzip2 or ZZip use mainly a combination of BWT, RLE and Huffman/Arithmetic coding. I would like to know what are...
Since I'm studying for my formal languages college course, I stumbled upon these fascinating posts (One Two) which describe how to find a prime number using a regexp. As I said, a regexp, not a regular expression. Since a regular expression can match strings computed by a Finite State Automata and finding a prime numbe...
I would like to delete the $\epsilon$-production from the context free grammar with the following rules P: $$S \rightarrow ASB , BSA, \epsilon$$ $$A \rightarrow aS$$ $$B \rightarrow bB, b$$ Now we were only given this algorithm for that task: collect all variables from which the empty word is derivable. -> which in t...
This is a question from a text book that's giving me some trouble. The question is: Determine whether or not this language is regular. Justify your answer. $$L = \{ww : w \in \{a,b\}^* \}$$ I think this language is not regular because $w$ can be of arbitrary length and adheres to no pattern. So, therefore, it can...
I want to know if there is an algorithm which does the following: Imagine you have a point cloud and the points affect each other but the action from each point to an other is only valid in some radius around this point (locally). Now remove one point and the local configuration changes. How is the cheapest way to dete...
Let's say you want to show $A \leq_{p} B$ (this is usually in the context of showing $B$ is NP-complete, but I'm just asking about the reductions. We are specifically looking at polynomial (Karp) reductions. Also, specifically decision problems--the answer is YES or NO) Here's how I'm thinking of it. Reach into a bag f...
In Concepts in Programming Languages, John Mitchell writes that static type checking is necessarily conservative (overly strict) because of the Halting Problem. He gives as an example: if (complicated-expression-that-could-run-forever) then (expression-with-type-error) else (expression-with-type-error) Can some...
I am trying to understand the proof that the axis parallel rectangles are PAC learnable in the realizable case. This means that given $\epsilon, \delta$ with enough data we can find a function $h$ such that $$\mathbb{P}\left[\text{error} > \epsilon\right] \leq \delta$$ Here error can be seen as the probability of makin...
I'm working on my own little programming language for educational purposes, and I've run into a little bit of a problem. There are a few different solutions for it, but all of them seem inelegant - and from what I understand, unnecessary. But reading through the books I have and google searches, I can't find the elegan...
Let $\mathsf E$ be deterministic exponential time with linear exponent. Do we know that the inclusion $\mathsf P\subseteq\mathsf E$ is strict? If so, what's the proof? The time hierarchy immediately separates, for instance, $\mathsf E$ and $\mathsf{TIME}(2^{n\log n})$. Diagonalizing directly on $\mathsf P$ yields es...
I thought of this question today: given are a decidable set $A$ and undecidable set $B$ for which $A \cap B = \emptyset$. Is $A \cup B$ decidable or undecidable? I am almost sure that it is undecidable but cannot come up with an argument/proof as to why, or even a counterexample.
Consider the following quadratic maximization: \begin{align} \max_{\mathbf{x} \in \mathcal{X}} &\quad\mathbf{x}^{T}\mathbf{A}\mathbf{x} \end{align} with \begin{align} \mathcal{X} = \lbrace \mathbf{x} \in \mathbb{R}^{n} :~ \|\mathbf{x}\|_{2}=1, \|\mathbf{x}\|_{0}\le k \rbrace, \end{align} where $\mathbf{A}$ is a positiv...
I have trouble understanding Turing's halting problem. His proof assumes that there exists a magical machine $H$ which could determine whether a computer would halt or loop forever for a given input. Then we attach another machine that reverses the output and we have a contradiction and therefore $H$ cannot exist. My c...
How would I set up a recursive formula for time-complexity for this code: int b(int n, int x) { int erg = x; if (n>1) { for (int i = 1; i <= n; i++) { erg = erg+i; } for (int k=0; k<3; k++) { erg = erg + b(n/3,erg/9); } } return erg; } Is my assumpt...
I'm a computer engineer trying to understand this Eppstein paper for matching subgraphs in planar graphs. I'm trying to find subgraph matches to map an application graph (the subgraph) to a network-on-chip (the large graph). I have already implemented Ullman's subgraph isomorphism algorithm and I'm successfully listin...
A student of mine is studying the knapsack problem (0-1 with a single objective). She is also talking to an industry partner who has realistic problems she can try solving (between 1000 to 10000 items). We're having some trouble finding good references and existing implementations, mostly because I am not an expert in ...
There are different class of languages, regular,CFL, recursive and r.e. and non-r.e. Clearly a language is set of strings. if an infinite set belongs to any of these classes then what can we say about any infinite subset of that set? As an example the language $\{a^n | n\in N\}$ is a regular language and it is infinite...
Given an oracle that can solve in polynomial time: $$a^Tx=b$$ $$x \geq 0$$ So it can solve the feasibility problem with one equality-constraint ($a$ is here a vector and $b$ is a constant, $x$ is required to be integer) and non negativity constraint for the solution. (This problem is also known as unbounded knapsack pr...
From this book and other study in complexity theory, I have seen the following statement: The definition of NP is not symmetric with respect to yes-instances and no-instances. For example, it is an open question whether the following problem belongs to NP: given a graph G, is it true that G is not Hamiltonian? Howev...
In part (c) of Figure 8 in this paper http://ramcloud.stanford.edu/raft.pdf, I am confused how S1 knows that the current term is 4 when it restarts and is elected leader. Here is the sequence as I currently understand it: S1 is elected leader for term 2, partially replicates a request, and then dies. S5 is then electe...