Problem Detail: Given a context-free grammar, is there an algorithm to determine if the CFG will ever produce an even length string? Or is this undecidable? Asked By : ASDF Answered By : Hendrik Jan Of course there is a meta-algorithm via automata Read More …
Blog
Type-checking algorithms
Problem Detail: I am starting a personal bibliographic research on type-checking algorithms and want some tips. What are the most commonly used type-checking algorithms, strategies and general techniques? I am particularly interested in complex type-checking algorithms that were implemented in widely Read More …
Which research languages have a stronger typesystem than Haskell and why?
Problem Detail: Here I read that: Haskell definitely does not have the most advanced type system (not even close if you count research languages) but out of all languages that are actually used in production Haskell is probably at the top. Read More …
give potential function – binary heap – extract-min in amortized const time and insert in log amortized time
Problem Detail: Consider an ordinary binary min-heap data structure with n elements supporting the instructions INSERT and EXTRACT-MIN in O($lg n)$ worst-case time. Give a potential function $Phi$ such that the amortized cost of INSERT is $O(lg n)$ and the amortized Read More …
Counting sort on non-integers – why not possible?
Problem Detail: What is it about the structure of counting sort that only makes it work on integers? Surely strings can be counted? ”’ allocate an array Count[0..k] ; initialize each array cell to zero ; THEN ”’ for each input Read More …
Reducing from Hamiltonian Cycle to Subgraph Isomorphism
Problem Detail: I am reading Subgraph isomorphism problem I am having trouble understanding how they prove that the subgraph isomorphism problem is NP-Complete using the Hamiltonian cycles problem in the article. Can someone help me explain what is happening in more Read More …
What is the intuition behind the Potential Function in Amortized Analysis of some algorithm?
Problem Detail: I have come across many amortized analysis using a potential function. They all look magical to me. Everything works perfectly but I never got the intuition behind how they come up with such a “magical” potential function which makes Read More …
Understanding the basic concepts in memory organisation
Problem Detail: (Before actually proceeding to the question, I want to confess that this is a homework question, please do consider it and help me in improving my understanding a bit more.) I have recently started learning computer organisation and architecture. Read More …
Infinite calculations in finite time
Problem Detail: This is probably a silly thought, but suppose we have a computer that’s programmed to perform an infinite sequence of calculations and suppose the $i^text{th}$ calculation takes $1/2^i$ seconds to complete. Then this computer can do an infinite number Read More …
Non-deterministic Turing machine that halts on at least one branches of computation
Problem Detail: I’m looking at my textbook here from Michael Sipser and he says that a nondeterministic Turing machine is a decider if all its computation branches halt on all inputs. I think I recall seeing somewhere what you’d call a Read More …