Problem Detail: Short version: I want to know where the $-2$ comes from in the formula on p. 221 of CLRS 3rd edition. Long version: CLRS (3rd ed.) give an algorithm for $O(n)$ worst case arbitrary order statistic of $n$ distinct Read More …
Category: Uncategorized
[Solved]: When describing a CS paper, can it be assumed that the meaning of “tick” is known?
Problem Detail: I thinkt this question fits better here than on english.stackexchange. When describing a figure in a computer science paper, is it safe to use “tick” meaning “tick mark”? Examples: … (see the thick line right of tick “17”) meaning Read More …
[Solved]: NP completeness of closest vector problem
Problem Detail: Let $mathcal{B} = {v_1,v_2,ldots,v_k} in mathbb{R}^n$ be linearly independent vectors. Recall that the integer lattice of $mathcal{B}$ is the set $L(mathcal{B})$ of all linear combinations of elements of $mathcal{B}$ using only integers as coefficients. That is $$L(mathcal{B}) = { Read More …
[Solved]: When should you disable all interrupts in a program?
Problem Detail: Consider a machine that has nested interrupts (a higher priority interrupt can interrupt a lower priority one, the current instruction’s address is saved and later restored). Why would a programmer want to disable all interrupts using instructions like x86’s Read More …
[Solved]: Maxima of diagonals in a column wise and row wise sorted matrix
Problem Detail: Let ${a_i}$ and ${b_i}$ be non-decreasing sequences of non-negative integers. How fast can one find $$c_j=max_{0 leq i< j}{a_i+b_{j-i-1}}$$ for all $0leq jleq n-1$? Naively, it takes $O(n^2)$ time, but I’m hoping monotonicity can help here. It’s easy to Read More …
[Solved]: Proving a function is uncomputable
Problem Detail: I am trying to solve the following problem: For each Turing machine $M_k$ and each string $x$ in ${$0,1$}$$^ast$ let $time_k(x)$ = ${$the number of steps executed by $M_k(x)$ if $M_k(x)$$downarrow$ (halts), and $infty$ if $M_k(x)$$uparrow$ (does not halt)$}$ Read More …
[Solved]: Why is FACTOR in Co-NP?
Problem Detail: I’m having trouble wrapping my head around the problems PRIME, COMPOSITE, FACTOR and how they’re related in terms of complexity. I understand that PRIME has been shown to be in $P$ by the AKS primality test, and I believe Read More …
[Solved]: Which fixpoint is Haskell list type?
Problem Detail: Let’s say that lists are defined as List a = Nil | Cons a (List a) Then, in Haskell is List x the greatest or least fixpoint? I’m asking because the lfp should exclude infinite lists (but you can Read More …
[Solved]: Language to Construct Finite State Transducer
Problem Detail: I am attempting to write a Finite State Transducer module in OCaml, because I think it’s a good exercise, which is because I have been teaching myself Natural Language Processing. You typically construct finite automata using regular expressions, for Read More …
[Solved]: Structural induction over list
Problem Detail: I want to prove that unique(reverse(L)) = reverse(unique(L)) where L is a List. List has the following constructors: [] : -> List [e] : Element -> List cons(e, L) : Element x List -> List I defined unique and Read More …