instruction
stringlengths
35
29.1k
I'm having a problem with proving the following statement: For every infinite language $L$, does there exists an infinite language $L' \subseteq L$ such that $L'$ is not decidable?
Starting to use nanoflann to do some point cloud nearest neighbor searching and it got me thinking about just how "approximate" ANN methods are. If I have a (more or less) randomly distributed point cloud what is the likelihood that I get the exact nearest neighbor given a target point within the clouds bounding box? ...
I'm trying to understand Little's law and can't seem to get past this scenario: Let's say people arrive at the register at 12 per hour. It takes 10 minutes (1/6 of an hour) to service each one of them. The law says that the long-term average number of customers is 12 * 1/6 = 2. After the first hour, my assumption is th...
In the 8-queen puzzle, to reduce the search space, we can use an incremental approach. We put the first queen in the first column, then the 2nd queen in the 2nd column etc., avoiding the slots that are already being occupied. According to Peter Norvig's book, there are only 2057 possible sequences. Where does that numb...
If I have a hard problem, one standard approach is to express it as a SAT instance and try running a SAT solver on it. Another standard approach is to express it as a constraint satisfaction problem, and try using a CSP solver. The two feel somehow vaguely similar in what sorts of problems can be naturally expressed ...
So we know that there exists a Turing Machine $M$ and a polynomial $T$ such that: $M$ halts on all inputs within at most $T(|x|)$ steps If $x$ is in $L$ then $M$ accepts $x$ If $x$ is not in $L$ then $M$ rejects $x$ We need to show that for any other problem $L'$, there exists a polynomial time computable function $f...
I am looking for the English name of the following algorithm: We are given an array a with numbers and we need to be able to efficiently retrieve the sum of a continuous interval [f,t] of numbers in that array. In order to do that we precompute an array sums(of size size(a) + 1) that stores the sums of the prefixes of ...
Is it theoretically possible to have a nondeterministic finite state machine without any initial state or does it need at least one initial state?
I am not sure whether this is the right place to ask this question, but since it involves register machine and computability, hopefully this is the right place. I have tried to post on Programmers and Stack Overflow, but they redirected me to this site, they said it is more related to CS. The question is about how can ...
The busy beaver max shifts function, $S(n)$, has known values for $n\leq4$. Is there some basic, structural reason why it's inconceivable that we will ever find $S(n)$ for $n>4$? What is so different about $n=4$ than $n=5$? Or $n=6$? Somewhere along the way there must be some fundamental difference, otherwise $S(n)$ ...
This question is an extension of a previous question I've asked. Consider the rectangle $a<x<b , c<y<d$ in the $\mathbf R^2$ plane. Each point in this rectangle can be of kind #1 or #2 (We have to check each point to know its kind). Assume that somehow we know that the points of kind 1 (and so the points of kind 2) for...
So, there are multiple possible definitions of "np-complete", two of which being: A decision problem $L$ is np-complete if and only if: $L \in \text{NP}$ and $\forall L' \in \text{NP}: L' \preceq_{p} L$ A decision problem $L$ is np-complete if and only if: $L \in \text{NP}$ and there exists a np-complete probl...
As I understand emulation a rule of the thumb says that a computer must be around a order of magnitude more powerful to emulate another system without resorting to tricks. This is because for every clock cycle of the system to be emulated, the host machine must process that cycle in the correct time and also process it...
Given $k$ numbers $A_1 \leq A_2 \leq ... \leq A_k$ such that $\sum\limits_{i=1}^k A_i = k(2k + 1)$ is there an assignment of numbers $i_1, i_2, ... , i_{2k}$ which is a permutation of $1, 2, ... , 2k$ such that $i_1 + i_2 \leq A_1\\ i_3 + i_4 \leq A_2\\ .\\.\\.\\ i_{2k-1} + i_{2k} \leq A_k$ ? I cannot find an efficient...
I want to perform some interval-operations, and for addition, subtraction, and logic-/shift-operators, that works very well. The only problem I have is the multiplication. An interval $[a, b]$ denotes all two's complement numbers $x$ with the property $a \leq x \leq b$. An interval-operation means that if i have a bina...
These lecture slides sketch a proof that $L=\{ a^n b^n \mid n \geq 0 \} \cup \{ a^n b^{2n} \mid n \geq 0 \}$ cannot be accepted by any Deterministic Pushdown Automaton. Unfortunately, the slides give no references as to where the proof comes from. I was wondering, does anybody know of an academic paper or textbook tha...
I'm exercising for an upcoming exam and I find this exercise: Say whether or not the language $$L = \{a^jb^ia^{j-i}\mid i,j \ge 0\ , j > i\}$$ is a context-free language. Justify your answer. I have already tried (using the pumping lemma for CFL) with two different words: $$w1 = \ a^pb^{p-1}a$$ $$w2 = \ a^{2p}...
I think of type as a range of values that the variable can take whereas the rest is known constant or does not matter. Variables (instances or objects), which share common properties, are considered to belong to the same type/kind/class. That is, the type properties are constant across the type. The type is actually a ...
For my thesis, I have created a development approach (consisting of schemes, an application template and prototype code) that should make it easier to develop and adapt applications for a specific platform. I have conducted interviews with developers of that platform to evaluate my approach. There have been 5 interview...
I am looking for references that talk about the existence of a general pattern in mouse tracking data of humans when they do a matching game. I am going to use this knowledge to differentiate between humans and the robots trying to play the game as humans. Does anybody know a reference about the mouse movement pattern ...
I'm studying CLRS, and solving problems listed after each chapter. I'm curious about problem 1-1. That is right after Chapter 1. The question is, what is the best way to find the largest integer $n$ such that $n \lg(n) \leq 10^6$. The simplest but the longest one is substitution. Are there some elegant ways to solve th...
I am interested in the following version of TSP: Assumption: TSP where the distances are non-negative. We know the algorithm A which computes the optional solution for such instances of TSP. Task: State an algorithm that uses the algorithm A and computes an optimal solition for instances where negative distances are al...
In both CLRS (third edition) and Erik Demaine's lecture, the van Emde Boas tree is defined to store max but not min recursively. Why store max recursively? If it is not stored recursively, insert(V, x) can take advantage of the special case where a cluster or summary contains one element (min = max), although I think ...
I'm having trouble understanding reduction. Lets say you have a decision problem A that is NP-Complete. Also, another problem B the can be reduced from A. What can you say about B if: 1) The reduction is done in polynomial time 2) The reduction is done in exponential time I know that if A is reduced to B means that i...
In the seminal distributed systems paper The Part Time Parliament (the Paxos protocol), Leslie Lamport names fictional legislators who are involved in the Paxon parliament protocol. According to this writing, he notes that: I gave the Greek legislators the names of computer scientists working in the field, translitera...
Is there any convex hull algorithm that can be extended to non-euclidean metric, such as the geodesic distance on the surface of a sphere?
I'm trying to find complexity class of finding winning strategy for first player in following game: Intance of 'Stones' game is: finite set $X$ relation $R \subseteq X^3$ set $Y \subseteq X$ and node $f \in X$ At the beggining we place stone in every element of $Y$. Every player in his turn can move stone from $x$ t...
The problem is defined as: Given $N$ points on an infinite line, find the least number of line segments of length $L$ that cover all points (including endpoints) after changing one point. That means that if I have the points $P = 1,10,15,28$ , $L = 10$ , 3 line segments are needed , changes will occur that the point ...
Consider a deterministic Turing Machine $D$ which has an infinite tape in both directions. We don't have exact information about it; what we know is that its alphabet is $\{a, b, c\}$ and there are at least three states $q_1, q_s, q_f$ where $q_s$ is the start state, $q_f$ is the final state. At some step of the comput...
I would like to show that $$EQ_{DTM} = \{ (\langle M_1\rangle,\langle M_2\rangle) \mid M_1\text{ and } M_2 \text{ are DTMs and } L(M_1)=L(M_2)\}$$ and $$\overline{EQ_{DTM}}$$ are not semi-decidable. I think there must be a reduction from the complement of the halting problem.
It's a school assignment: The problem is: Write a BN grammar for +67. The given solution I have been given is following: <digit> ::= 6 | 7 <number> ::= <digit> | <digit> <number> <+67> ::= + <number> My question is, when given this simple task, could it be derived like this? <digit> ::= 6 | 7 <number> ::= <digit>...
What does the capital R superscript notation mean in regular languages? I am working on a homework assignment and don't recall my professor mentioning what the what the R superscript means. For example in this syntax: $L = \{ww^R\mid w \in \Sigma^{\ast} \}$
I have a question about definability of truth assignments. Suppose that I am working in the context of propositional logic. Let me give some definitions first. Let $L$ be a propositional language with the set $Prop_{L}$ of propositional variables. A truth assignment is a map $v\colon Prop_{L}\to\{F,T\}$. Denote the col...
Do you know the name of the following problem and can you give a reference for its complexity (especially the relation to $\mathsf{GraphIsomorphism}$ and/or other isomorphism/homomorphism problems)? Given two metrics $d_1$ and $d_2: V^2 \to \mathbb{N}$. Does there exist a permutation $\pi$ on $V$ such that $d': V^2\t...
I am reading Algorithm design manual by Skiena. It gives proof of Insertion sort by Induction. I am giving the proof described in the below. Consider the correctness of insertion sort, which we introduced at the beginning of this chapter. The reason it is correct can be shown inductively: The basis case consists of a...
I'm trying to understand what this text means in my textbook about distributed leader election algorithms, but I can't make any sense of it. Either they didn't explain what was meant, or I missed it somewhere. In this section, we show that the leader election algorithm of Section 3.3.2 is asymptotically optimal. That ...
I'm studying for an exam on software testing and in my notes I found this: Many more paths than branches. A pragmatic compromise will be needed I cannot understand the difference between paths and branches; each time I work out the paths and branches of a graph I end up with the same number. Thanks!
There are $n$ bins and $m$ type of balls. The $i$th bin has labels $a_{i,j}$ for $1\leq j\leq m$, it is the expected number of balls of type $j$. You start with $b_j$ balls of type $j$. Each ball of type $j$ has weight $w_j$, and want to put the balls into the bins such that bin $i$ has weight $c_i$. A distribution of ...
A Bloom filter uses a hash function to test membership in a given set $S$, by checking if an item is present of not at the specified position. To mitigate the effect of hash collision, multiple functions are used, yielding probabilistic bound if using universal hash. We can use 10 bits per elements to have 'reasonable...
Here is the question: I have a given tree with n nodes. The task is to find the number of subtrees of the given tree with outgoing edges to its complement less than or equal to a given number K. for example: If n=3 and k=1 and the given tree is 1---2---3 Then the total valid subtrees would be 6 {}, {1}, {3}, {1,2}, ...
When trying to decide on the choice of a programming language for a specific task, people will often tell me: "use this language because it has the best library for the type of problems you are addressing". I would rather choose my language for its intrinsic qualities as a programming medium. That implies that librarie...
If I use a balanced tree instead of lists in a hash table implementation, and also after initializing my table I don't enlarge nor reduce the size of the table, what would be the worst case complexity?
In the classic crypto textbook "Introduction to Modern Cryptography" by Jonathan Katz and Yehuda Lindell, there is a definition for indistinguishable encryption in the presence of an eavesdropper as such that for every probabilistic polynomial time adversary A there is a negligible function negl(n) such that $\Pr[PrivK...
I have an exercise which I can't solve. Exercise. Consider a game where the players have $2$ pure strategies each and assume that the graph $G$ is a tree with maximum degree $3$. Give a polynomial time algorithm to decide if such a game has a pure Nash equilibrium. The idea seems pretty obvious, every vertex of the tre...
On the wikipedia article about the polynomial hierarchy http://en.wikipedia.org/wiki/Polynomial_hierarchy it says "$A^B$ is the set of decision problems solvable by a Turing machine in class A augmented by an oracle for some complete problem in class B" What is a "Turing machine in class A" for classes P, NP, and coNP?...
I want to prove that grammar $$ \begin{cases} S'\rightarrow S\\ S\rightarrow aSb ~|~ A\\ A\rightarrow bA~|~b \end{cases} $$ isn't $LR(1)$. I've constructed parser table and got Shift-Reduce conflict. I want to prove that without parser table, using another $LR(1)$ definition. Here's definition: Grammar is $LR(1)$, if f...
Recently I got interested in a game called Toads and Frogs and I'm trying my best to come up with some software which would be able to beat an average (i.e. not knowing the strategy) human though I'm struggling with the strategy. I read on it everything I could google out but turns out there's not that much to read abo...
I am somewhat a beginner, and I have often seen complexity being calculated for various algorithms but they never actually gave me a very clear idea about how it is done. Can someone please point some resources where I can learn to calculate the complexity of an algorithm? Secondly, is there some software that calculat...
I am working with HOL-Light parser and keeping seeing references to preterm parser. What is a preterm parser? The most informative statement I find is from the HOL-Light reference for the parse_pretype function. This is mostly an internal function; pretypes and preterms are used as an intermediate representation fo...
What does $A^B$ mean where A and B are complexity classes? The "Polynomial Hierarchy" page says: $A^B$ is the set of decision problems solvable by a Turing machine in class A augmented by an oracle for some complete problem in class B In that case what is a Turing machine in class A? (besides just a machine of some sor...
I want to solve the Physical Travelling Salesman Problem using an evolutionary algorithm. The objective of the PTSP is to visit the maximum number of waypoints of the map in the minimum number of time steps. The map takes the form of a two-dimensional board, where ten waypoints are scattered around and multiple obstac...
I have a good understanding of how to program using logic languages, but I'm currently writing up a paper describing some of my work, and I wanted to ensure that I wasn't abusing the proper terminology when describing logic languages. I have a few questions: What exactly is a predicate? How does a predicate relate to ...
Constructivist logic is a system which removes the Law of the Excluded Middle, as well as Double Negation, as axioms. It's described on Wikipedia here and here. In particular, the system doesn't allow for proof by contradiction. I'm wondering, is anyone familiar with how this affects results regarding Turing Machines ...
Wikipedia says: Complete lattices appear in many applications in mathematics and computer science Is it just referring to the fact that the standard Boolean algebra used in computation is a complete lattice? Is there anything we gain by working at the abstract level of lattices instead of with Boolean logic specifica...
Consider this small picture of a sunflower, and its histogram: What would the Fourier transform of the first picture look like? Is there any relationship between the histogram and the Fourier transform?
I understand the four necessary conditions, mutual exclusion, hold and wait, no preemption, and circular wait, for deadlock to occur. However, does there exist a situation where the four conditions are true and the system is not in a deadlock state? If a deadlock occurs, there exist the four conditions. However, if th...
Given a network $G=(V,E)$ , a max flow f and an edge $e \in E$ , I need to find an efficient algorithm in order to detect whether there is some min cut which contains $e$. Another question is, how do I decide whether if $e$ is the lightest edge of at least one minimal cut? I've thought about running Ford-Fulkerson algo...
Let consider a general version of Two Generals' Problem, when there are $n$ generals located on the arbitrary graph and they should agree on exactly the same value whether to attack or not to attack. It's well known that Two Generals' Problem represents a version of the Consensus Problem with unlimited number of the...
Motivated by Max-Flow: Detect if a given edge is found in some Min-Cut, I'd like to ask the following questions: Given a multiset of real numbers $B$, how hard is it to compute the minimal positive difference $\delta_\min$ $$\delta(B_1,B_2)=\left|\sum_{b\in B_1}b-\sum_{b\in B_2}b\right|$$ taken over all partitions $B...
My question refers to the draft of Mathematical Foundations of Automata Theory, IV.2.1 (pages 89ff in the pdf). I will repeat everything necessary nevertheless: Let $M,N$ be monoids and $\varphi: M \rightarrow N $ a monoid morphism. We say that a subset $L$ of $M$ is recognizable by $\varphi$ if there is a subset $P$ o...
We have a sorted list of side lengths that can be used to form a polygon. There are $n$ such values ($n \le 1000$). Now we need to find if we can use any 10 of these values to form a non-degenerate convex polygon. How do we approach this? Anything up to the order of $O(n^2 \log n)$ is acceptable. Better if possible. I ...
Realize I didn't mention x86 or any more details to make this non-specific to any platform, but to just get a general idea of how this is done(this is also a long question with a lot of details). I know most PC motherboards for desktop (if not all) computers have two sections; north and south bridge, and a chipset conn...
Problem  Given a Turing machine $M$ which has known runtime ${O}(g(n))$ with respect to input length $n$, is the runtime of $M \in {O}(f(n))$? Is the above problem decidable for some nontrivial pairs of $g$ and $f$?A solution is trivial if $g(n) \in O(f(n))$. This is related to the problem Are runtime bounds in P dec...
What are degenerate polygons? How does one check whether a given pair of polygons is degenerate or not?
We have two integers $z, k$ We form a sequence now of first z natural numbers. i.e. $1, 2, 3, 4, \ldots z$. Now we have to find total number of permutations of this sequence such that the sum of any two adjacent numbers is $ \le k$ ( $z \leq 10^6$, $\;\;z < k < 2*z$ ) Here is what I have been able to think untill now....
I'm working on old MC-Questions about decidability und don't have the answers to the following ones: 1.) $L_1$ and $L_2$ are not decidable $\Rightarrow$ No superset of $L_1 \cup L_2$ is decidable 2.) For Turing-acceptable languages L is "L = $\emptyset$" a non-trivial property. 3.) There are context-free languages $L_1...
I have seen this model question on synchronous circuit , but i could not understand the logic, can anyone please help me? "Develop the state diagram for a synchronous sequential circuit which will recognize the bit sequence 1101 (ie, every time the sequence 1101 is detected in the input bit stream, the circuit has to ...
I have some concerns about the Halting problem. This is the proof I know: Let $h(M, i)$ be a function, $M$ being Turing machine and $i$ input for the Turing machine. Let $h(M, i)$ output true whenever $M(i)$ halts. Let $h(M,i)$ output false if $M(i)$ does not halt. Then define $p(M)$ on Turing machine $M$. $p(M)$ will ...
The notion of polynomial time Turing reductions (Cook reductions) is an abstraction of a very intuitive concept: efficiently solving a problem by using another algorithm as a subroutine. For example, by stating "$A$ is polynomial time Turing reduced to $B$", we indicate that we can solve the problem $A$ in a polynomia...
I'm in the middle of planning a 5000ish word essay on fully homomorphic cryptography, the current practical implementations and their limitations. Which areas of CS as a subject have been (or will be) most affected or will utilise fully homomorphic cryptography the most in the coming years and developments? PS. I did s...
Let $L$ be a star-free language over finite alphabet $\Sigma$. A substitution will be a map $\sigma : \Sigma \to \mathcal{P}(\Sigma^*)$. It seems obvious that if $\sigma(a)$ is star-free for every $a \in \Sigma$, then $\sigma(L)$ will be star-free. ($\sigma(L) = \{ w_1 ... w_n | w_i \in \sigma(a_i) \land a_1 \ldots a...
Let $a$ and $b$ be integers, and let $\text{RANDOM}(a,b)$ be a method returning an integer from the range $[a,b]$ uniformly at random. Now consider the following program, that takes as input an array $A$ of integers. PERMUTE-BY-SORTING(A) 1. n = A.length 2. let P[1..n] be a new array 3. for i = 1 to n ...
What is the difference between Babbage's analytical and difference engine? Can they even be compared?
This is a question from a 2007 exam paper for a course I'm studying, question 2 on page 2. Theorem: Let $L$ be a context-free language. Let $L_{even}$ be the subset of $L$ consisting of all the strings in $L$ that have even length. Then $L_{even}$ is context-free. The question is to prove this theorem using two of th...
I'm thinking of using something similar to the Merge Sort algorithm. So the recurrence running time of Merge Sort is T(n) = 2T(n/2) + n. What should I do about if n/2 is less than or equal to m, OR if n/2 is greater than or equal to m? I believe the given function should be location inside the "Merge" function of the ...
Suppose I have a system with 32-bit logical and 16-bit physical address spaces, and the page size is 512 bytes. For simplicity, ignore the valid/invalid bits in the page table. How many sections will the logical address be divided and how many bits will each section have? The logical address will be divided into three ...
Apparently, if we use Djikstra's algorithm to find the shortest path between the root node and all other nodes in a weighted graph with no negative cycles, we are done after updating the distance of each node $|V| - 1$ times. This puzzles me because I think that a single round of breadth first search is enough. Why mus...
A sink in a directed graph is a node with no outgoing edges. If I perform a depth first search, why is it that the node with the least post-order number (and thus the highest pre-order number) not necessarily a sink - isn't this node found last? Also, intuitively, the node with the greatest post-order number should be ...
There are $n$ bins, the $i$th bin contain $a_i$ balls. The balls has $n$ colors, there are $a_i$ balls of color $i$. Let $m=\sum_{i=1}^n a_i$. A swap is take a ball from one bin and swap with a ball from another bin. We want minimum number of swaps such that each bin only contain balls with the same color. I know a ea...
Take the image and spectrum below. If I look at the spectrum, it just look like noise.... How to make sense of it intuitively? Image: Frequency spectrum of image (using Fourier Transform):
By default, a hash table is unordered. I have a simple question on the retrieval of elements in a hash table Can we retrieve elements from a hash table in the same order as they are put inside?
How can I find the serial number of an n-choose-k combination? I would like a function that gets as input: $n$, $k$, a set of $k$ elements out of the set ${0, 1, ... n-1}$. The output should be a number in the range $[0, C(n,k)-1]$, such that: Each different combination gets a different number; All numbers in the r...
Are these languages recursively enumerable? $L = \{ \langle A\rangle \mid x\in L(A)\implies |x|\leq 13\}$ $L = \{\langle A\rangle \mid L(A) \subseteq \overline{L_{\mathrm{uni}}}\}$, where $L_{\mathrm{uni}} = \{\langle T\rangle x \in \{0,1\}^*\mid x \in L(T)\}$. How would I prove / disprove that these languages are RE...
I was thinking about the following problem the other day: You are stuck on a desert island with a battery-powered emergency radio. You know that if you feed enough power into the radio that you should be able to alert someone to your position. In fact, as soon as you provide the radio enough power to reach someone e...
Describe a (general) procedure that, given some finite automaton M, produces a new finite automaton M’ with: M’ rejects ε, but accepts otherwise the identical language as M does.Note that M may or may not accept ε, while M’ does not! My solution is to discuss the different cases. If M doesn't contain ε, then, don't ...
If not, then what does it mean when for some state $q$ and some symbol $a$, $\delta(q, a)$ does not exist?
I need to prove a bisimulation relation on $CA_{\tau}(N)$ (communication algebra with tau-steps) and names $N$. It need to prove that $p!d.x||p?d.y$ is bisimular with $p!d.(x||p?d.y)+p?d.(p!d.x||y)$ by finding a suitable bisimulation relation $R$. I was thinking of $R=\{(x,x) \mid x \text{ is a reachable state} \} \cup...
In Graph-Theory there are many ways for efficient approximation-algorithms to solve the Metric TSP. The best solution seems to be the Christofides Heuristic with a factor of 1.5 to the optimal solution. My Teacher said, there would be the so called $\frac{4}{3}$-conjecture, which states: there might be a approximation ...
(This question might be legitimately crossposted to stackoverflow or mathoverflow or programming StackExchanges.) Preface I'm reading this paper on solving linear systems of equations Ax = b using an explicit inverse (held by conventional wisdom as a big no-no): Druinsky & Toledo, "How accurate is inv(A)*b?", http://ar...
Exact cover by 3-sets is $\sf{NP}$-complete: Instance: Given a finite set $X = \{ x_1,x_2,...,x_{3n}\}$ of $3n$ elements and a collection $C = \{ ( x_{i_1}, x_{i_2}, x_{i_3}) \} $ of $m$ 3-elements subsets of $X$; Question: Find a subcollection $C'$ of $C$ such that every element in $X$ is contained in exactly one me...
I have given an undirected graph $G$ with vertex $\{1, ... n\}$ and two star subgraphs $S_1$ and $S_2$, always consisting of ALL neighbors of a given vertex, and the goal is to check wether the two star graphs have a vertex in common. This will be will be executed $M$ times for $M$ a large integer. My approach would b...
Apple has just proudly stated that their new mac pro will be able to give up to 7 teraflops of computing power. Flops stands for Floating Point Operations Per Second. How exactly is this benchmarked though? Certain floating point operations are much heavier than others, so how exactly would a FLOP be a benchmark for co...
I'm doing some exam study and came across a question I'm not really sure on. Consider the Bayesian network below: Let's denote "Disease" with $D$ and "Symptom" with $S$. I want to find $P(D \mid S_A, S_B)$ but it's not working for me. I've tried (among other things) to apply this rule: $\qquad \displaystyle P(x_1, x_2...
In Don Knuth's famous series of books, The Art of Computer Programming, section 2.3.1, he describes an algorithm to traverse binary tree in inorder, making use of an auxiliary stack: T1 [Initialize.] Set stack $\rm A$ empty and set the link variable $\rm P\gets T$ T2 [$\rm P=\Lambda$?] If $\rm P=\Lambda$, go to step T...
Of course, converting NFA to DFA is not a problem. But what about the other direction? My motivation is the notion of minimization regular expressions using the DFA minimization algorithm.
Let consider well-known problem in distributed computing Broadcast Problem in network with stopping crashes. The most appropriate solution to the broadcast problem is flooding algorithm, when the source of the message just send it to all available nodes of the network on the first round, if there are crashes on the edg...
I have one algorithm that generates a feasible solution to a linear programming problem. However, it is very likely that this is not a corner point. This makes it not suitable for direct use as an initial feasible solution for a bounded Simplex solver. How can I efficiently find a corner point from this solution that I...
I have n commodities with each a unique source and sink node. Each source-sink pair is connected in some manner on a directed acyclic graph. All arc weights are non-negative. The goal is to find the shortest paths to transport the commodities between their respective source-sink pairs. Is there any algorithm that can s...
Recently I've seen this very good apps https://play.google.com/store/apps/details?id=com.kingjim.shotnote&hl=en https://itunes.apple.com/JP/app/id411332997?mt=8 this apps reconstruct the image from the camera based on the marker (this is what I think :) ) it also have a special paper that have marker. What I've still h...
I have the following formal grammar: $$G= (\{S,A,B\},\{a,b\},R,S)$$ $$R=\{S \rightarrow A\ |B, A \rightarrow \varepsilon\ | aA\ |bA, B \rightarrow \varepsilon\ |Bb\ | b\}$$ Now, we see, the production rules $A \rightarrow \varepsilon$ and $B \rightarrow \varepsilon$ implies that this grammar is not context-sensitiv ($...