Problem Detail: Given lists $A_1, A_2, dots, A_n$ of non-negative numbers, I want to find the $k$ smallest elements of the Cartesian product $A_1 times A_2 times dots times A_n$ ordered by the value $x_1 + x_2 + dots + x_n$, Read More …
Blog
[Solved]: Is there a way of objectively measuring the efficiency or quality of software or code design?
Problem Detail: I’ve been thinking about ways of measuring code, and, quite frankly, I can’t think of truly objective, semi-universal ways of evaluating the quality or “strength” of code to say, “Yes, this is better than that based on X, Y, Read More …
[Solved]: Big-O complexity when c is a tiny fraction
Problem Detail: Finding Big-O is pretty straightforward for an algorithm where $f(n)$ is $$f(n) = 3n^4 + 6n^3 + 10n^2 + 5n + 4$$ The lower powers of $n$ simply fall off because in the long run $3n^4$ outpaces all of Read More …
[Solved]: Big O running time for this algorithm?
Problem Detail: Here’s the code for the algorithm: Foo(n) lcm = 1 for i = 2 to n lcm = lcm*i/Euclid(lcm,i) return lcm The running time of Euclid$(a, b)$ is given as $O(log(min(a, b)))$ So the running time of the for Read More …
[Solved]: Is Deciding Decidability Decidable?
Problem Detail: I am wondering if deciding the decidability of problem is a decidable problem. I am guessing not, but after initial searches I cannot find any literature on this problem. Asked By : sync Answered By : Rick Decker Major edit of Read More …
[Solved]: How is clock syncing implemented?
Problem Detail: I’m looking for an explanation or reference on the implementation of computer clock. To keep the question at the level of logical abstractions: say, we put together some combinational and sequential logic from basic gates. The role of the Read More …
[Solved]: What is a Universal Turing machine?
Problem Detail: Could a Universal Turing machine be set up so that it is able to ‘reprogram’ itself to ‘behave’ like any specific Turing machine without using some ‘outside’ source of info to cause it to do this? Asked By : 201044 Read More …
[Solved]: Why is pure literal elimination absent in DPLL-based algorithms like Chaff?
Problem Detail: I’m looking into various SAT-solvers and trying to understand how they work and why they are designed in certain ways. (But I’m not in a university at the moment and I do not know anyone who is a professor. Read More …
[Solved]: Find set of non-overlapping rectangles in a 2D grid
Problem Detail: I have a $n times m$ rectangular grid of cells, and a set $R$ of rectangles within this grid. Each rectangle is a subset of the cells. (Alternatively, you can think of them as axis-aligned rectangles where each of Read More …
[Solved]: PDA for all non-palindromic strings of even length
Problem Detail: I had a homework assignment where I had to build a PDA over the alphabet ${a,b}^*$, accepting $L = {x mid x text{ is even but not a palindrome}}$. I already turned it in, but I know I had Read More …