Problem Detail: my assumption: – we have an undirected graph with only positive edges – the edges are sorted alphabetically: e.g A-B, A-C, B-D and e.g not C-A, D-B, A-B I do not understand, why we need the first loop (line Read More …
Blog
[Solved]: Is an irregular language concatenated with a language with which it has no common symbols irregular?
Problem Detail: Here’s an example of what I’m talking about. Suppose I have a languages $$ L_{1} = {a^ib^i mid i>0}, L_{2} = {c^i mid i>0} $$ and $$ L_{1}L_{2} = {a^ib^ic^i mid i>0} $$ Is it true that if $L_{1}$ Read More …
[Solved]: Data Flow Analysis with exceptions
Problem Detail: Data flow analysis work over a control flow graph. When a language under consideration supports exceptions, control flow graph can explode. What are the standard techniques for dealing with this blow-up? Can we soundly disregard edges induced by exception? Read More …
[Solved]: Finding the two largest of five small integers as quickly as possible
Problem Detail: I use a variation of a 5-cross median filter on image data on a small embedded system, i.e. x x x x x The algorithm is really simple: read 5 unsigned integer values, get the highest 2, do some Read More …
[Solved]: How do I reconstruct the forest of syntax trees from the Earley vector?
Problem Detail: Using the Earley vector as a recognizer is quite straightforward: when the end of the string is reached, you just have to check for a completed axiomatic production started at position 0. If you have at least one, then Read More …
[Solved]: Finite automaton – language acceptance
Problem Detail: In the book “The New Turing Omnibus”, an excercise reads as the follows: “Show that no finite automaton can accept the language consisting of all words of the form $a^n b^n, n=1,2,3,…$ The formula represents $n$ a’s followed by Read More …
[Solved]: What is the expected number of nodes at depth d of a tree after i random insertions
Problem Detail: Suppose one wanted to build a tree at random. Let the first insertion at step $i = 1$ be the root node. From here, nodes are inserted into the tree at random one at a time. How would one Read More …
[Solved]: Data structure to insert, update and sort indexes by frequency and query an index for a particular cumulative frequency
Problem Detail: Here is the description of the data structure I am looking for: Initial Original Data Index | Frequency | 1 3 2 1 3 7 4 2 5 6 Now it should be kept Sort-ed by their frequency inside Read More …
[Solved]: What are the applications of Rose trees?
Problem Detail: I recently found out about the Rose tree data structure, but just going off of a Haskell data definition and the tiny Wikipedia description of it, I’ve got some trouble understanding what applications a Rose tree might have. For Read More …
[Solved]: Which NPC problems are NP Hard
Problem Detail: I have read that TSP and Subset Sum problems are NPC problems which are also NP Hard. There are also problems like Halting Problem which is NP Hard, but not NP Complete And Wikipedia defines this as A problem Read More …