instruction
stringlengths
35
29.1k
(Re-posted from StackOverflow as suggested) I have the following problem. The functions $f(x),g(x)$ are defined as $$ f(x) = \begin{cases} f_1(x) & 0 \leq x \leq 10, \\ f_2(x) & 10 < x \leq 20, \\ 0 & \text{otherwise}, \end{cases} \qquad g(x) = \begin{cases} g_1(x) & 0 \leq x \leq 5, \\ g_2(x) & 5 < x \leq 20, \\ 0 & \...
1) Is there a better algorithm than the naive O(|E|.|V|) to compute the number of descendants of each vertex in a DAG? 2) Is there an online algorithm to do so, assuming that nodes are added one by one and connect to a non empty subset of the existing nodes? Context: I'm interested in the case where m = O(n), millions ...
I am looking for articles relating to algorithms that deal with automatic selection of seating assignment. I need an algorithm (preferably more than one) that can automatically select a seating place while enforcing certain constraints that are predefined. Originally I was planning on having the seats selected on the f...
In class yesterday we went over DFA's and DFA acceptable languages. An example of a language that is not DFA acceptable was given as $\{ ab, aabb, aaabbb, aaaabbbb, \ldots \}$. The reason given was that the machine would need an infinite amount of states. But wouldn't a simple DFA that has only one state that is a ...
I have an idea of how a C program is turned into machine code by the compiler. I also know how the processor processes the instructions (https://www.youtube.com/watch?v=cNN_tTXABUA this video has a good introduction). But what I don't understand, is how an operating system (most times written in C or some low-level lan...
Have a question that requires me to write the rules for parsing a turing machine This is the question The PROBLEM involves writing a set of Turing Machine rules that will read and determine whether or not an input corresponds to the rules of a Turing Machine. This is the first step of a Universal Turing Machine. For ex...
From purely my knowledge of computer science a simple breadth first search from root A in search of node B, while keeping track of the depth of the tree, would be the most effective way to check whether A and B have 6 degrees of separation. If I simply wanted to check whether B is within 6 degrees I could also limit my...
I'm studying for my finals and I can across this statement. "For a fixed set of (unique) keys, any binary search tree containing those keys can be converted to any other BST on the same set of keys via a sequence of left- and/or right- rotations." I'm interested in a proof. Does anyone know any references?
I need a regular language $ L\subseteq \{0,1\}^{*} $ so that $unary(L)$ is not context free. unary of $L$ is defined by: $$unary(L) = \{0^{1x} : x \in L \}$$ Example $L = \{0, 11\} $ $\rightarrow unary(L) = \{00, 0000000\}$ Any help would be great.
I need to find a function $f$ which is in $o(\log^{k} n)$ for fixed value of $k$ with $f = \omega(1)$. I know that for little $o$ the function should be strictly less than $c\log^k n$ for all $c$ and large enough $n$; and for little $\omega$ it should be strictly greater than $c\cdot 1$ for all $c$ and large enough $n$...
I have two True or False questions in my practice test that are related but I am unsure about: 1. If an optimization problem can be solved using a greedy algorithm, there must be a solution for this optimization problem using dynamic programming as well. 2. If an optimization problem can be solved using dynamic progr...
I'm looking for public algorithm which gives the engine these abilities: Query by ranked terms Limit outcome by date/time range Basically, i'd like to concentrate articles (generally title|text|timestamp) identify the source and make N-N correlation to terms (is term for datasource same marking as term for dataentry?...
I'm ordering functions by their asymptotic growth for an assignment and I have verified I have the correct order by using limits, but I'm trying to understand why $n^{log\ log\ n}$ is between $n^3$ and $2^n$. It seems like it should be closer to the order of $n^n$. Can anyone provide some insight on this.
So I've been thinking about verifiers and a possible relation between a language's class and it's verifier complexity. From the book, "NP is the class of languages that have polynomial time verifiers". Is there an analog statement that can be said about a P-class verification complexity? Because P is a subset of NP, I ...
What I understated is this: Probabilistic algorithm: an algorithm that produces result in determined time with a confidence value about the probability of the produced result being correct. Randomized algorithm: an algorithm that uses some sort of randomization to reach the result, that too with absolute surety of reac...
I am trying to obtain the proof of the proposition: $(\forall x \in \mathbb{N}, P(x)) \vee (\neg \forall x, P(x))$ given that the property $P$ is decidable for every $x \in \mathbb{N}$, i.e. $\forall x \in \mathbb{N}, P(x) \vee \neg P(x)$ This is easy to prove (even without using the decidability of $P$) if I include t...
I am trying to prove that 3SAT is polynome time reducable to CNF-SAT, but I don't know how to do this. A formula F is in 3SAT iff f(F) is in KNFSAT, but since 3SAT is a part of KNFSAT, every formula that is in 3SAT will automatically be in CNF-SAT. Is my conclusion correct? And how do I actually show this in a correct ...
I'm trying to understand the material in "A Dual Coordinate Descent Method for Large-scale Linear SVM" by Hsieh et. al. (link to paper) There is an equation for the Dual form of an unconstrained optimisation problem, $$ f(\mathbf{\alpha})=\dfrac{1}{2}\mathbf{\alpha}^T\bar{Q}\alpha-e^T\alpha $$ I don't understand what t...
i'm a little bit lost ... can you help me ? So I have this table of date (each row give a point with its group) So i took a random weight let's say : [1, -2] H = 1 if n =< 0 0 otherwise a= H([1,-2][6,3]) = H(0) = 1 but the target output is 0 ... so we have to update the weight: w -> w - p = [5 , -5] . Next : a= ...
Reading the Wikipedia article for common terminology for tree (data structure) there are several near references, but I don't read a formal declaration for how to refer to a specific generation of a tree's subtrees. For example, Definition As a data type, a tree has a value and children, and the children are themselve...
Let me preface this question by giving some helpful background material. I'm trying to solve the traveling salesman problem using branch and bound. Concretely, for a partial solution, I'm using the solution the algorithm would attain by making greedy choices as an upper bound, and comparing this bound to the current b...
Java seems to be categorized as a statically-typed language [1], but I'm wondering if it would be accurate to describe it as generally statically-typed but having some dynamic typing because of the run-time type checks performed when downcasts are performed.
For simplicity, we can assume that only NAND gates are allowed. An asymptotically correct solution is all I really need. Thanks!
I got a problem related to graph theory - Consider an undirected graph ܩ where self-loops are not allowed. The vertex set of G is {(i,j):1<=i,j <=12}. There is an edge between (a, b) and (c, d) if |a-c|<=1 and |b-d|<=1 The number of edges in this graph is Answer is given as 506 but I am calculating it as 600, please ...
I'm working with compression algorithms that use context-free grammars (e.g. RE-PAIR and SEQUITUR). These grammars look for frequently occurring digrams (pairs of adjacent symbols) in an input string and use recursive substitution with non-terminal symbols to achieve compression. What I'm wondering is whether there ar...
I asked this on StackOverflow, but it was determined more appropriate to post here. So it goes like this.. For people concerned about users having slow connections and timeout issues, it is known that it can't be just always solved with minification, latency reduction etc.. I'll try to keep this question as short as po...
In an article I am currently reading the grammar S → SS | a | ε is being described as canonical infinitely ambiguous. The infinitely ambiguous part I have no problem recognizing, but does "canonical" mean? Does it mean "typical", "standard example" etc.?
I'm looking for a good definition of sparse graphs. Is a sparse graph effectively a big one, with millions/billions of nodes? An example from real world is the Facebook graph. Or can sparse graphs be in small networks as well?
I'm reading this Intel white paper on carry-less multiplication. It describes multiplication of polynomials in $\text{GF}(2^n)$. On a high level, this is performed in two steps: (1) multiplication of polynomials over $\text{GF}(2)$, and (2) reducing the result modulo an irreducible polynomial. We use the "standard" bit...
I have started to read about user-based and item-based collaborative filtering techniques. I understand how a rating of the target user for a particular item is predicted. How top-N recommendation list is created in user-based/item-based collaborative filtering??
Someone told me that the $\log$ function was introduced to make the calculation easier. If we have to calculate $xy$, we can calculate instead $\log x+\log y$ since $\log xy=\log x+\log y$. How this can make the calculation easier? Maybe from a mathematician point of view but what about a computer scientist's point of ...
I am coding a procedure that takes an integer $d$, and generates $d$ finite lists $X_1 \ldots, X_d$ of elements. I would then like for it to output a list of the elements in the product set $X_1 \times \cdots \times X_d$. I can't use nested for-loops because $d$ can vary so I wouldn't know how many to nest. I'm sure t...
Does anyone know any good introductions to Formal Language theory and Formal Grammar, that cover the mathematical basis of Syntax and things like context free grammars and pushdown automata. In particular, I'd like to be able to understand: -Parikh’s theorem -Pentus' proof that Lambek-calculus grammars define only cont...
Suppose I have a source node $S$, destination node $D$ and a set $A$ of intermediate nodes $P_1, P_2, \dots$ in an edge-weighted undirected graph. I want to find the vertex $P_i\in A$ that minimizes $\mathrm{dist}(S, P_i) + \mathrm{dist}(D, P_i)$? In addition, the overall path from $S$ to $D$ should contain only one n...
I know that if the set of free variables for a relational calculus query is equal to the set of range-restricted variables then the query is (roughly) safe. I also can identify free variables. However, I do not understand what range-restricted variables are at all, and I can't find any comprehensible explanations anywh...
I've been reading up on boosting algorithms. I understand that the main crux of the algorithm is to build weak classifiers that are slightly better than random guessing, and then to add them up so that we end up with a strong classifier. This is done via "boosting rounds". With different papers using different variable...
I am familiar with describing Regular Expressions but when it comes to describing CFG I get confused. Do you describe it in words like you would regular expressions or do you do something like this ? this is the CFG I am trying to describe S -> SS S -> XXX X -> aX| Xa| b I was thinking something like this S-> SS -...
I've read this which describes how to do do integer arithmetic in circuits. The one thing that it does not describe is how to do these operations with a modulus. How can modular arithmetic be done in circuits? Can someone point me to a resource or describe the modular step here?
Could anyone help me with this algorithmic problem: Given the in and out degrees of a set of vertices, is it possible to determine if there exist a valid graph respecting this constraint? The graph can allow self loops but not parallel edges. Here's an example: Vertex A: in=1 out=1 Vertex B: int=2 out=2 For which we ...
Students will identify certain students they want to work with. I have therefore decided to split them into two groups where I want to minimize the number of people in Group 1 who want to work with students from Group 2. I was thinking about creating a source node s, and creating a node for each person ($p_i$) - follo...
I have always had a hard time making sense of infinities. Example: the language $L = \{ \epsilon , 01, 0011, 000111, 00001111, ... \}$ is not DFA acceptable because a machine capable of accepting it would require an infinite amount of states. I can draw a DFA with ellipses in the middle to represent it's expansi...
Say I have part of a query in the form: ∃xa(...)∧∃xb(...)∧∃xc(...), where a, b, and c are attributes and the ellipses can be anything (I'm looking for a general rule). Is this equivalent to saying ∃xa,xb,xc(...∧...∧...) - i.e. compacting all the existential quantifiers into one and 'anding' their domains together? For...
That's the problem $$y=(x,w,\rho) = \begin{cases} 1 & \sum_{i=1}^3 w_ix_i >\rho\\ 0 & \text{otherwise} \end{cases},$$ where $x=\{x_1,x_2,x_3\}$ are inputs, $w=\{w_1,w_2,w_3\}$ are weights and $\rho$ is the threshold value. The problem asks to find an opportune set of weights that can classify these inputs. $$A = \{(...
How do people measure performance overhead? Whenever someone is bragging about how their program or application performs better than another, they talk about particular measurements, eg time, performance etc. Whilst I understand how time to perform a task can be calculated, I cannot understand how performance is measu...
There are lots of questions about how to analyze the running time of algorithms (see, e.g., runtime-analysis and algorithm-analysis). Many are similar, for instance those asking for a cost analysis of nested loops or divide & conquer algorithms, but most answers seem to be tailor-made. On the other hand, the answers t...
I was reading up on Dynamic Programming when I came across the following quote A dynamic programming algorithm will examine all possible ways to solve the problem and will pick the best solution. Therefore, we can roughly think of dynamic programming as an intelligent, brute-force method that enables us to go th...
I met a recurrence equation for my algorithm $$ f(n) = 2\cdot \left( f(n-1) + f(\frac{n}{2}) \right)$$ with $f(1)=1$, $f(2)=4$, $f(3)=10$. I guess it is $\Theta((2+\epsilon)^n)$, where $\epsilon$ ban be arbitrarily close to 0. I want to have an asymptotic formula of $f(n)$. I do not know how to prove or disprove my ...
I saw the answer in one of the solutions and I cannot figure out how they got the answer. The question is asked if the word is in the language or not for CNF... How did they get the answer so that ab is in the language and aaaa is not in the language here ? S -> aSb |ab ab Yes aaaa No aabb Yes edit: is aaaa N...
I don't know the proper mathematical expression for for-loops, especially those that carry two distinctly behaving variables with each iteration. For example, assuming n is previously defined and holds some positive integer, how I would I represent the set printed by this for-loop in mathematical notation? // prints a ...
I am trying to use the pumping lemma to show this language is not context free: $L = a^nb^{n+1}c^{2n} : n \ge 0$ So I took $z = a^mb^{m+1}c^{2m}$ where $|z| = 4m+1 > m$. We can decompose $z = a^mb^{m+1}c^{2m}$ to $z = uvwxy$ for $|vwx| \le m$ and $|vx| \ge 1$. I am confused about what cases to consider to show this is ...
Dijkstra's algorithm is often quoted as being used to find the shortest path route however I was surprised to know that there exist A* search which is a extension of Dijkstra's algorithm. How is it that A* search algorithm is able to perform better compared to Dijkstra's algorithm , what sort of technique does it used...
In an assignment I've been asked to find a CFG for $a^x b^y a^z b^w$, where, $x,y,z,w \in \mathbb{N}^+$, $y > x$, $z > w$, and $x+z = y+w$. A hint was given, think of the language as $(a^p b^p)(b^q a^q)(a^r b^r)$. I've had a go at it, and have come up with S -> A A -> aAbB | ab B -> bBaC | ba C -> aCb | ab This ...
Is there any specific name for strings of data that have well defined format ? For example URLS, domain names, IP Addresses, Email addresses, File Paths etc. are all having well defined delimiters and data formats. What are these special strings in general called ?
The link in wikipedia about kd-trees store points in the inner nodes. I have to perform NN queries and I think (newbie here), I am understanding the concept. However, I was said to study Kd-trees from Computational Geometry Algorithms and Applications (De Berg, Cheong, Van Kreveld and Overmars), section 5.2, page 99. T...
I am working on an algorithm that requires me to interpolate a couple trillion positive discrete points with f(x) having low finite value (for example 0 - 5). It there a specialized algorithm specific for this reduced problem that can provide 0 error interpolation? Could you maybe point me to a few papers? EDIT: I noti...
So in complexity theory, I've run across different definitions for NP problems -- Decision problems where a solution can be verified by a DFA in polynomial time Decision problems where a solution can be found by an NFA in polynomial time Is there one of the above that is generally more accepted as the "go-to" defini...
I read that in a 2D space, the two points farthest away must be in the convex hull (CH). Intuitively, I can see why. If the two farthest points are not in the convex hull, then there must be a point that is outside the convex hull (contradiction). I know that a vertex of CH has two adjacent edges that converge at that ...
Has the following problem been studied before? If yes, what approaches/algorithms were developed to solve it? Problem ("Maximum Stacking Height Problem") Given $n$ polygons, find their stable, non-overlapping arrangement that maximizes their stacking height on a fixed floor under the influence of gravity. Exampl...
I'm trying to understand/show that DNF VALID is coNP-hard. I have given an algorithm for the complement of DNF VALID and shown that this is in NP (since the complement of a language in NP is in coNP), but I'm really struggling to show that DNF VALID is coNP-hard. The complement of DNF VALID = {ϕ | ϕ is not in DNF OR ...
My research is in the area of Document Image Analysis. To be specific, the topic of my thesis is to automatically recognize and index characters in a set of hand-drawn objects, e.g. given a volume of comics --> how to localize, recognize then index the characters in it (e.g. return "Lucky Luke" position in some random ...
I'm working on making patterns for a digital lava lamp (essentially, making interesting patterns using a 4x10 grid), and I've been looking into cellular automata. I tried implementing some variations on Langton's Ant but it tends to loop in very boring ways. Does anyone have any suggestions for interesting automata on ...
I am curious as to what steps one would reasonably need to take to perform an extraction-based text summarizer. I've taken a look at some papers I've found on Google such as this one, which explains that UPGMA is the best clustering algorithm (out of the tested set). I've also found this one to be interesting, regardin...
The original problem of Domino Tiling and Wang Tile has great theoretical interest on computability theory... However, the great emerging problem on application of Wang Tile in material science and physics requires the tiling to satisfy one more condition: The tiling should satisfy some proportionality, say, Tile 1 sho...
Real world background: There are 2 independent sources of polygon definitions, with arbitrary parameters. Meaning each source has it's own floating point precision, starting point and orientation of vertices. The problem is to find an algorithm, that would receive those 2 polygon definitions and by a certain margin dec...
Giving the following Grammar: S → ^ | SaSMSM | SMSaSM | SMSMSa M → b | c ^ means eopsilon. How can i check whether its ambgious or not? My intuition is that its not: every time you derive,the a is placed in different places between the M's. Can you give me a clue to get a better prove? Or give an example for its ...
A (now closed) question on SO made me think about the following problem: Given an arbirtary number of points (2D), draw a path that consists of straight lines between points, visits each point exactly once and does not intersect with itself. I came to the conclusion that this is easy if I can chose starting and e...
This is about basic machine learning which I do not understand clearly. I have 2 Gaussian models $G_1$ and $G_2$ and given a list of data as below. (1, 3, 4, 5, 7, 8, 9, 13, 14, 15, 16, 18, 23) I do not know which numbers were generated by which $G_i$ model, but I want to do Expectation Maximization for clustering. So,...
What is the time complexity of Halley's Method? I am thinking ${\cal O}(\log(n)F(n))$, or something very similar to Newton-Raphson, but I feel as though there should be some change to the complexity in order to yield the greater convergence. However, I can't seem to find any solid ground to support any of my ideas (as...
Is there any way to determine inner angle of twisted polygon? (Here's a picture of "normal" and "twisted" polygon http://courses.be.washington.edu/ARCH/481/1.Tapestry%20Reader/1.Data/6.Problems/graphics.invis/fulltwist.gif ) I know how to determine inner angle of polygon if I know its orientation (CW or CCW), however t...
Say we have a set of numbers $A=\{a_1, a_2, \dots, a_n\}$, and we wish to sum over all possible combinations of $k$ terms to compute $$ \sum_{\substack{C \subseteq \{1,2,\dots,n\} \\ |C|=k}} \prod_{c \in C} a_c $$ Naively this requires $O(k\binom{n}{k})$ operations. This is different from from computing the permanent w...
I have a problem which essentially reduces to this: You have a black-box function that accepts inputs of length $n$. You can measure the amount of time the function takes to return the answer, but you can't see exactly how it was calculated. You have to determine whether the time-complexity of this function is polynom...
To understand the effectiveness and/or efficiency of a protocol implemented in distributed storage systems, it is often desirable to evaluate it in a quantitative way under a hypothetical model. Obviously, every model is an approximation to the reality and there is not an all-purpose one. I expect to do a mini survey ...
In my first lecture of "Theory of Automata", after giving some concepts of Alphabet, Language, transition function etc. and a couple of simple automata of an electric circuit with one and two switches, is this question. I understand what an Alphabet as well as the Language of a DFA is, but are there any rules or steps...
Which of the following interrupts has the highest priority in 8086 micro-processor: Overflow, NMI or Type 255? The book I read suggests that type 255 has highest priority. But most of the searches on google showed that it is NMI. Which is true?
Trying to understand the concept of NP-completeness, I came across this pearl on Wikipedia: From NP-complete: A decision problem L is NP-complete if it is in the set of NP problems and also in the set of NP-hard problems. From NP-hard: A problem H is NP-hard if and only if there is an NP-complete problem L that is...
Using gradient descent in d dimensions to find a local minimum requires computing gradients, which is computationally much faster than Newton's method, because Newton's method requires computing both gradients and Hessians. However, gradient descent generally requires many more iterations than Newton's method to conver...
I'm trying to find reduction from 3-SAT to Max-2-SAT, so far no luck. Let me first describe it. 3-SAT: Given a CNF formula $\varphi$, where every clause in $\varphi$ has exactly 3 literals in it, one should determine if there exist an assignment that satisfies it. Max-2-SAT: Given a CNF formula, where every clause in ...
Suppose I have an algorithm that has a performance of $O(n + 2)$. Here if n gets really large the 2 becomes insignificant. In this case it's perfectly clear the real performance is $O(n)$. However, say another algorithm has a performance of $O(n^2/2)$. Here if n gets really large then $n^2/2$ is exactly half of $n^2$, ...
I have the following algorithm void NQueen(int k,int n) { int i; for(i=1;i<=n;i++) { if(place(k,i)==1) { x[k]=i; if(k==n) { printf("Solution\n"); printboard(n); } else NQueen(k+1,n); } } } int place(...
All data recovery companies, regardless of skill, unanimously say that if the memory chip of a device has just a hair line crack, data recovery is impossible. Not unlikely, not expensive, but impossible. One company even stated that even the FBI can't retrieve the data. Is this true? Why is this? I find it hard to beli...
What is the fastest way to get one of the value from set of intervals which occurs most frequently? For example if I have interval (0, 3) and (2, 4) the most frequent value can be 2 or 3.
In my computation book by Sipser, he says that since every language that can be decided in time $o(n \log n)$ is regular, then that can be used to show $TIME(n \log (\log n))\setminus TIME(n)$ must be the empty set. Can anyone show me why this is? both $TIME(n\log(\log n))$ and $TIME(n)$ are regular. I think that only ...
I'm taking a class on graph theory that uses "Graph Theory (Graduate Texts in Mathematics)" by Bondy and Murty. One of the questions is about Cayley graphs and the n-cube, and I don't understand how to interpret it. It runs as follows: Let $\Gamma$ be a group and $S$ be a subset of $\Gamma$ not including the identit...
In mathematics , an $n$-ary relation is subset of cross product on $n$ sets took under consideration. Let us take $A_1,A_2,A_3 \cdots A_n$ be the n sets. Then relation $R \subseteq A_1\times A_2\times A_3 \times A_n$ . Here $X$ represents cross product betwen two sets. If we consider first $k$ sets as input domain and ...
I always thought that TSP currently requires time exponential in the number of cities to solve. How, then, has Concorde optimally solved a TSP instance with 85,900 cities?!? Is this a typo? Is the base of the exponential 1.0000000000000001 or similar? Was it an instance specifically constructed to be solvable easil...
According to Introduction to algorithms by Cormen et al, $$T(n)=2T(n/2)+n\log n$$ is not case 3 of Master Theorem. Can someone explain me why? And which case of master theorem is it?
mexp ::= (< mexp >) | < mexp >< mathlowop >< mexp > | < mulexp > | < float > | < var > mulexp ::= < mexp >< mathhighop >< mexp > mathlowop ::= + | - mathhighop ::= / | * That's the BNF I've come up with for parsing simple mathematical expressions where the operands can only be floats or variables. I've looked at a numb...
How to think about dynamic algorithms which allows negative integers in input (where it's problematic, because obviously it's not always the case)? Examples: Partition Problem with negative numbers in set allowed Knapsack problem with negative weights are allowed Is there some general idea to handle these or other si...
I understand this is a slightly vague question, but there are results for P vs. NP, such as the question cannot be easily resolved using oracles. Are there any results like this which have been shown for P vs. NP but have not been shown for P vs PSPACE, so that there is hope that certain proof techniques might resolve ...
I have the following simple algorithm to find duplicate characters in a string: for i = 1 -> n for j = i + 1 -> n if A[i] == A[j] return true return false Why is the running time of this algorithm $\mathcal{O}(n^2)$? If the first iteration is $n$ steps then, $n-1, n-2,n-3,..,1$ it seems to me that adding...
Say that $f(n) = \cal O(n^2)$ and $g(n) = \cal O(n)$. If $h(n)=f(n)/g(n)$, is it true that $h(n) =\cal O(n)$? Is it mathematically correct to say that $h(n) = \cal O(n^2)/ O(n) = O(n)$? if not, what would be the correct way to show this?
I have a question about the common course "Computer Architecture". How is it possible to have a LOCAL Branch Predecitor with 1024 entries, 3 bits for HISTORY but without a TAG. As I understand,in that way i will get a Global branch predictor because i dont have a way to map a branch to an entry. Am I right? If not,How ...
Subset sum is given by this question: "The problem is this: given a set (or multiset) of integers, is there a non-empty subset whose sum is zero?" My question is: If the numbers in the set are functions of other numbers, is that still subset sum? For example The set {1,2,3} where the first number is X, the second is X+...
What is the difference between maximal flow and maximum flow. I am reading these terms while working on Ford Fulkerson algorithms and they are quite confusing. I tried on internet, but couldn't get a reasonable answer. I believe maximum flow is quite clear as it means maximum amount of flow that can be transferred from...
In proving Parikh's Theorem, my Theory of Computer Science textbook defines a linear set as: $u_0 + \langle u_1, \dots, u_m \rangle = \{u_0 + a_1u_1 + \dots + a_mu_m \mid a_1, \dots, a_m \in \mathbb{N}\}$ where $u_i$ are vectors of natural numbers. and a semi-linear set as a union of finitely many linear sets. It goes ...
In Sipser's Introduction to the Theory of Computation, there is an exercise that asks to prove $T$ decides $A_{TM}$, which is the language $$A_{TM} = \{ \langle M,w \rangle | M \text{ is a TM and $w \in L(M)$}\}.$$ $T$ is a TM defined as follows. On input $\langle M,w \rangle$, Write the description of a TM $R$ that ...
I am confused regarding the statements provided by one of our faculty regarding "Is it compulsory that every infinite set is non regular though every finite set is a regular set". Providing this example: $$L= \{ 0^n 1^n | n>=0 \} $$ its formal as $\Sigma=\{0,1\}$ and thus we've a formal meaning as $\{...
Given weighted directed graph $G = (V,E,w)$, where $w : E \to \mathbb R^+$ source vertex $v \in V$ vertex subset $U \subset V$ how to find a shortest directed path from $v$ containing all vertices from $U$? Note that such path may contain vertices that are not in $U$. Does such problem have a name? How to find a sol...
I am currently reading Fuss, Futexes and Furwocks: Fast Userland Locking in Linux and came across this quote: In a fair locking scheme the lock is granted in the order it was requested. This can have negative impact on throughput due to the increased number of context switches. At the same time it can lead to th...
I'm just starting to get into the theory of computation, which studies what can be computed, how quickly, using how much memory and with which computational model. I have a pretty basic question, but am really hoping some of you guys can help me understand the concept behind it: Why is everything centered around the n...