Problem Detail: The GSAT algorithm is, for the most part, straight forward: You get a formula in conjunctive normal form and flip the literals of the clauses until you find a solution that satisfies the formula or you reach the max_tries/max_flips Read More …
Blog
Finding interesting anagrams
Problem Detail: Say that $a_1a_2ldots a_n$ and $b_1b_2ldots b_n$ are two strings of the same length. An anagramming of two strings is a bijective mapping $p:[1ldots n]to[1ldots n]$ such that $a_i = b_{p(i)}$ for each $i$. There might be more than Read More …
why not just use a random number generator as a hash function?
Problem Detail: I guess at the heart of this is that I don’t really understand hash functions. One article says any function mapping objects to an object of fixed size: A hash function usually means a function that compresses, meaning the Read More …
Proof that Hamiltonian cycle/circuit with a specified edge is NP-complete
Problem Detail: I’m a little stuck on this question, any help would be appreciated! Given that the Hamiltonian Path (HP) and the Hamiltonian Circuit/Cycles (HC) problems are known to be NP-complete, show that HCE is NP-complete. HCE: Given an undirected graph Read More …
maze solving algorithms (pledge algorithm)
Problem Detail: I saw this maze, and tried to apply pledge algorithms to it. But I am not able to solve this maze using this algorithm. What am I missing/doing incorrectly? PLEDGE ALGORITHM: in both cases we don’t get to exit. Read More …
What are the conditions for a NFA for its equivalent DFA to be maximal in size?
Problem Detail: We know that DFAs are equivalent to NFAs in expressiveness power; there is also a known algorithm for converting NFAs to DFAs (unfortunately I do now know the inventor of that algorithm), which in worst case gives us $2^S$ Read More …
Minimum space needed to sort a stream of integers
Problem Detail: This question has gotten a lot of attention on SO: Sorting 1 million 8-digit numbers in 1MB of RAM The problem is to sort a stream of 1 million 8-digit numbers (integers in the range $[0,: 99mathord{,}999mathord{,}999]$) using only Read More …
Is it possible that the halting problem is solvable for all input except the machine’s code?
Problem Detail: This question occurred to me about the halting problem and I couldn’t find a good answer online, wondering if someone can help. Is it possible that the halting problem is decidable for any TM on any input so long Read More …
Using coloring optimization or coloring decision to solve coloring search
Problem Detail: How can you show that coloring search can be solved by making a polynomial number of calls to the solution for coloring optimization or coloring decision? (Coloring search is the algorithm to color the vertices of a graph such Read More …
Chromatic polynomial of a square
Problem Detail: Consider a square, ABCD. Intuitively it seemed to me that its chromatic polynomial is $lambda(lambda – 1)(lambda – 1)(lambda – 2)$ where there are $lambda$ colours available.. That is there are $lambda$ ways in which a colour for A Read More …