Problem Detail: I’m trying to figure out how a pushdown automata (PDA), which we know uses a stack (LIFO) can be simulated by a queue (FIFO). I understand that in a regular PDA, we only have access to the top most Read More …
Category: Uncategorized
Is there C++ code that takes infinite time to compile?
Problem Detail: Is C++ as a formal language recursively enumerable? If yes, is there any invalid C++ code that takes “infinite” time to compile? Asked By : sai_preet Answered By : Bartosz Przybylski In theory this code should compile infinitely template<long long K> Read More …
Advantage of byte addressable memory over word addressable memory
Problem Detail: What is the reason that almost all computers (besides some DSPs) use byte addressable memory? With byte addressable memory and a 32 bit address you can have 4GB while with word addressable memory you can have 4GB * wordsize. Read More …
3-dimensional matching approximation algorithm (implementation details)
Problem Detail: I have a run-time implementation question regarding the 3-dimensional (unweighted 2-)approximation algorithm below: How can I construct the maximum matching M_r in S_r in linear time in line 8? $X, Y, Z $ are disjoint sets; a matching $M$ Read More …
How can I debug my pseudocode algorithm?
Problem Detail: The algorithms for the problem I am working on become more and more complex as I try to improve their performance. They already span several pages with cases and sub-cases, and will probably become even longer. I am worried Read More …
Prove that all non-recursive languages are infinite
Problem Detail: I am wondering this statement above [the title] is true or not. Here is what I’ve already had : non-recursive means undecidable. I’ve read this Are all infinite languages undecidable? which says: If a Language is undecidable(non-recursive), there must Read More …
Inserting vertex in an adjacency matrix
Problem Detail: If a graph with $v$ vertices is represented in the form of adjacency matrix . Then, adding a new vertex to the existing graph requires how much time ? Is it $O(v^2)$ or $O(2v)$ . We have the adjacency Read More …
Maximum Enclosing Circle of a Given Radius
Problem Detail: I try to find an approach to the following problem: Given the set of point $S$ and radius $r$, find the center point of circle, such that the circle contains the maximum number of points from the set. The Read More …
Algorithms for graph generation using given properties
Problem Detail: There may be a large number of algorithms proposed for generating graphs satisfying some common properties (e.g., clustering coefficient, average shortest path length, degree distribution, etc). My question concerns a specific case: I want to generate a few undirected Read More …
Is there an efficient test for if an NFA accepts a subset of another NFA?
Problem Detail: So, I know that testing if a regular language $R$ is a subset of regular language $S$ is decidable, since we can convert them both to DFAs, compute $R cap bar{S}$, and then test if this language is empty. Read More …