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 …
Category: Uncategorized
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 …
Implementing the GSAT algorithm – How to select which literal to flip?
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 …
Round robin tournament scheduling using divide and conquer
Problem Detail: I want to scheduling $n$ teams using divide and conquer method for $n in mathbb{N}$.My approach is that if $n$ is even divide it to to group $frac{n}{2}$ and $frac{n}{2}$ but if $n$ is odd, add auxiliary team and Read More …
Dual-pivot Quicksort reference implementation?
Problem Detail: Has some sort of canonical – or reference – implementation of Dual-pivot Quicksort been posted anywhere? I would like to include that algorithm in a comparison among sorting algorithms for a specialized need that I have, but the Java Read More …
Are there improvements on Dana Angluin’s algorithm for learning regular sets
Problem Detail: In her 1987 seminal paper Dana Angluin presents a polynomial time algorithm for learning a DFA from membership queries and theory queries (counterexamples to a proposed DFA). She shows that if you are trying to learn a minimal DFA Read More …
Converting NFA to DFA
Problem Detail: I’ve converted an NFA to a DFA. But even after checking over it a few times, it still doesn’t feel right. I’m sure this is trivial, but I’d like someone to give me an idea where I went totally Read More …
Are there any PSPACE problems that don’t exist in NP-Hard?
Problem Detail: The question is in the title, I suppose. I am studying complexity classes, and I understand that NP-Hard is the set of problems that are at least as hard as the hardest problems in NP. Therefore, it will naturally Read More …
Show that the Kleene star of any unary language is regular
Problem Detail: An exercise asks me to show that the Kleene star of any unary language $L$ is regular. $E$ is the alphabet, $E = { 1 }$ Here’s my reasoning : $L$ is regular $implies$ $L^*$ is regular (closure property) Read More …
Relation of Space and Time in Complexity?
Problem Detail: I’m looking for some clarification on some concepts/facts I came across while studying for a class. I was reading the following wikipedia article. The below specific section and statement intrigued me when looking it over. http://en.wikipedia.org/wiki/Computational_complexity_theory#Important_complexity_classes “It turns out Read More …