Problem Detail: I understand the theory behind Bayesian networks, and am wondering what it takes to build one in practice. Let’s say for this example, that I have a Bayesian (directed) network of 100 discrete random variables; each variable can take Read More …
Blog
What is “dynamic” about dynamic programming?
Problem Detail: One of my seniors had a job interview and he was asked why it is called dynamic. He couldn’t answer and after he gave up the interviewer said that there’s nothing dynamic about it, its just called like that. Read More …
Why do Computers use Hex Number System at assembly language?
Problem Detail: Why do computer use Hex Number System at assembly language? Why don’t they use any other number system like binary, octal, decimal? What thing forced computer designer to use hex system at assembly? Why it looked so beneficial to Read More …
Decidability of empty intersection of two languages accepted by Turing machines
Problem Detail: I am really struggling with determining the decidability of languages and cant figure out whether this problem is decidable or not. I have a language $qquaddisplaystyle L = { (R(M_1), R(M_2)) mid L(M_1) cap L(M_2) = emptyset }$, where Read More …
For what kind of data are hash table operations O(1)?
Problem Detail: From the answers to (When) is hash table lookup O(1)?, I gather that hash tables have $O(1)$ worst-case behavior, at least amortized, when the data satisfies certain statistical conditions, and there are techniques to help make these conditions broad. Read More …
How can I convert the Turing machine the recognizes language $L$ into an unrestricted grammar?
Problem Detail: According to this Wikipedia article, unrestricted grammars are equivalent to Turing machines. The article notes that I can convert any Turing machine into an unrestricted grammar, but it only shows how to convert a grammar to a Turing machine. Read More …
Horn clause to Prolog
Problem Detail: At the needs of my HW at uni I need to transform some Horn clauses to Prolog but I cannot figure out how to do it. I found out some guides but they describe how to do it with Read More …
Subset Sum: reduce special to general case
Problem Detail: Wikipedia states the subset sum problem as finding a subset of a given set of integers, whose sum is zero. Further it describes it as equivalent to finding a subset with sum $s$ for any given $s$. So I Read More …
Union of two automata
Problem Detail: I need to find a minimal DFA given the following information: $ {a^nb : ngeq 0} cup {b^na: n geq 1}$ Now, maybe I’m not seeing this properly, but I don’t see how this is possible: the first one Read More …
Array-like immutable (persistent) data structure implementation with fast indexing, append, prepend, iteration
Problem Detail: I’m looking for a persistent data structure similar to array (but immutable), allowing for fast indexing, append, prepend, and iteration (good locality) operations. Clojure provides persistent Vector, but it’s only for fast append. Scala’s Vector has effectively constant-time append Read More …