Problem Detail: Here is the pseudocode for LSD radix sort from http://www.cs.princeton.edu/~rs/AlgsDS07/18RadixSort.pdf public static void lsd(String[] a) { int N = a.length; int W = a[0].length; for (int d = W-1; d >=0; d–) { int[] count = new int[R]; for(int Read More …
Blog
What is the purpose of M:N (Hybrid) threading?
Problem Detail: In other words, what advantages does Hybrid threading have over 1:1 (kernel only) and N:1 (user only) threading? This is a follow-up to What is the difference between user-level threads and kernel-level threads? Asked By : Sheldon Answered By : svick Read More …
Image pattern detection – Finding similarities in same image
Problem Detail: The problem: Only pattern-like images are supposed to be uploaded and be used as backgrounds to a site, photos should not. How would you detect if an image looks enough like itself to be regarded as a pattern? Asked Read More …
What is a computer year?
Problem Detail: In one of the text book its mentioned that ‘running time of this algorithm is 200 computer years’. Can somebody please explain what is the meaning of a computer year? Asked By : Kumar Answered By : adrianN Computer years, like Read More …
What is the difference between control flow graph & interprocedural control flow graph?
Problem Detail: I am doing research on control flow analysis on aspect oriented programs and I found in some papers an interprocedural approach for doing control flow analysis on others call graph or control flow graph. Is there a real difference Read More …
Computing the mode of XOR subsequences
Problem Detail: I was confronted with this problem in an online programming challenge and it has been bugging me since: In the problem, you are given a list of 16-bit numbers, say $a_0, a_1, …, a_n$. An “XOR subsequence” is defined Read More …
Operator precedence in propositional logic
Problem Detail: there is some kind of priorities for the elements in propositional logic ? for example : p ∧¬q → r , given this ,we there may be two options (p ∧¬q) → r OR p ∧ (¬q → r) Read More …
Is radix sort really O(n) for sorting 32 bit integers?
Problem Detail: I was trying to analyze radix sort in terms of time and space. Assume that we are given $n$ 32-bit integers which we would want to sort by looking at the least significant digits first. $k$ is the total Read More …
Describing a Turing machine that computes $lceillog_{2}(n)rceil$
Problem Detail: I need to describing a Turing machine that computes $lceillog_{2}(n)rceil$ I know that: n = 1, 2, 3, 4, 5, 6, 7, 8, … f(n) = 0, 1, 2, 2, 3, 3, 3, 3, … So I’m thinking of Read More …
What makes PROLOG Turing-complete?
Problem Detail: I know that it can be proven PROLOG is Turing-complete by constructing a program that simulates a Turing machine like this: turing(Tape0, Tape) :- perform(q0, [], Ls, Tape0, Rs), reverse(Ls, Ls1), append(Ls1, Rs, Tape). perform(qf, Ls, Ls, Rs, Rs) Read More …