instruction
stringlengths
35
29.1k
In the graph below, N and M are most remote, and H is also an extremum. Has the problem of finding the most remote vertices been formalized? Could you point me to publications or references on the subject? Does an algorithm exist for finding the most remote edges of a graph? Please note that I am not asking you to in...
I have the following problem which I think is so common that I expect it to have an official name (and standard algorithm of course). The situation is as follows: I receive distinct items (A...E in the below sketch) one after the other. Each item has a relation which can generally be termed "descendance" or "family" an...
Imagine this Table: All combinations represented in the table (1,2 ; 1,3 ; 1,4 ; etc.) are stored as strings in an array with a total of (n^2-n)/2 elements (combinations). I'm looking for an algorithm that sorts the elements so no number of a combination is next to a combination with the same number in it. For exam...
"Buy and Resell Problem" can be described in the following way: There are $n$ cities. For each city, the price of products in this city is given (a positive number). Now a person will travel from city 1 to city $n$, one by one. When reaching a city, he can buy exactly one product with the price in this city, or sell ...
I'm having trouble determining the complexity of an algorithm. Let's say the number of operations of my algorithm is described by $$f(x, k) = f(x, k-1) + f(x-1, k-1) + f(x-2, k-1) + \dots + f(1, k-1)$$ where $f(x, 1) = x$ How can I describe the growth of $f(x)$ in terms of $x$ $k$ $x$ when $k=x-1$ For 1), I believe $...
The language given is: $$L = \{\langle M\rangle \mid M \text{ accepts all strings of length at most 5} \}$$ I have to find the class to which this language belongs. Now according to my intuition, recursive enumerable languages are those which have verifiers i.e for any string $w \in L$, there is a way to prove that $w ...
Given an NFA with alphabet $\Sigma = \{a, b, c\}$ defined in the diagram, is there a way to efficiently convert it into a regular expression? The way I solved this problem is to first convert the NFA into a DFA using equivalent classes, and then proceed with the method described here. I feel in this case, that method ...
I came across following problem: Find the time complexity of below recurrence relation: $T(n)=\begin{cases} & 2T(n/2)+C; & n>1\\ & C;&n=1 \\ \end{cases}$ The solution was given as follows $\begin{align} T(n) & = C+2C+4C+...nC\\ & = C (1+2+4+...+2^k) \\ & = C \left(\frac{1(2^{k+1}-1)}{2-1}\right) \\ ...
I have a problem where I have a number of proposed initiatives each with a cost and payoff. I need to select a subset of these initiatives in order to maximize the ROI for the selected set as a whole while staying within a total cost constraint. Specifically, the problem is: Maximize [sum(v_i*x_i)/sum(c_i*x_i)] Subject...
I am new to Huffman coding and I find myself facing a lot of confusion as to how to determine if a code is Huffman or not without having the probabilities associated to each codeword. I know one way is look at whether or not the code is prefix. If not, then it's not a Huffman code. If yes, then we need to check if it g...
I've been thinking about a computational problem and could use some guidance for how to go about developing an algorithm to solve it. On a Euclidean plane, I have a polygon A, a set of points A* bounded by A, another polygon B (that does not intersect A), and another set of points B* bounded by B. What I want is to cre...
Can solutions to the graph coloring problem be used in the prison system to keep known enemies apart with the goal of reducing violence?
x,y are regular expressions, prove this: (xy+x)$^*$x = x(yx+x)$^*$* (* in this expression is kleene star) I am looking for a method that is applicable to prove such questions. I know that proof needs to show that: 1) (xy+x)$^*$x => x(yx+x)$^*$ 2) x(yx+x)$^*$ => (xy+x)$^*$x My attempt is like this: 1) (xy+x)$^*$x = =...
In an instruction execution pipeline, the earliest that the data TLB (Translation Lookaside Buffer) can be accessed is: List item before effective address calculation has started during effective address calculation after effective address calculation has completed after data cache lookup has completed ==============...
Our problem is: Given an undirected graph, does it have a vertex cover consisting of $k$ vertices? A vertex included in this vertex cover variant will cover every edge incident to it and every edge incident to some edge incident to it. Hence, we call this variant a vertex cover with covering radius 2. What is the compu...
I am generating an LL(1) parser generator for LL(1) grammars that have a maximum stack size when executed in the table-driven parser. Specifically, I'm parsing HTTP headers using a parser generated by the LL(1) parser generator. In case somebody asks, yes, it's possible to parse plaintext HTTP using LL(1) parser, if th...
The Wikipedia page on zero-knowledge proof says Zero-knowledge proofs are not proofs in the mathematical sense of the term because there is some small probability, the soundness error, that a cheating prover will be able to convince the verifier of a false statement. In other words, zero-knowledge proofs are probabili...
so we know data hazards may occur on data that is not ready yet and we can solve them by forwarding data in between the pipes. Look at this piece of code: lw $6, -16($6) sw $6, -16($5) So the sw wants the data that comes from the MEM read and it wants it just for the MEM write. So we can use a bypass to forward the ou...
I'm reading this book Cracking Coding Interview. In this book author is speaking about BST representation of Hash Tables. I googled a lot for BST Representation of Hash Table. Code in C++ but didn't find any link or example. Can someone help me with the implementation. I'm really confused how to represend Key-Value pai...
I'm planning to implement a lexical analyzer by either simulating NFA or running DFA using the input text. The trouble is, the input may arrive in small chunks and the memory may not be enough to hold one very long token in the memory. Let's assume I have three tokens, "ab", "abcd" and "abce". The NFA I obtained is thi...
You open a code editor, define a syntax with lambdas, a few primitives. Then you invent some nice computation rules, some cool typing rules, and write a corresponding interpreter and "type checker". Congratulations! You just built a proof assistant! Now you can formalize all of mathematics on it! Or can you? After all,...
Given $k$ functions $f_0, f_1...f_k$, a large dataset of size $n$, is there an algorithm that will "approximately" sort the dataset according to all of the functions so that "most" items of the dataset end up close to where they should be if they were sorted by any one of the functions alone. More formally, if we have...
I want to solve the Sparse Extended Information Filter Slam described by Dr. Sebestian Thrun in Probabilistic Robotics.I stuck in some nested function. The algorithm is described in page 309 in this book at Table 12.1 Algorithm is like that: 1.Algorithm SEIF_SLAM_known_correspondence($\xi_{t-1}$,$\Omega_{t-1}$,$\mu_{t-...
Given an input table with binary operation $\circ$. I want to check whether given input table represents a group or not. I need to verify the four axioms of a group. The identity I can find it by just scanning the first row of the given table. -----$\mathcal{O}(|G|)$ running time. Find the closure operation ie.e for a...
Yesterday I have been trying to complete this exercise. I have to find: $$ ((map)l)t \simeq \lambda k \lambda x ((k)(t)t_1)....((k)(t)t_n)x $$ where $$l=\lambda k \lambda x ((k)t_1)....((k)t_n)x$$ And $t$ is a generic Lambda term. I tried but without success. Maybe it will be something like that : $$map=(\lambda a \la...
I have tried my best but I'm not able to find any pattern for the $n^2n^{1/2}$ part. This question must be solved iteratively and I get totally clueless after two iteration.s I've to find tight bound in big-O.
This question is motivated by my attempt to understand quantum computing and the source of its computational power. Quantum statest are described by complex numbers. That is, 1 qubit is described by 2 complex numbers, one for each state (actually 1 complex number, due to the constraint and the invariance). Quantum phen...
I am really bad at calculating correctly the complexity of a given algorithm. I would like to know if there is some book or online resources where I can find many exercises that ask to calculate the complexity of a given algorithm. Thank you!
I have been reading about instruction pipeline and I stumbled upon the term delayed branches. From what I have understood, delayed branches will keep the pipeline busy, by executing instructions, regardless of the outcome of the branch. This will avoid the usages of NOP instructions. What I do not understand is, how is...
I've recently came across this language and I don't know if my hint for proving its class is correct or not. $$L = \{ n : \exists x \in N, \,n=3x+2 \} $$$n$ is in binary format. I think $L$ is decidable and as proof I was considering using a canonical enumerator of $\{0,1\}^*$. For each word $x$ printed by the enume...
So at the beginning I was aiming at $L_{a\neq b} = \{w\in \{a,b\}^* : \#_a(w) \neq \#_b(w) \}$. But figured out that is would be better to first deal with: $L_{a>b} = \{w\in \{a,b\}^* : \#_a(w) > \#_b(w) \}$, due to the fact that $L_{a>b} \cup L_{b>a} = L_{a\neq b}$. My attempts so far for $L_{a>b}$ - I proved that t...
Is there a difference between $T(n)=2T(n/2)+n$ and $T(n)=2T(n/2)+Θ(n)$ when using the master theorem? I've seen it both ways and am a little confused. (Looking for the answer $nlogn$).
The challenge says that there is a hash algorithm with a bug, the bug is given if it reaches the end of the array and did not find space to save the element, it discards it directly (that is, it does not try to place it in positions 0, 1, 2 ... as it would be correct) In a hash table using closed hash, linear probing, ...
I have no idea how to approach this problem, could I get at least a hint on how to go about proving/disproving this? I've tried the pumping lemma but I don't think it applies here. I've also tried reasoning about closure properties, but I think my reasoning is faulty. My thought process so far is a string (with length ...
I want to be able to find closed form runtime solution for recursive insertion sort which looks something like this $$T(n)=\begin{cases} 1 &\text{if }n=1,\\ T(n−1)+3n &\text{if }n>1. \end{cases}$$ However, I am confused about how to plot a tree. I know how to find runtime using tree if problem is divide...
Is Master's theorem applicable on $T(n) = 2 T(\frac{n}{2})+n\log n$ ? I got this doubt from here: https://gateoverflow.in/227814/introduction-to-algorithms
Recently, I've read Hennie's Paper. I understood the construction of buffer zones, but why can't it be applied to yield a single-taped Turing machine?
I am reading the paper Foundations and tools for the static analysis of Ethereum contracts, by Grischenko et al. Sometimes the authors speak about hyper properties (e.g. Section 5). What exactly is a hyper property in this context?
I know that different authors use different notation to represent programming language semantics. As a matter of fact Guy Steele addresses this problem in an interesting video. I'd like to know if anyone knows whether the leading turnstile operator has a well recognized meaning. For example I don't understand the lea...
We are given an array of size $N$ with integer entries $> 0$. We have to count the number of all such pairs $(a,b)$ with $a \leq b$ such that $a*b$ is divisible by $a + b$. The obvious naive way is to check every pair and it takes $\mathcal{O}(N^2)$ time. This seems to be more of a maths problem rather than algorithmi...
There are two ways to implement a circular array either take a new array of size 2N where N is the size of the initial array and copy initial array twice into that new array array = [1,2,3,4,5] new_array = [1,2,3,4,5,1,2,3,4,5] Or we can use (i % N) where N is the size of the array, i is the index of that element for(...
I’m reading about the BB84 quantum key distribution scheme, and I’m surprised that it’s conceptually more complicated than seems necessary to me. What’s wrong with this conceptually simpler scheme? Alice chooses two random strings $x,y \in \{ 0,1\}^{2n}$ Alice encodes $x$ into qbits, choosing the basis in which to enc...
Given point sets $Y$ and $M$, I'd like to register articulated $M$ to $Y$ without changing the edge distances of $M$. The point correspondences between $Y$ and $M$ are known and points have a fixed connectivity map. As you can see from the above sample, the edge distances of $Y$ are corrupted, and I'd like to correct ...
In the linear time selection algorithm which finds the ith smallest element in O(n) time our first step is to divide our unordered set into subsets of 5. Why is the size of the subsets chosen to be 5 and how would the algorithm be affected if I chose a different number. Nothing online describes why this number is the c...
I'm trying to come up with a data structure for a following model: Nodes representing points in space are structured in a tree (general rooted tree with no restrictions). Let's call these nodes "joints". Joints contain information about their position and their axis of rotation: Whole subtrees may rotate around their p...
Anyone who deals with mathematics knows intuitively that it is a different kind of thinking than ordinary common-sense thinking that intelligent people use every day to understand and make decisions in the world. I would like to understand what separates ordinary common-sense thinking from mathematical thinking, and I...
Consider a method which finds prototypes for multivariate time-series (MTS) data, and is designed to find prototypes for each class of data. For example, the {walking} class consists of some slightly different types of {walking} sub-classes, but they are not annotated. So i want to check if my prototypes can adequatel...
Consider the following setup: Input: An array of tasks $T=[t_1,t_2,...,t_k]$ where each task $t_i$ is an object that has the following features: start time $s,$ finish time $f$ and coordinates $x$ and $y$, which give the location where the task needs to be performed. Next, we have an array of people $P=[p_1,p_2,...,p_m...
Let $G = (V, E)$ be a graph. I want to find the subset of vertices of $G$ that minimizes a certain modularity cost. In our setting, the modularity cost of a subset $X$ is defined as the number of non-edges within $X$ plus the number of edges from $X$ to the outside, all this divided by $|X|$. Intuitively, it is the ...
I'm trying to understand the following algorithm: int ubnd = Integer.MAX_VALUE int lbnd = ubnd while (fload)lbnd == (float)ubnd { lbnd = lbnd - 1 } lbnd = lbnd + 1 print "$lbnd..$ubnd" I don't see why for 63 iterations of the loop, we have (float)lbnd == (float)ubnd. It has something to do with the conversion of i...
Using the Master Method, I need to prove (True, or False and why) the following (3) recurrences: $T(n) = 3T(\frac{n}{2}) + n = \Theta(n\ln(n))$ $T(n) = T(\sqrt{n}) + 1 = \Theta(n^2)$ $T(n) = 2T(\frac{n}{3} + 1) + n = \Theta(n\ln(n))$ I understand the Master Method (I think, largely from: https://stackoverflow.com/que...
In a Distance Vector routing protocol each node implements a Bellman-Ford inspired algorithm that shares it's routing table (Distance Vector) with each of it's incoming links (upstream neighbors). How would a source node identify a destination node it could reach at an infinitely low cost by traversing a negative cycl...
David IShuman in " vertix-frequency analysis on graph" claims that,"we generalize one of the most important signal processing tools – windowed Fourier analysis – to the graph setting and When we apply this transform to a signal with frequency components that vary along a path graph, the resulting spectrogram matches ou...
Lets there are n stores. A customer order x items. All the stores might not have all the items from the order. So find the store/combination of stores that can serve the order request such that the combination that contain least number of stores. Edit: Example: Lets say there are 4 stores. User is ordering item 1, 3, ...
If a process executes the following code fork(); fork(); fork(); The total number of child processes created is given as 7 by a text book. But how does that happen fork generates 2 processes right? Are both the processes referred to as child processes? One process is the parent parent and one is the child right? Eve...
Consider that I have an array of ranges and I want to transform it to the new array that represents the ranges that any range is in. Example: Ranges: [red: [1,11], black: [15,16],yellow: [5,9], green: [7,8]] Result: [1,4] - red [5,7] - red & yellow [7,8] - red & yellow & green [8,9] - red & yellow [10,11] - red [15,1...
In the www I can find a lot of application examples suited for and benefitting a lot from distributed computing. Question: Are there applications which are not suited for distributed computing? If yes (which I assume) which promiment examples are out there? Thanks a lot for pointing me into some useful direction.
I am currently solving a problem in which we have to show that we can not prove using pumping lemma that the language mentioned in the question is not regular.Here is the full question Consider the language F = {$a^i b^j c^k$ | i, j, k ≥ 0 and if i = 1 then j = k}. a. Show that F is not regular. b. Show that F acts li...
Apologies ahead of time, I don't fully understand what I'm asking... But, is it possible to program using only 'while loops' and still be Turing equivalent? Or more generally, can I do everything with 'while loops' that I could with 'if statements' and 'for loops'?
We have given two numbers $x$ and $p$. We want to count how many numbers are less than $x$ and are co-prime with $p$. I know that we can solve the problem in $O(x\log x)$ with iterating over all numbers less than $x$ and check if their greatest common divisor is $1$. Is there any way to solve this faster, because I thi...
I'm looking for one of two closely related algorithms. In both, you have a list of elements, of which you have to choose one by some scoring method. In the first variation, the list is infinite and you can't go trough it all, but you can choose any item. In the second, you must choose to accept or reject an item perman...
There are $N$ weights, $w_i$. and signal starting from $a_0$. I would like to moving weighted sum of signals, such as: $$ s_1 = w_1a_1 + w_2a_2 + ... + w_Na_N\\ s_2 = w_1a_2 + w_2a_3 + ... + w_Na_{N+1}\\ s_3 = w_1a_3 + w_2a_4 + ... + w_Na_{N+2}\\ $$ and so on. If we are to calculate the sums from $s_1$ to $s_M$, an bru...
I have an assignment There are n > 2 finite processors, two registers for each processor. Register s_i is not readable by the processor p_i but any other processor can read it. Register r_i is readable and writable by the processor p_i and any other processor can read it. I have to solve the problem to let p_i discov...
Let $$ L_{300}=\{\langle M,w\rangle \mid M\text{ prints more than }300\text{ non-blanks on input }w\}.$$ Is $L_{300}$ decidable? My intuition is it is decidable because given $M$ and $w$, we need to check for a bounded number of steps which would be a function of the number of states in the finite automata of $M$, inp...
Given is an undirected weighted graph with N nodes, with each node having a property/Value. Aim is to find the bestpath which maximizes the sum of the nodes property which can be visited given a constraint on the maximum distance/weight than can be traversed over the entire graph i.e. the sum of edge weights of best pa...
I fail to understand a algorithm, basically the matrix multiplication portion. I can explain the unknown terms. At line no: 4 j will be 1,2,3,....,15. When ever new object is observed a value corresponding to this object assigned in j. There are total 15 objects. So when object number 1 observed it is assigned to j. ...
I want to create an algorithm to build a hex matrix with given: - max n rows - max m collumns - min t rown - min q collumns containing the specific words from a list: "example", "test", "algorithm". For example. To build a hex matrix with: - max n = 5 rows - max m = 6 collumns - min t = 5 rows - min t = 4 col...
Can anyone explain why the runtime of this is in O(N^3)? Additionally, what would the run-time be in Big-OH if the else statement was removed. for(int i = 0; i < n; ++i) { for (int j = 0; j < i; ++j) { sum = sum * sum; } for (int k = 0; k < i * i; ++k) { ...
So given an array of [1,5,9,4], find all pairs of numbers that can sum/subtract/divide/multiply to another number in the array(that number is not part of the pair), and return the total count of pairs satisfying this condition. (If a pair has 2 math operators that fit to the same number or if a pair can combine to 2 di...
I am working on proving the time complexity for the following problem, but believe I am stuck: $$T(n) = 2T(n/3 + 1) + n$$ I have checked out this link here on time complexity on cs.stackexchange However, I still cannot seem to find the answer. Using this proof from a Dartmouth course: $a = 2, b = 3, c = 1$ In this cas...
I don't know where else to ask this question, I hope this is a good place. I'm just curious to know if its possible to make a lambda calculus generator; essentially, a loop that will, given infinite time, produce every possible lambda calculus function. (like in the form of a string). Since lambda calculus is so simple...
I need to solve a maze. I can move an object around in a 2D maze by giving it 1 acceleration in any 8 of its 8 directions. The object starts at rest at 0 velocity. By only adding an acceleration at each step, I need it to be able to solve the maze and finish at the end position with a final velocity of 0. This maze is ...
let S be the set of all programs that take a natural number as input and return another natural as output. let M be the set of all programs that take a natural number as input and return true or false. In both cases for a program to be in S or M it must halt. Consider programs P in S, I will say the integer n is "in" P...
When reading the description of Raft algorithm from Wikipedia, I noticed there is a special word index. For web developer, index usually refers to database index. When it comes to Raft algorithm, what does index mean? Is it similar with database index? e.g. B+ tree. What is raft index used for? Wikipedia: Raft Log ...
I have been given an array whose elements lie between [1,70] and the size of array [1,10^5]. I have to find the total number of subsets whose all elements multiply to give a perfect square number. Since, count of subsets can be very large, I have to give the ans mod (10^9 + 7). How should go on to solve this problem ?...
Question 1: Is it known that $\mathrm{QP}=\cup_{k}\mathrm{TIME}(2^{\mathrm{log}^k(n)})$ has any complete problem? Question 2: Can this be used to simplify the computational complexity theory at all?
For AVL-Tree there exists the following Rotations for Balancing: Left Rotation Right Rotation Left-Right Rotation Right-Left Rotation My Question is about the Naming for the Double-Rotations. Sometimes a Left-Right Rotation is defined as a Left-Rotation followed by a Right-Rotation. This is for me the logical case. S...
Given an array $|A|=n$ of integers, and $m,k \in \mathbb{N}$, I want to find $m$ elements $a_{i_1},...,a_{i_m}$ of $A$ such that $\sum a_{ij} \geq k$ (repitions allowd), or determine that no such solution exists. Clearly, a trivial solution is to take the maximal element $a_{max} = \max_{i} A_i$, multiply it by $m$,...
I am studying Theory of Automata. I was studying conversion of Epsilon-NFA to NFA. I had to take null closures of states two times, before and after the specific input. Could someone explain, what is the reason behind this?
Garey proved that the Rectilinear Steiner Tree problem is (strongly) NP-hard. I wonder if it is still true when we retrict the points to have integral coordinates and lie on a square of side lenght n^O(1) where n denotes the number of points.
given an array $A$ of $n$ numbers in range $1$ to $n\log n$, what is the time complexity of the best method to sort them? The answer is $O(n)$ but I don't understand this. of course counting sort itself is irrelevant, perhaps radix sort with base changing is the way to go, but I'm not sure of to change the base of $n\l...
I am getting started to understand the probelm of Satisfiability and i am reading (Computers and Intractability: A Guide to the Theory of NP-Completeness). I do understand the difference between a Deterministic and Non-Deterministic Algorithm, however i don't understand why SAT requires a Non-Determinsitic Algorithm ? ...
Let $(V, E)$ be a simple connected undirected graph, $f: V \to \{-1, +1\}$, and $g: E \to \{-1, +1\}$. The function $g$ is completely defined by $f$, while $f$ is something we get to choose. The only thing we know about $g$ is that negating $f(v)$ causes $g(e)$ to negate whenever the edge $e$ is adjacent to vertex $v$,...
Has "top" ($\top$) been removed from or relegated to a much more minor role in denotational semantics? If so, when and why? I see older papers and books talking about both "top" and "bottom" ("bot", $\bot$), but it seems like newer work only refers to bot. I vaguely recall seeing a reference somewhere that said that to...
If not (because I assume not) is there some kind of reference or book that provides some theoretical foundation to these concepts? I've been learning about data structures and abstract data types for a while now but all these concepts seem very hazy and I would like some sort of rigorous grounding to stand on. I hear t...
Not sure if I should ask this on CS or physics SE, but here goes. I’m reading on quantum computing, and one thing that keeps confusing me is the following basic fact about QM: Say we have a qbit A, and a qbit B, then two possible quantum states for $A$ are: $$|+\rangle=\frac {|0\rangle + |1\rangle}{\sqrt 2}$$ $$\frac {...
A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 1, 2, …, 100 in that order, and repeats the access sequence THRICE. Which one of the following page replacement policies experiences the same number of page faults as the optimal page repla...
Let $S$ be the set of all programs that take integers as input and return integers as output and halt on all inputs. Does there exist a pair of program in $S$, call them $P_1$ and $P_2$, such that there exists no program $P_3$ in $S$ for which the following hold for every integer $y$: $P_3(x)=y$ for some $x$ iff $P_1(x...
A reversible circuit, if I understand it correctly, is a circuit where every gate in the circuit is invertible, i.e. can simply be “turned in the opposite direction”, so that the entire circuit can in a sense just be “turned in reverse” without changing the circuit architecture. An invertible function is not defined in...
Can a distributed algorithm be serial? For example if I have 3 distinct agents in a network would an algorithm that looks like this be considered a distributed algorithm? Process ABC If (you are agentA) then Do stuff Else if (you are agent B) then Wait until agent A has finish...
I am currently reading SmartCheck: Static Analysis of Ethereum Smart Contracts (Tikhomirov et al., WETSEB'18; PDF). In section 3.1 it talks briefly about synonym propagation. What is synonym propagation? I searched in the Dragon Book, but I did not manage to find it.
In case $L$ is context free language. $L_1 \setminus L_2 = \{x\in \Sigma ^* : \exists y\in L_2$ s.t $xy\in L_1 \}$ when $L_2$ is regular, is a context free language, thus using $L_1 = L$ ,$L_2 = \Sigma ^*$ one conclude that prefix$(L)$ is context free. However I wish to build a grammar for prefix$(L)$. My attempt so fa...
Take the Set Cover problem as an example. When we ask if there is a set of size k that covers all the elements, the problem is NP-complete. Now if we ask, for a given set $S$ of size $k$, if there exists another set that covers strictly more elements than $S$ does. Is this problem still NP-complete? To be clearer, let'...
I'm reproducing a question I posted on MSE (yet with no answer both there and by myself). Given a (finite) directed graph $G = (V, E)$. For each vertex $v \in V$ and a natural number $n$, let $W_v(n)$ be the number of walks in $G$ of length exactly $n$ originating at $v$. That is, $$W_v(0) = 1 \quad\text{and}\quad W_v(...
I'm looking for a name of a group of all commands which are break the linear structure of the program. In C PL, they are: goto,return,break,continue. C++ also contains throw. Perl has last,next,return. Is there a common name for those groups of commands? Where can I read about those kind of commands?
microsoft.com has the ip address 23.96.52.53 Since the first number is $23$, this is class A. Does this mean microsoft owns all the addresses from 23.0.0.0 to 23.255.255.255 ?
I have read somewhere about an alternative SSA representation that doesn't use phi nodes but instead uses parameterized basic blocks. Something like this in an SSA with phi: block_a: value_a = ... jump block_c block_b: value_b = ... jump block_c block_c: value_c = phi (block_a: value_a), (block_b: v...
I designed an algorithm, and the Time Analysis provided next time complexity: $\mathcal{O}(2^p \cdot (\frac{t}{2}/2^p) \cdot \frac{n}{4})$ what must be simplified to: $\mathcal{O}(2^p \cdot \frac{n^2}{16})$ = $\mathcal{O}(2^p \cdot n^2)$ That constant factor is quite relevant in this case, and the only reason I'm cons...
Given two arrays of integers, A and B, with same size (or two bit vectors A and B with some bits enabled) What would be the faster way to create a list C containing the elements from B not in A, (or the indexes of the bit vector B not enabled in A)?
Here is the context (Structure and Interpretation of Computer Programs, section 1.1.8, under heading "Local names"): A formal parameter of a procedure has a very special role in the procedure definition, in that it doesn't matter what name the formal parameter has. Such a name is called a bound variable, and we say th...