instruction
stringlengths
35
29.1k
Ubiquitous computing refers to "information technology and computer power, which in principle pervade all everyday objects" (see Friedewald and Raabe, 2010). A similar form is wearable computing, where the computing device is placed on a persons cloth/body. This topic currently gets much attention: smart watches (e.g.,...
I want to implement the "vertex similarity" algorithm described in the paper Graph Isomorphism Detection Using Vertex Similarity Measure. The algorithm is as follows: S(0) <- appropriately sized matrix filled with 1's for k=1 to 10 do: S(k) = Y*S(k-1)*X^T + Y^T*S(k-1)*X k++ Apply Hungarian assignment algorithm ...
I don't understand why the Halting Problem is so often used to dismiss the possibility of determining whether a program halts. The Wikipedia article correctly explains that a deterministic machine with finite memory will either halt or repeat a previous state. You can use the algorithm which detects whether a linked li...
I was comparing and analyzing the sort algorithms thereby came across a machine which took 200 secs to sort 200 names but to generalize, in 800 secs wouldn't it sort 800 names?
Suppose you have a network which uses time division multiplexing (i.e. Slotted Aloha). There are $N$ nodes each transmitting in a given slot with probability $p$. I understand that the probability a node is successful in a slot is $p(1 - p)^{N-1}$. This is just a geometric distribution. But our book then says that the ...
After reading several articles about petri nets, I am confused on how firing works. Can Petri net system fire only one transition out of all active (fire-able transitions) at a single moment? Or are multiple transitions allowed to fire at a single moment?
Consider the following Graph We want to generate the MST using Prim's algorithm. Starting from node A, suppose we pick B as our next node, we see a self-loop that has less weight than the two other alternatives. Do we ever take the self loop? Why not? Suppose we just moved from C to D D only has one edge connecting...
I'm trying to perform an asymptotic analysis on a function: $T(n) = \sum_{i = 0}^{\log n} i 2^i$ The above expression came about when I began with: $T(n) = \sum_{i = 0}^{\log n} 2^i \log (2^i)$ Is there a tight, closed-form expression for $O(T(n))$?
Can we infer from the fact that the number of independent sets in product of $5$-cycle two times is $5$ and in product of $5$-cycle four times is $25$, that the capacity of pentagon is $\sqrt{5}$? That is does $\alpha(C_5 \boxtimes C_5)=5$ and $\alpha(C_5 \boxtimes C_5\boxtimes C_5 \boxtimes C_5)=25$ imply $\theta(C_5)...
Amortized accounting method has to be one of the most abstract analysis technique I have ever seen in my life (maybe aside from the potential method which I haven't read). In the example of the Stack with Multiple Pops (From CLRS, for reference: http://chuck.ferzle.com/Notes/Notes/AlgorithmAnalysis/Amortized.pdf), we a...
I was wondering, if physics has the origins of the universe or the nature of space, time, and matter, biology has the existence of the cell and the origin of life, are there mysteries that computer science could seek to unravel? This question does not concern the theories and technologies developed by computer science...
Consider the set cover problem: given a collection of sets ${\cal U}$ whose elements come from $\{1, \ldots, m\}$ find the smallest number of sets in ${\cal U}$ whose union is all of $\{1, \ldots, m\}$. My question is: what would be a certificate for this problem? That is, if I wanted to convince someone that it is not...
A directed rooted graph is defined as graph for which there exists a vertex r such that to every vertex x there is a unique path (Equivalently dfs tree with source r has only back edges and has all vertices). I need an algorithm to find the longest path in such a graph. I know that in general longest path problem is NP...
Given that I have the grammar $\qquad\displaystyle G_1 = (\{a, b, c, d\}, \{S, X, Y \}, S, \{S → XY, X → aXb, X → ab, Y → cYd, Y → cd\})$, how am I supposed to prove that $\qquad\displaystyle S(G1) ⊆ \{a^{n+1} b^{n+1} c^{m+1} d^{m+1} \mid n, m ≥ 0\}$ by using Induction?
I've read about a problem: There are $n$ houses that are placed randomly. Place a parking lot so that the (straight-line) distance to all houses is minimal. I've written a Monte-Carlo algorithm, but that can't be the optimal approach. Is there a solution other than approximating the position with Monte-Carlo method? ...
A furniture store is having a sale: purchase two items at the price of the more expensive one. John, having just moved to a new house, rushed into the store and chose $2k$ items of furniture, $f_1, f_2, \dots, f_{2k}$. The items are priced $p_1, p_2, \dots, p_{2k}$, respectively. Help John arrange the items in pairs so...
I want to know whats the complexity of the following variant of the partition problem: Partition problem: http://en.wikipedia.org/wiki/Partition_problem Suppose we have one set formed by integers and we want to partition the set in two subsets of the same size, the same cardinality(the same number of integers in each s...
As an example exercise, we were asked to find the loop invariant for this bit of code. def mystery(a,b): # Precondition: a >= 0 and b >= 0 while a >= 0 and b >= 0: if a < b: a, b = b, a else: a = a - 1 return a From what I can see, it first ensures that a >= b. Aft...
Is there an evidence or a proof that the independence of strong products of graphs can increase after stabilizing? I am interested in odd cycles only. Let $C_n$ be an odd cycle and $\alpha(G)$ represent independence number of a graph $G$. Let $C_n^m$ be $m$-times strong product of $C_n$. Now say $$\alpha(C_n^{m_1m_2})...
Show that the language L = {ww^Rw: w in {a,b}*} is not a context-free language.
It is the time of the year again in colleges for final exams and I am preparing mine as of now and I am finding myself in hot water when it comes to understanding the running times of appending items to arrays in C. Basically, I know there are different ways of appending items to an array, but please consider this meth...
I would like to know how was counted 1 second in computers. I mean how machine can understand period of 1 second. Who and when resolved this problem, and more important how ?
I'm a high school student. I'm really into programming and mathematics and planning to study CS and mathematics when finished with high school. I have a couple of questions concerning this issue: Firstly, from maths point of view, what are the prerequisites and what subjects do I get in the first 2 years? I understood ...
So I understand that finding a solution to the 3-coloring problem takes exponential time. However, say you had a friend who you could give a graph G to and he can say in constant time whether it is 3-colorable or not. Is it possible to find a 3-coloring of G in polynomial time with his help? I think it might be possi...
I'm in a data structures class, and am working on an assignment right now that asks me to find the theta complexity of certain loops. I missed class the day we were introduced to the topic, and everything I can find online expects more prior knowledge than I feel I have. Can someone just explain this in beginners terms...
Does the graph isomorphism problem for directed graphs($GI_{di}$) reduce to the graph isomorphism problem for directed graphs($GI_{un}$)? It is clear $$GI_{un}\leq GI_{di}$$ since the set of undirected graphs is subset of set of directed graphs. Does the converse hold true? That is, can an algorithm for undirected grap...
I already read this related question on the intuition behind binary indexed trees, and while the answer explains how the tree structure works, it does not really explain how this correlates back to the array representation where the next node is accessed based on the current nodes index according to $i \mathrel{\&} -i$...
I am given $n$ positive integers $x_1,x_2,\cdots,x_n$ as input. These are the weights of the leaves in a full binary tree, $x_1$ being the leftmost leaf and $x_n$ the rightmost leaf. The weight of an internal node $v$ is defined as the sum of weights of the leaves in the subtree rooted at $v$. The balance of an interna...
In a system, suppose there is a process and a resource with only one instance. Let us assume that the process holds the instance and requests the same instance of that resource. Will there be a deadlock? Under what circumstances?
The standard way of simulating an NFA on a computer (for implementing regex engines etc) is to construct a DFA that accepts the same language. Otherwise you get problems like exponential blowup. However, for my purpose I need to know which paths the NFA went through for accepted words. This is obviously not trivial if ...
I don't understand how to work backwards to work out a truth table that has been filled out already (I don't know the logical operators). E.g P | Q | Output 1 | 1 | 1 1 | 0 | 0 0 | 0 | 0 0 | 1 | 0 I need to find the logical operators and connectives (and, or, not, implies etc.) that is equivalent to the output. Pleas...
I'm reading a recent paper "Finding Correlations in Subquadratic Time, with Applications to Learning Parities and the Closest Pair Problem" by Gregory Valiant on finding approximate closest pairs in $R^d$. Valiant says the current upper bound for this problem is $O(n^2)$. On Wikipedia however it is said that the 2d div...
I was reading about binary search trees on it's Wikipedia article. I was a little confused by this image. Why is it that the right branch to the head node does not have a sub-tree? I understand why it can be valid like this but surely the "8" could branch to "13" instead, then "10" and "14" could become the descendants...
Suppose I have the following Functional Dependencies for a Relational Model: $A \to C$ $B \to C$ According to the composition rule for functional dependencies we have: If X → Y and Z → W, then XZ → YW For the case above would it be correct to say: $AB \to CC$ Leads to: $AB \to C$ Would the composite $CC$ be the ...
I have two arbitrary acyclic nondeterministic finite automata $\mathcal{A_1}$ and $\mathcal{A_2}$ and want to show that the problem $L(\mathcal{A_1}) \not \subseteq L(\mathcal{A_2})$ is in NP by specifying a polynomial proof system. We defined a polynomial proof system in the following way: For $L \subseteq \Sigma^*$ t...
Suppose we have an algorithm like: n = 0 REPEAT c = randomInt(0,1) n = n + 1 UNTIL (c == 0) RETURN n (Assumuing the random number generator produces "good" random numbers in the mathematical sense.) I understand that there is no number $n \in \mathbb{N}$ such that the algorithm is guaranteed to terminate after few...
I read FP = FNP iff P = NP which makes sense. But if P = NP, does it mean FNP = NP? Intuitively, I think no because P = NP would mean that decision problems in NP would become decision problems in P. But I don't see how that would reduce search problems to decision problems.
I'm trying to decide between two methods of calculating a median, that will optimize the following operations: Add integer to data structure (insert) Get the median of all integer (getMedian) The program will add a random number of integers (no limit on how many, but generally going to be relatively small amount) to ...
If all infinite r.e. languages have an infinite recursive subset, then can we logically take co-r.e. languages to not have such subsets by complemence?
One of the basic methods of hashing is called "Open addressing, or closed hashing" according to wikipadia (and several books). Why the names "open" and "closed", and why these seemingly contradictory names for the same method?
The following is an algorithm for generating "Taxicab numbers" using a priority queue (pq). Vector is an arbitrary data type that allows for storage of two number and their cubed sum. For those unaware (although you really don't need to know), a taxicab number is an integer that can be expressed as the sum of two cubes...
Suppose we have a Turing machine $M$ so that there is a constant $t$ such that the Turing machine always runs in time $t$ or less. Prove that the language of $M$ is regular. This seems to be a pretty well-known fact, but despite my research, I cannot seem to find a proof of this anywhere. Does someone know of one?
Is there a notion of coP problem? Also is there a notion of every problem being reducible to one problem in P (like 3SAT in NP completeness)?
Is there a problem like 3 SAT like problem in P where if we find an algorithm for this problem, we can solve all problems in P? For instance if we solve this problem in P, may be we can solve prime detection quickly instead of using AKS algorithm or linear programming quickly?
I would like to know if this statement is true: $f(n) + g(n) = O(g(n)\cdot f(n))$. I thought of giving a counter example by defining: $f(n) = 3n^2$ ; $g(n) = n$ which will give us that $O(3n^3) = n^3$ but i'm not sure if it's possible to say that $O(3n^3) = 3n^2 + n$ because I suspect that it might be right because of ...
In literature, one can find many approximation algorithms for the multicommodity min cost flow problem or other variants of the standard single-commodity min cost flow problem. But are there FPTASs for the min cost flow problem? Possibly, there is no need for an FPTAS here since an optimal solution can be computed very...
I would like to know if this statement is true: I thought of giving a counter example by defining: which will give us that but i'm nut sure if it's possible to say that beacuse I suspect that it might be right because of the definition of Big O. And if that's right that means that the counter example i gave is no...
I have a large number (millions) of IP ranges which might overlap. An IP range should contain the start IP, stop IP and an range id. How can I efficiently find which ranges contain a given IP? I could iterate over all the ranges and check for every range if it contains the IP, but I'm looking for a complexity better th...
I was told this question may be better suited here. A scheduling problem can be stated as: Given a set $\{(s_i,f_i)\}_{1\le i\le n}\}$ of tasks identified by their start and end times, choose the maximum size subset of non-overlapping tasks. Choosing tasks greedily by earliest finishing time gives an optimal s...
I am learning logic and functional programming and there is a topic called Type checking and their relationship to logic , I am unable to find any source that can help me in understanding this topic. Please help .
I am looking for data structures to answer nearest neighbor queries in 3D which are reasonably space efficient (ie use at most $O(n^{1+\epsilon})$ space) and fast ($O(n^{\epsilon})$ or $O(log^k(n))$ query time in the worst case). As a summary of what I already know: 1D is trivial (just sort the points and use binary s...
Hi I have this simple question. When adding a positive number with a negative number, both of same exponent. Imagine that after complementing the negative we have something like this: 1.111 + 0.001 ....... This makes a Carry out. What I want to know if I don't take care of the carry out(1) or should I(2). If (1) The a...
As the title says, code can't be a prefix-code and can't be a suffix-code, but it must be uniquely decodable. One possible code is this: {1, 101, 1001, ... }. Number of zeroes corresponds to the index of the letter in a given alphabet (starting from 0). Clearly it's not p-code and not a s-code and it's uniquely decodab...
My intuition is telling me that this is untrue. But I am having trouble formulating a proof for this. Can anyone point me in the right direction? I've seen a proof by contradiction involving the union of all singletons in an infinite language but I am needing a to look at this from a different angle. Related question:...
So I understand that a function is recursive if there exist a Turing Machine that accepts it and halts on every input, since function is defined everywhere. But how to prove that function is recursive if and only if the language {x#f(x) |x∈(Г -{#})*)} (graph) is recursively enumerable?
I'm going through Brewer's theorem and its proof by Nancy Lynch and Seth Gilbert. But the paper left me with one question. What prevents the theorem from being applicable to a single node? I haven’t encountered any explicit definition of network partition that restricts its applicability to a network. There are some hi...
Given a complete graph with $n$ nodes, I remove edges randomly with probability $p$ such that I want to disconnect the graph. I want to find out the minimum number of edges that I must remove randomly to disconnect the graph. Also the value of $p$ where I can disconnect the graph by removing the least number of edges....
I am trying to understand how binary indexed trees (fenwick trees) can be modified to handle both range queries and range updates. I found the following sources: http://kartikkukreja.wordpress.com/2013/12/02/range-updates-with-bit-fenwick-tree/ http://programmingcontests.quora.com/Tutorial-Range-Updates-in-Fenwick-Tree...
Vertex cover in bipartite graph is polynomial algorithm: by König's theorem the number of edges in a maximum matching is the number of vertices in a minimum vertex cover. I've implementated the Hopcroft Karp algorithm to find a maximum matching in the bipartite graph. I would like to get the minimum vertex cover from ...
Say we have 3 DFAs. We know how to OR, AND, or NOT them. But how does one XOR them? There is not one single mention of this online. $x\; \mathrm{XOR} \;y\; \mathrm{XOR} \;z = ((x|y)(\neg x|y)|z) (\neg ((x|y)(\neg x|y))|z)$. This is way too complicated and time consuming to draw. Isn't there another way? Thank you for t...
A useless state in a DFA is one that is never entered on any input string. Consider the problem of determining whether a DFA has any useless states. Formulate this problem as a language and show that it is decidable. I know how to prove it with Turing Machines, but not DFAs. So here is my proof for TM: Let $U_{\mathrm{...
According to Wikipedia, The test-and-set operation can solve the wait-free consensus problem for no more than two concurrent processes. Why can't it solve the problem for more than two processes?
I have a hard time to understand why the concatenation of two languages over an alphabet (concatenation is in NP), doesn't imply that each of the languages for themselves are in NP. I talked with my Prof about the problem today, but I can't wrap my head around it. Can you help me out?
I have numbers $a$, $b$ and $m$, and I need to get the result of $\ \dfrac{a}{b} \mod m$. The catch is that while $m \leq 10^9$, $a$ and $b$ can get extremely large ($2^{100,000}$), so I'm keeping them as a multiset of their prime factors. I read about modular multiplicative inverse but I haven't found a way to use it...
This question came up while a group of students at my school were studying for our qualifying exams. The question on an old exam was, Consider the following six classes of languages: Context free (CFL), Regular(REG), P, NP, Recursive(R), and Recursively enumerable(RE). (1) indicate the relationships between these six...
I really need help to solve the following: T(n)=T(n-a)+n where a is a constant greather or equal 1. So I started to iterate T(n)=T(n-a)+n =T(((n-a)+n)-a)+n =T(3n-3a)+n =T(((3n-3a)+n)-a)+n =T(4n-4a)+n this brings me to the Basic: T(kn-ka)+n. Is it right ? I am not sure how to solve such Terms with ...
Can a DPDA be created for a Language which includes the null string? The way I understand it, in a DPDA, you can have at most 1 move from any instantaneous description Delta(q,a,Z) where q is a state, a is some input, and Z is a stack-character. Also, if you have a transition Delta(q,lambda,Z), you can't accept any oth...
Say I want to make a very simple Turing Machine that accepts only strings that contain one or more a's. Can I simply send have the machine move a HALT state once it reads one a, even if there are many letters after that first a? Or would this be bad practice or unacceptable for a Turing Machine?
I'm tasked with demonstrating that the class of Turing-recognizable languages is closed under the operation of star, but I'm confused about how this is true. For example, I have a TM to recognize a language A = { a2n: n >= 0 }, all strings of a's which length is a power of 2. So here's where I get confused, if I have A...
You are given a directed graph G = (V, E) and nodes s, t. Nodes are colored red, white, and blue. A path from s to t is called colorful if it contains both a red node and a blue node. The task is to determine if a colorful path exists, and if so, find one that contains a minimum number of white nodes. Im not sure how t...
I have a subject Introduction to logic and functional programming but the course is not provided in detail. This is the provided course. Introduction to declarative programming paradigms. The functional style of programming, paradigms of development of functional programs, use of higher order functional and pattern...
I have seen a way how to convert a decimal number to BCD (packed & unpacked) using 8,4,2,1 weighing forms but how to do it using 4,2,2,1 and 7,4,2,1 ? Any method please.Suggestions
We know by polynomial-time parsing algorithms like the classical CYK algorithm that $\mathrm{CFL} \subseteq \mathrm{P}$. Furthermore, it is easy to show by direct simulation that $\mathrm{DCFL} \subseteq \mathrm{P}$ and $\mathrm{CFL} \subseteq \mathrm{NP}$, respectively. We simply use the TM tape as stack, readig and w...
Suppose I have an $n\times n$ matrix. I would like to keep an $m\times m$ subblock undiagonized, while keeping the rest diagonized. Is there any algorithm for this? More precisely, I mean using unitary matrix $U$ to realize $$ U^* \pmatrix{ A & B \\ C & D } U = \pmatrix{A' & 0 \\ 0 & D' } $$ where submatrix $A'$...
I need to equally distribute a variable number of spheres within a larger sphere (the volume of the spheres depends on how many there are). Are there any algorithms for doing this? An approximate solution would be acceptable. When searching, I was only able to find material about equally distributing points on the sur...
I was studying but realized that I am having trouble grasping the representations of relations using Zero One Matrices. For example if I have a set A = {1,2,3} and a relation R = {(1,1), (1,2), (2,3), (3,1)}. What is the resulting Zero One Matrix representation? How exactly do I come by the result for each positio...
I would like to know if it is possible that two functions $f(n), g(n)$ can exist such that both of the following conditions are met: $g(n) = o(1)$ $f(n-g(n)) \neq \Theta (f(n))$ I though I found $1/n$ and $1/n^2$ but I think I got it all wrong. Is it even possible?!
I'm currently learning about PDAs and their power when constructing them from Context-Free Grammars, however I'm still unsure of how to properly construct a CFG, and then a PDA from that CFG. In the book, Formal Languages, Automata, and Complexity, by J. Glenn Brookshear, there are a few exercises requiring I construct...
I have an image, like the one below that has different paths. I want to be able to detect the thin parts of these paths and highlight them. What is the best way to go about this?
For one problem I have to solve, I'm given a Language: L = {a^r b^s c^t d^u | r+s = t+u} And from it told to construct a PDA that accepts it. I can construct a PDA for L1 = {a^r b^s | r,s >= 0} And for L2 = {c^t d^u | t,u >= 0} As they are, essentially, the same language. However, I'm confused as to how I can make ...
I'm currently creating a program to analyse the pathological cases of Quicksort. Namely, the transition of complexity from $O(n^2)$ to $O(n \log n)$ as a data set gets less ordered. Since Quicksort is a value-based algorithm, the choice of pivot determines its efficiency. We usually (Quicksort 3, and choosing a random ...
That's probably a vague question but allow me to try and give an example: My compiler does transformations on HTML (from HTML to HTML). It scans a flattened DOM tree, and relies on lookbehinds (on elements pushed onto a stack) to decide what transformation to apply. I can give more detail if necessary but I don't want ...
Have there been studies measuring the average IQ of successful computer scientists/programmers? The US military uses the AFQT test to determine intelligence of potential recruits (100 million Americans aren't intelligent enough to be accepted, according to the source). But I know of no similar way to gauge the average ...
I know that this question is a bit out-of-the-box, yet i would be glad if someone could help with a good answers for my question because it is something that is troubling my curious mind. When we program we have no doubt that we need conditionals, like the if statement. I will use the "if" statement as a reference thro...
Using the following definition: Reduction: There is a polynomial-time reduction from problem $X$ to problem $Y$ if arbitrary instances of problem $X$ can be solved using: Polynomial number of standard computational steps, plus Polynomial number of calls to oracle that solves problem $Y$. Notation $X \leq_{P} Y$ S...
I don't know if I'm using the vocabulary correctly, but what I'm interested in is this: If your language has fixed-point combinators, is it Turing-complete?
I know that the brute force method is not the best way to solve the 0-1 knapsack problem. I'm not quite getting the dynamic programming idea, but would like to know the following: If the brute force method can solve the problem with 20 items in 1 second - how many items can it solve in one day (2^16 s)? I know that t...
Suppose we are given two ordered dictionaries S and T each with n items, and that S and T are implemented by means of array-based ordered sequences. Describe an O(log n) time algorithm for finding the kth smallest key in the union of keys from S and T. (assuming no duplicates) I am confused on what the question is as...
Suppose we have a primal problem $P$ which is stated as a maximization problem $\max c^{T} x$. The dual problem is defined (Introduction to Linear Optimization by Dimitris Bertsimas) only for a primal minimization problem. Then what is the dual problem of $P$ ? Is it implicit, that the dual problem of $P$ is the dual p...
e.g. $xy+x+y=x+y(x+1)$ ? The expressions are from ordinary high-school algebra, but restricted to arithmetic addition and multiplication (e.g. $2+2=4; 2.3=6$), with no inverses, subtraction or division. Letters are variables. If it helps, we can forbid any expression representable with numeric values other than $1$; i...
In Second chance Page replacement algorithm(clock algorithm), if all the Reference bits are set to one, then the algorithm behaves just as FIFO. Considering this case, can we conclude that Second chance algorithm also suffers from Belady's anomaly?
Prove that if a CFL $L$ is inherently ambiguous, then for any grammar $G$ with $L(G) = L$, there are infinitely many strings in $L$ that have (at least) 2 different derivations in $G$. Here's a sketch of a proof I have in mind: Suppose $G = (V, \Sigma, P, S)$ is a grammar satisfying $L(G) = L$. Then, since $L$ is i...
I love all that is compile time and I love the idea that once you compile a program a lot of guarantees are made about it's execution. Generally speaking a static type system (Haskell, C++, ...) seems to give stronger compile-time guarantees than any dynamic type system. From what I understand, Ada goes even further wi...
I'm doing some work on a problem and I'm finding it difficult to research it with out the actual name of the problem, since the problem I'm working on gives it it's own abstraction. The problem is this, Given a long straight road S is the set of the locations of houses down the road. For example S = [1,2,3] would be t...
Dijkstra's algorithm (wiki) and Bellman-Ford (wiki) algorithm are two typical algorithms for the single-source shortest path problem. Both of them compute distances for all nodes from source $s$. If both source $s$ and destination $t$ are fixed, can we compute the shortest path from $s$ to $t$ without computing dista...
I am referring to the algorithm that fills a white area of arbitrary shape in a binary digital image, starting from a given white pixel, using the Moore (8 neighbors) or Neumann (4 neighbors) connexity rules. There are well-known solutions to this problem, such as recursion on the immediate neighbors, or the scanline a...
What is an example of an infinite word(superword) w such that if a nonempty word v belongs to L = {1,2,3}*, v^2 isn't a subword of w? For example if w = 123123123...123 and v = 123, v^2 = 123123 hence it's a subword of w, I can't seem to find a superword that fits the requirement.
Define $L = L(u,v,x,y,z) = \{uv^ixy^iz : i \geq 0\}$, with $u,v,x,y,z \in \Sigma^*$. Prove that $\overline{L}$ is a CFL for all $u, v, x, y, z$ Clearly, $L$ is a CFL, as it is generated by the grammar: $S \longrightarrow uAz$ $A \longrightarrow vAy$ $A \longrightarrow x$ I am struggling with this problem, because I ...
I have a problem where I'm trying to find an efficient algorithm for approximate string matching for an input to the closest string match from an automaton (the input is assumed to be not accepting for the automaton). I've looked around and found Levenshtein Automaton but had trouble finding out how it would be impleme...
I am reading Fischer, Michael J., Nancy A. Lynch, and Michael S. Paterson. "Impossibility of distributed consensus with one faulty process." Journal of the ACM (JACM) 32.2 (1985): 374-382, available here, the paper in which the well known FLP Theorem was proved. I am having trouble understanding the notion of an "appli...