Problem Detail: Given a graph with weighted edges. How to find the shortest path from vertex $A$ to vertex $B$ that passes through a set of edges $X$ at most once? $X$ can be big. Slow solution: Finding shortest path from Read More …
Author: ignougroup
[Solved]: Algorithm to extract the subgraph of all nodes with degree at least four
Problem Detail: I have an undirected graph represented by a list of nodes and a list of edges. What I need to produce from this is a list of nodes and edges representing a new graph containing only the nodes which Read More …
[Solved]: How to compare the time-complexity of an optimized algorithm with that of the original?
Problem Detail: I had an algorithm with time-complexity of $O(htimes w)$, knowing $h$ is the height and $w$ is the width of an image being processed (or a simple matrix of size $htimes w$). I managed to reduce the range that Read More …
[Solved]: Does Thompson’s algorithm produce optimal NFAs?
Problem Detail: I’m using Thompson’s algorithm to convert from a regular expression to a NFA. Is Thompson’s algorithm guaranteed to always output a minimal NFA, i.e., a NFA with the smallest possible number of states? For instance, consider this example. I Read More …
[Solved]: are there any decidable problems not verifiable in polynomial time?
Problem Detail: As I understand it NP requires a solution to be verifiable in polynomial time. Can you provide examples of solvable problems not verifiable in polynomial time ? Asked By : user533933 Answered By : Raphael Given input $x = langle M Read More …
[Solved]: Haskell monad bind operator type
Problem Detail: In Haskell, the Monads type class has the bind operator, which is represented by the symbol >>= The type of such operator is: (>>=) :: Monad m => m a -> (a -> m b) -> m b Why Read More …
[Solved]: Compute ‘permutation’ like problem with modulo
Problem Detail: Say, I have some permutation or combination formula like this, $$frac{n!}{(n-r)!r!},$$ and I want to $bmod$ the result with some big prime ($10^9+7$ for example). I already tried with modular operation and multiplicative inverse but failed (I don’t quite Read More …
[Solved]: Intuitive meaning of modal $mu$-calculus formula
Problem Detail: I am solving one of the past exams and I am not certain with my solution to one of the exercises. The exercise is asking to give intuitive meaning to modal $mu$-calculus formula: $$ phi = mu Z. langle Read More …
[Solved]: Why does x86 has explicit register definitions, and RISC’s doesn’t?
Problem Detail: For example, on x86, we have a set of general registers, each named to the function it carries out. We have an Accumulator, which is a storage for a results of different fixed point operations, we have a Base Read More …
[Solved]: Find all the paths from node A to node B
Problem Detail: You are given a bunch of nodes evenly spaced in a rectangular grid. The rectangle is M nodes long and N nodes wide. Node A is in the upper left hand (northwest) corner and node B is at the Read More …