Problem Detail: The algorithm (from here) – Create a set S of remaining possibilities (at this point there are 1296). The first guess is aabb. Remove all possibilities from S that would not give the same score of colored and white Read More …
Blog
What is the Relationship Between Programming Languages, Regular Expressions and Formal Languages
Problem Detail: I’ve looked around the net for an answer to this question and it seems as if everybody implicitly knows the answer except me. Presumably this is because the only people who care are those who have had tertiary education Read More …
Is the open question NP=co-NP the same as P=NP?
Problem Detail: I’m wondering this based on several places online that call $sf NP=$ co-$sf NP$ a major open problem… but I can’t find any indication as to whether or not this is the same as $sf P=NP$ problem… Asked By Read More …
Reachable state space of an 8-puzzle
Problem Detail: I’ve just began studying Artificial Intelligence and am wondering why the reachable state space of an 8-puzzle is $9!/2$. I see that the number of permutations of the tiles is $9!$ but it is not immediately obvious why half Read More …
How many minimal spanning trees are there when all edge costs are distinct?
Problem Detail: Suppose all costs on edges are distinct. How many minimal spanning trees are possible? I dont know if this question is supposed to be easy or hard, but all I can come up with is one, because Kruskal’s, and Read More …
Best solutions to 6 degrees of separation
Problem Detail: From purely my knowledge of computer science a simple breadth first search from root A in search of node B, while keeping track of the depth of the tree, would be the most effective way to check whether A Read More …
Why won’t a Turing machine halt?
Problem Detail: I am reading Sipsers. The book introduces halting problem and proves that is a turing recognisable language but not a turing decidable language. Thus giving a Turing machine which does not halt on some inputs. The language to be Read More …
Algorithm to write a dictionary using thousands of words to find all anagrams for a given string with O(1) complexity
Problem Detail: Problem Statement: Suppose we have a thousands of words and we need to maintain these words in a data structure in such a way that we should be able to find all anagrams for a given string. I tried Read More …
Algorithm to test whether a binary tree is a search tree and count complete branches
Problem Detail: I need to create a recursive algorithm to see if a binary tree is a binary search tree as well as count how many complete branches are there (a parent node with both left and right children nodes) with Read More …
How to show that given language is unambiguous
Problem Detail: Given following grammar: $$ begin{align} S rightarrow &A1B A rightarrow & 0A mid varepsilon B rightarrow & 0B mid 1B mid varepsilon end{align} $$ How can I show that this grammar is unambiguous? I need to find a grammar Read More …