instruction
stringlengths
35
29.1k
I have some difficulty trying to tell which equation to use when I'm given an explanation on how an algorithm operates. Especially divide and conquer. Normally I see these kind of equations: C(n) = aC(n/a) + b where a and b are constants Other times I don't see the a in front of C(n/a) as an answer. That really confus...
I have written an A* algorithm to find the shortest path through a directed cyclic graph. I am trying to modify it to find the longest path through the same graph. My attempt was to write it so that all I change is [1] the weights per edge (making them negative instead of positive) and [2] the heuristic function. I se...
I am writing somthing about Ppumping Lemma. I know that the language $L = \{ a^nb^n| n ≥ 0 \}$ is context-free. But I don't understand how this language satisfies the conditions of pumping lemma (for context-free languages) ? if we pick the string $s = a^pb^p, |s| > p , |vxy| < p \land |vy| > 0$. it seems it will be ou...
I'm trying to solve the following problem related to distribution- I have a list L of items (I1, I2,....In) sorted in order of importance, I1 being the most important. Each item has multiple tags assigned to it and the combination of these tags can be different on each item, so I1 may have tags T1 and T2, I2 can have t...
Suppose I have $n$ independent observations $x_1,\dots,x_n$ from some unknown distribution over a known alphabet $\Sigma$, and I want to estimate the entropy of the distribution. I can count the frequency $f_s$ of each symbol $s \in \Sigma$ among the observations; how should I use them to estimate the Shannon entropy ...
I'm learning about Support Vector Machines(SVM). I understood that their objective is to maximize the margin between the decision line and the closest point to it. For simplicity, let's assume we have a linear SVM and linearly separable data X. We would like to find the maximum distance D and vector W, such that $\dfra...
This is a question from the exam of our "Automata and Formal Languages" course. There is a question where asked to prove or disprove that any "relative complement" operation between two context sensitive languages will also produce a context sensitive language. From the context sensitive closure properties Wikipedia, ...
3-PARTITION is strongly NP-complete, i.e. it remains NP-complete even if the input is given in unary. I'm searching two or three examples of (possibly well-known) non-numeric problems that have been proved to be NP-complete using a reduction from 3-PARTITION (and the reduction obviously relies on the strongly np-comple...
Since buying computation power is much affordable than in the past, are the knowledge of algorithms and being efficient getting less important? It's clear that you would want to avoid an infinite loop, so, not everything goes. But if you have better hardware, could you have somehow worse software?
It seems to me that taken over the entire graph, the norm of the error vector must be monotonically decreasing, otherwise we couldn't guarantee that PageRank would ever converge. However, is the same true on a per-vertex basis? I.e., from iteration t to iteration t+1, is the squared error of a vertex guaranteed to alwa...
My aim is to prove a VC-dimension $d$ for different problems. All the problems I have do not have a target function (or concept) explicitly stated. This unlike most of the examples I came through. For example in the interval problem, the target function $h^*$ is: if point $x\in [a,b]$ then $x=+$ and $-$ otherwise. I do...
For my homework assignment, I have to come up with a non-cfl that is pumpable. I came up with the following: $$ C = \{a^n b^n c^n d^m \mid n \ge 1 \text{ and } m \ge 1 \} $$ I'm not sure whether this works. For the pumping lemma, let $p$ being the pumping length. If I generate a string with $p$ $a$'s, $b$'s, and $c$'s...
From Tanebaum's Structed Computer Organization. Exercise 4 of Appendix B The following binary floating-point number consist of a sign bit, an excess $64$, radix $2$ exponent, and a $16$-bit fraction. Normalize $0$ $1000000$ $0001010100000001$ ($\star$). As far as I've studied, the number ($\star$) is already normal...
Is it possible to design a compiler that can safely compile and run untrusted code? As a practical example, I want to know how the online compilers are designed/programmed?(Like the one on codepad.org) Are they similar to our traditional day-to-day compiler. How they are hosted on servers?
I'm currently studying Decision Trees and the definition of a decision tree in our course is somewhat obscure for me. Nowhere in other online definitions of decision trees do I find something about relevant subtrees and relevant leafs... The course is based on the book Machine Learning from Tom Mitchell, so I'll have a...
I often see people assert that reference counting techniques such as shared_ptr in C++ provide prompt collection (e.g. here and here) but I am not sure what exactly is meant by this. Some people tell me that they mean "collects at the earliest possible point" but I think that is not true of scope-based reference counti...
I really need help with this task here. Im stuck at it and I really would appreciate your help Here is the task: Give a recursive function $r$ on $A$ that reverses a string. For instance, $r(logikk) = kkigol$ and $r(moro) = orom$. (given that $A$ the amount of letters in the Norwegian alphabet which has 29 letters.). ...
This is a question concerning Kripke automaton. My answers seem a little short and I was wondering if I was missing something? Transition table of a Kripke automaton: A -> red light is on B and D -> blue light is on C -> both light are on 1) Is the test 001blue satisfied by any state? Attempt: No 2) Is the test 001r...
Given a tree $T$ with $n$ vertices, we want to find the number of triplets of vertices $(a,b,c)$ such $d(a,b) = d(b,c) = d(c,a)$ where $d$ is the distance function (length of the shortest path between two nodes). It's pretty easy to do it in $O(n^3)$ time. Is it possible to do it faster? I think that on-line algorithm ...
In class, it was alluded to that a language: \begin{equation*} \{s_0 w s_1 : s_0s_1\in L_1, w\in L_2 \} \end{equation*} would be context free, if $L_1$ and $L_2$ are context free. Intuitively, that doesn't make sense to me. I tried doing my own research and attempted a proof using the pumping lemma, but didn't get anyw...
Drawing from Are algorithms (and efficiency in general) getting less important?, I get that algorithms are more important than ever, but I need to know anything about them other than their complexities? I would expect to use algorithms out of a library of some sort that has been written by people that are much much mor...
I was asked to "Compute the average runtime for a binary search, ordered array, and the key is in the array." I'm not quite sure how to approach this problem. Isn't the runtime of binary search O(log n)? And the average would be something like n + n/2 + n/4... etc? I'm then asked to "Implement a program performing an e...
Is it possible, given a declarative description of an architecture's register layout and instruction semantics and machine code encodings, to autogenerate a compiler back-end? If so, has anyone ever done this?
I have done an assignment question which asks me to find the average case of pentary search. The one I came up with is: C(n) = C(n/5) + 14/5 However, I got it wrong and the professor didn't really explain why. Can you help me? Thanks! Edit: Pentary search is dividing the array into 5 parts and look for a specific key....
When using A* (or any other best path finding algorithm), we say that the heuristic used should be admissible, that is, it should never overestimate the actual solution path's length (or moves). How does an admissible heuristic ensure an optimal solution? I am preferably looking for an intuitive explanation. If you wa...
In real word problems, the influence of multiple not perfectly known factors results in using heuristics instead of mathemacial solutions that calculates a perfect value from only precisly defined input data. Consequently, any method that does not supply the mathematical maximum or minimum is not an optimisation but an...
We define a regular tree language as in the book TATA: It is the set of trees accepted by a non-deterministic finite tree automaton (Chapter 1) or, equivalently, the set of trees generated by a regular tree grammar (Chapter 2). Both formalisms hold close resemblances to the well-known string analogues. Is there a regu...
I am preparing for my exam in Formal languages and Automata theory and I'm looking at some old exam questions right now. I need help with the following question: For each of the following languages answer whether it is regular, context-free but not regular, or not context-free. A brief, informal explanation is suffic...
I'm familiar with a dozen of programming languages which have exceptions in some way, yet I came to witness two "pathological" tendencies. There doesn't seem to be a common pattern or hierarchy of exceptions. Every language basically rolls its own version, and if the exceptions make it into the standard, then the kind...
How can I prove, or where can I find proof that for every regular language there is unambigous grammar?
I was given the following homework question: Implement an extendable table using arrays that can increase in size as elements are added. Perform an experimental analysis of each of the running times for performing a sequence of n add methods, assuming the array size is increased from N to the following possible ...
So, as is known, ILP's 0-1 decision problem is NP-complete. Showing it's in NP is easy, and the original reduction was from SAT; since then, many other NP-Complete problems have been shown to have ILP formulations (which function as reductions from those problems to ILP), because ILP is very usefully general. Reduction...
I am pursuing a BS in Computer Science, but I am at an early point of it, and I am pretty sure I will be happy with my choice given that it seems like an academically and career flexible education to pursue. Having said that, there seems to be a variety of definitions about what Computer Science really is in respects t...
Everybody says that Valuation is a truth value assignment to all variables in the formula. How do you call the valuation when some (neither single yet nor all) variables are assigned a value? Truth value implies that variables are binary. How do you call the multivalued case? I know that Haskel uses the term "partial...
At the time of writing, Wikipedia describes determinism as: "a deterministic algorithm is an algorithm which, given a particular input, will always produce the same output, with the underlying machine always passing through the same sequence of states" That aligns with my interpretation of determinism as a natural scie...
I'm referring to regular expressions as language: \begin{equation*} \Sigma = \{ ``a", ``b", ``(", ``)", ``*", ... \} \end{equation*} and \begin{equation*} L = \Sigma^* \text{, which form a legal regular expression} \end{equation*} I am not referring to their computational power. I did some research, but wasn't able t...
I've been struggling with this problem for days now, making no progress: There are N points on an XY plane. In one turn, you can select a set of collinear points on the plane and remove them. Your goal is to remove all the points in the least number of turns. Given the coordinates of the points, calculate two things: ...
I'm not very comfortable with pumping lemma for context-free grammar. I understand the sufficient conditions that must hold but proving it gets me everytime. For example, I need to prove whether $L = \{0^{n^3} \mid n\in\mathbb{N}\}$ is context-free or not. Based on my intuition, it won't be. There is no pattern of $0...
$$ L = \{a^ib^jc^k \mid i,j,k > 0 \text{ and } i+k>j\} $$ I say it's not regular. Proof by pumping lemma: Find a string $xy^iz$ that is not in $L$ (respecting the constraints). Let $w=x^py^pz^p$. Let $i=2$. $x^p(y^py^p)z^p$ is not in $L$. Thus $L$ is not regular. Is this proof correct?
The Whirlpool hash function generates a 128-digit hexadecimal number. Could that number ever be 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 or FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF...
A family $H$ of hash functions $h: U \rightarrow \{0,\ldots,M-1\}$ is universal if $$\forall x,y \in U, x \neq y \Rightarrow \Pr_{h \in H}[h(x) = h(y)] \leq \frac{1}{M}$$ You can find more about universal hashing this wikipedia article. The concept of universal hashing is now a standard part of undergraduate data stru...
I'm confused about a solution I saw about the following language not being regular:\begin{equation*} L=\{0^n ~1 ~2^n : n >0\} \end{equation*} The example solution said that $L$ was "the same as":\begin{equation*} L'=\{0^n1^n : n > 0 \} \end{equation*} so it wasn't regular. I understand why $L'$ isn't regular, but I ...
In my Computer Systems (first year) module as part of my EE degree I'm studying virtual machines, memory management, hardware abstraction etc. I have come across the information that the OS creates and uses a few virtual machines to provide hardware and I/O abstraction. I assume that there are multiple VMs doing differ...
There are $n$ pairs of socks, all different. They all went out of the dryer, so there are now $2n$ socks scattered around. Given two socks, the only operation I can do is to decide whether they are identical (- belong to the same pair) or different (- belong to different pairs). What is the best way to sort the socks i...
I want to flatten a binary tree into a linear array, and I wonder if there are specific algorithms to improve locality in the linearized representation (for instance, ensuring that all data from the left child of the root node appears before the data from the right child is an easy optimization.) What is the recommende...
Consider the non-deterministic finite automaton A: (in below figure) 1> convert this NFA to DFA 2> Find if there are equivalent states of your DFA 3> Minimize the DFA of <2> if possible This is what i have got so far 4> further question: Prove that the DFA in <3> recogniese the intended language L. I got stuck on th...
I've got this problem: Write down a definition of P-completeness analogous to the definition of NP-completeness, i.e., using polynomial-time reductions. Which problems are P-complete in this sense, and why? Thus, what is the problem, i.e., what must be changed if the goal is to come up with a more interesting not...
A badly explained textbook example asks the following: Suppose we have a definition of the dictionary our database will use (that is, it's relations and constants), defined as: $<R_\le (?, ?), R_+(?,?,?), R_*(?, ?, ?), c_0, c_1>$ where $R_{operation}$ defines the nature of the relationship of the values inside (represe...
This is an exercise in the book Introduction to Algorithm, 3rd Edition. The original question is: Show how to implement GREEDY-SET-COVER in such a way that it runs in time $O(\sum_{S\in\mathcal{F}}|S|)$. The GREEDY-SET-COVER in the text book is as follows: Definition for $(X,\mathcal{F})$ is given as:
In the text book, Introduction to Algorithm, 3rd Edition. In the chapter, Approximation Algorithms and for the problem Travelling Salesman Problem, the author says: I am wondering how triangle inequality gives rise to this assertion? It seems that this property is not that important, as I searched through the rest of...
In the chapter, Approximation Algorithms of Introduction to Algorithm, 3rd Edition, for the approximation problem Travelling Salesman Problem, the author proposes a approximation method that first constructs a minimum spanning tree. In order to prove this algorithm is a 2-approximation algorithm, the author claims tha...
While studying for a test in my OOP course, I came upon this question which had an answer I didn't really understand. The question is as follows (translated): The programming language "Sava" is similar to Java in every way except in the following: It's structurally typed When overriding a method the argument can be c...
I use Mathematica to solve problems. I have a question about matrix inverse. if I want only one element of the inverse matrix, does there exist a faster algorithm than using Inverse to calculate the whole inverse matrix and extract the element which I want?
Both wikipedia and my lecturer explained how the 2 satisfiability problem work. However, I am finding it really hard understanding how this formula: xvy≡ ¬x-->y ≡ ¬y -->x Then breaks down the following conjectures : (¬x v y) & (¬y v z) & (¬z v w) & (¬w v ¬x) & (x v ¬y) & (y v ¬z) & (z v ¬w) & (w v x) is converted to...
I was wondering how to remove duplicate values from a linked list in $\mathcal{O}(n\lg n)$ time. I have an idea that by using merge sort when we want to compare elements for choosing the small one, if they are equal advance on pointer and just consider one element. Any alternatives?
Background A proof-of-work system allows one peer to prove to another peer that a certain amount of computational effort was performed. In a network setting this can be used to throttle peer requests without needing to keep a precise track on the identity of the peers or prior events. The most well known use of proof-...
What are the reasons for decreasing the number of threads in a parallel implementation ? Assume that we have two implementations, the first one with 4 threads, and a second one with 8 threads, and both have exactly the same run time. What are the various reasons to prefer the first one? I stress on the fact that the t...
I have an option to learn a new language for parallel computing. As a parallel programmer what are the reasons one might want to invest time to learn functional programming for parallel computing?
There is one point I don't understand in the DFA construction for mismatch cases. Here is the lecture note I watched, which describes how to handle mismatched characters during the DFA construction process. Some information about the presentation screen shot: pat is the pattern, string index starts at 0, dfa is the st...
What is the meaning of the double, down facing arrow $\Downarrow$ in the context of operational semantics? Here's the example formula that uses it: $$\frac{s_0 \vdash M_1 \Downarrow P_1, s_1 \; ... \; s_{n-1} \vdash M_n \Downarrow P_n, s_n}{s_0 \vdash M \Downarrow P, s_n}$$ It would be also beyond priceless if you coul...
I was given a quick lesson on Turing Machines which I found interesting. However, I came up with a problem which made me think a bit on a problem and since it's not an actual class, the answer was not given. First, let me give you some background info on a Turing Machine: A Turing machine is a quadruple (K, sigma, smal...
I want to know why error control is used in transport layer although it is used in data link layer?While data link layer has all data came from upper layers in its frames so its error control should be sufficient.
Let $O(n)$ be "Big-O" of $n$ and $o(n)$ be "Small-O" of $n$. It is a well-known fact that $O(n \log{n}) \subset O(n^{1 + \epsilon})$ for any $\epsilon > 0$. Can we omit the $\epsilon$, and just type $O(n \log{n}) \subset O(n^{1 + o(1)})$?
I've been learning about neural networks and SVMs. The tutorials I've read have emphasized how important kernelization is, for SVMs. Without a kernel function, SVMs are just a linear classifier. With kernelization, SVMs can also incorporate non-linear features, which makes them a more powerful classifier. It looks t...
Problem Statement: Suppose we have a thousands of words and we need to maintain these words in a data structure in such a way that we should be able to find all anagrams for a given string. I tried to achieve this with O(1) complexity. I am looking for a algorithm to implement above scenario. I implemented this problem...
I wanted to know the pros and cons of Chomsky normal form and Greibach normal form.
For labelled trees there are the Pruefer numbers that uniquely identify them. Is there a similar numbering system for unlabelled trees?
How to minimize the sum of difference of element in sub-sequence of array of length k from given sequence of length n ? for example : for n=10 1 2 3 4 10 20 30 40 100 200 the sub-sequence of length will with minimized sum of difference will be 1 2 3 4 as |1-2| + |1-3| + |1-4| + |2-3| + |2-4| + |3-4| = 10 i.e minimum i...
I want to know which algorithm is fastest for multiplication of two n-digit numbers? Space complexity can be relaxed here!
I'm writing a paper on the topic of applications affected more by memory performance than processor performance. I've got a lot written regarding the gap between the two, however I can't seem to find anything about the applications that might benefit more from memory performance. I suppose these are applications that m...
While Learning about removing null moves from NFA , I came across a thought.... To Remove Epsilon moves we follow following steps : Find Closure of all states which have null moves Mark these states which have null moves Make a revised transition table without epsilon column and Find all possible transition for those ...
Given a procedure/function $Select(S,r)$ - which selects element of rank r from set S which uses at most $|S|. constant$ comparisons We design another function $Multiselect(S,R)$ with $R =\{r_1<r_2<...<r_k\}$ returns $X =\{x_1<x_2<...<x_k\}$ such that rank of $x_i$ is $r_i$ What is the minimum no of comparisons for t...
http://courses.csail.mit.edu/6.046/spring04/handouts/prac-quiz2-sol.pdf I'm confused as to the solution for the snowball question. To start with, I have two specific questions: (1) Each pair $a_i,b_j$ will account for one term (and why ONE term)? What is meant by term here? The coefficient, $c_k$ of the polynomial C? O...
In my world there are nodes and lines, I want to see if there is any path between node A, and node B, that do not cross any line(including the lines of the path itself) and do not go thru the same node twice. What would be the efficiency of such algorithm and where can I find more information about it. So far I been re...
I'm a computer science student. I want to create my own programming language (A basic language with few instructions). I know how to do a syntactic analyser, I already did it in Perl. In an article, I read something about the compiler, a compiler is done in itself. For example the C compiler is written in C. How it's p...
I have been reading a paper Finding Maximal Pairs with Bounded Gap: An in there, there is a sentence (page 6 second paragraph): The “smaller-half trick” is used in several methods for finding tandem repeats, e.g. [2, 5, 26]. It says that the sum over all nodes v in an arbitrary binary tree of size n of terms that ar...
I need to prove that $n^4+2n = \Omega (n^2)$ Which means I need to point two constants $c_1,c_2$ that from $n_0$: $$ c_1 \leq \frac{\log(n^4+2n)}{\log(n^2)} \leq c_2$$ Now I know that: $\lim_{n \to \infty } \frac{\log(n^4+2n)}{\log(n^2)} = 2$ so I can choose $c_1 = 0.5$ and $c_2 = 3$ but how do I do I calculate the $n_...
How do we prove $M$ that is a deterministic random access machine that decides a problem $A$ for an input $i$, and $u_M(i)$ is the set of addresses of those registers that occur at least once with $s$ steps and a configuration of $C_0,\dots,C_s$ where each configuration is of the form $C_i=(k_i,R_i)$, were $k_i$ is the...
This is the problem, given a string with characters from: a-z, ., *, and another string with characters from a-z. where * can delete the character before it, otherwise * is skipped and . can match any single character. the question is whether the first string can match the second one. Note: That is the statement of the...
Let $PAL = \{ww^R\ | w\in\{0,1\}^*\}$. Then let $A = \{\langle M\rangle \ | \textit{M is a Turing Machine and } L(M)\subseteq PAL\}$ Is A semi-decidable (Turing recognizable or recursively enumerable)? My try! I said it is so here is my proof, tell me if I am way off base or tell me if A ought not to semi-decidable in...
Say you have two polynomials: $3 + x$ and $2x^2 + 2$. I'm trying to understand how FFT helps us multiply these two polynomials. However, I can't find any worked out examples. Can someone show me how FFT algorithm would multiply these two polynomials. (Note: there is nothing special about these polynomials, but I wanted...
What algorithm would you use to find the shortest path of a graph, which is embedded in an euclidean plane, such that the path should not contain any self-intersections (in the embedding)? For example, in the graph below, you want to go from $(0,0) \rightarrow (-3,2)$. Normally, an algorithm like Dijkstra's algorithm w...
I have this question I'm struggling with. Let $A=\{<i,n>|\;n \in \phi ^{(i)}\}$. In other words, $A$ is the language defined by the set of all pairs $<i,n>$ such that $n$ is $\leq_m$ to the $i$th Turing jump. A is definitely not an arithmetically definable language, and you can prove this by contradiction. I have to ...
Given a euclidean graph $G$ and a node $p$ with edges to all the other nodes, is there a more efficient solution than $O(NLog(N))$ to output all the edges to $p$ in sorted order?
Let $\Sigma$ be the alphabet $\{a, b, c, d\}$ and let $R$ be the following relation on $\Sigma^*$: $R(x, y)$ is true if every letter in string $x$ also occurs in $y$, and every letter in string $y$ also occurs in $x$. (For example, $R(abba, babbb)$ is true and $R(abcb, cbbcb)$ is false.) How many (non-empty) sets are...
Let $L$ be the language $\{w \mid w \text{ has equal numbers of \(a\)'s, \(b\)'s and \(c\)'s}\}$. Prove that its complement $\overline{L}$ is context free.
How can I show that every context-free language over a unary alphabet is regular?
When reading the literature on declarative programming technology. A particular technology that sounded promising is active databases. It essentially allows the programmer to specify rules about data that generate more data. On face value it seems like a great thing to have when compared to your neighborhood average im...
There is a saying by Computer Science Professor's everywhere : PDA Checks the intelligence of Students, as certainly there is no approach except power and imagination of mind to solve problems and design PDA... While thinking today i thought How can we design automata of a^2n b^(2n-1) I tried my best : For example let...
I am trying to convert the following 2-sat clauses to implications and then draw the implication graph. The clauses are: {¬xvy}, {¬yvz}, {¬zvw} ,{¬wvu},{¬uv¬x},{xvw},{¬wvx} I converted the boolean literals into implications so I could construct the implication graph: {¬xvy}: I have x-->y and ¬x -->¬y {¬yvz} : I have y-...
I'm looking at the lecture review for one of my computer science classes and I'm having trouble coming up with an answer. Could someone help me work through it? Background: Let the balance factor of a node be defined by $\left| height(\text{right sub tree}) - height(\text{left sub tree}) \right|$. Questions: Give the...
I was recently asked to explain eye tracking to 4th grade students and talk to them about its applications. What is eye tracking? An eye tracker is a device that uses projection patterns and optical sensors to gather data about gaze direction or eye movements with very high accuracy. Most eye trackers are based on...
I am doing a presentation about Turing machines and I wanted to give some background on FSM's before introducing Turing Machines. Problem is, I really don't know what is VERY different from one another. Here's what I know it's different: FSM has sequential states depending on the corresponding condition met while Turi...
Computer Language/Logic Examples? These are some of the questions i am having within a few chapters of my automata class and would like some help if you could :) Class is online and can be hard to self teach at times, you dont have to answer all or any for that matter, just thought id ask i got a midterm coming up and ...
I'm considering an automaton $A$ over a alphabet $\Sigma$, with a set of states $Q$, such that $\Sigma \subset Q$, which includes special "accept" and "blank" states not in $\Sigma$. It also has an infinite list of cells, which begins with the input string, the rest being blank. It has a transition function $\delta: Q ...
I am looking for an easy and introductory paper on the proof of Courcelle's Theorem. I am also interested in its connection to parameterized complexity regarding the treewidth. I am only a beginner in this field. Any suggestions?
An undirected graph is a Near-Clique if adding one more edge would make it a clique. Formally, a graph $G=(V,E)$ contains a near-clique of size $k$ if there exists $S\subseteq V$ and $u,v\in S$ where $|S|=k$, $(u,v)\notin E$, and $S$ forms a clique in $(V,E\cup\{(u,v)\})$. How can I show a direct reduction from Near-Cl...
Given a string $(a_0,a_1,\ldots a_n)$. I want to find the length of the longest common prefix of the substrings $(a_0,a_1,\ldots a_{n-1})$ and $(a_1,a_2,\ldots a_n)$. I know this has atleast $O(n)$ complexity. Lets call this operation as prefix-suffix match. I want to calculate prefix-suffix match length for all suffix...
What is the efficiency of Concorde TSP solver program. And is it have any weaknesses? I build my own exact solver and I want to compare it to Concorde. What would be the best way to do this?
I'm enrolled to a Formal Language And Automata course, and we have to prove this equation on sets of strings: $$(L_1\cap L_2)\cdot L_3 ≠ (L_1\cdot L_3) \cap (L_2\cdot L_3)$$ I've tried a lot of sets for e.g. $L1 = \{a,b,c,d\}$, $L2 = \{a,f,g\}$, $L3 = \{s,d,h\}$. but always the LHS comes out equal to the RHS instead of...