Problem Detail: I have the following algorithmic problem: Determine the space Turing complexity of recognizing DNA strings that are Watson-Crick palindromes. Watson-Crick palindromes are strings whose reversed complement is the original string. The complement is defined letter-wise, inspired by DNA: A Read More …
Category: Uncategorized
Can languages with infinite strings be recursively enumerable?
Problem Detail: I am not 100% sure about the definition of recursively enumarable languages. Yes I know how are they defined: There has to exist a Turing machine that accepts all wrods of the language and halts but it does not Read More …
Bellman-Ford and zero-distance cycle
Problem Detail: Problem statement: Given a graph G(V,E) which is not acyclic and may have negative edge weights (and thus may possibly have negative-length cycles), how does one detect if the graph has a zero-length cycle, and no negative-length cycles? Background Read More …
Tiling an orthogonal polygon with squares
Problem Detail: Given an orthogonal polygon (a polygon whose sides are parallel to the axes), I want to find the smallest set of interior-disjoint squares, whose union equals the polygon. I found several references to slightly different problems, such as: Covering Read More …
What is the most power/energy efficient sorting algorithm?
Problem Detail: I am writing a Android phone application that needs to be very power efficient, and I would like to use the most power efficient sorting algorithm. I will implement it in C for extra power efficiency. What algorithm is Read More …
Non-uniform random distribution: How do I get a random between 100 and 180 that is on average close to 120? (like in a Gaussian distribution)
Problem Detail: Presume I have the following case: int value a int value b, for which a < b int value i, for which a <= i < b I need an int value x, for which a <= x < Read More …
Visit all vertices on directed graph
Problem Detail: We are given a directed graph, the number of vertices and edges. We need to decide, whether there is a [starting] vertex where we can get started and visit all the vertices. You can revisit vertices, but can’t “use” Read More …
What is the difference between variables and pointers?
Problem Detail: Whist reading an article outlining differences in OO and Functional programming I came across function pointers. It has been a while since I completed my Computer Science degree (2003) and so I looked up pointers to refresh my memory. Read More …
Generating a adjacency matrix representing a DAG
Problem Detail: Does anyone have a pointer to a resource or, even better, a tip to provide on how to efficiently generate a very large matrix representing a connected graph. Graph can be randomly created although I would ideally generate a Read More …
Does Quicksort always have quadratic runtime if you choose a maximum element as pivot?
Problem Detail: If you have a quick-sort algorithm, and you always select the smallest (or largest) element as your pivot; am I right in assuming that if you provide an already sorted data set, you will always get worst-case performance regardless Read More …