Problem Detail: This is part of a larger problem, which I believe I have reduced to this. Given a tree $T$ having positive edge weights, and $k$ leaves (nodes which have exactly one connected node), I need to delete some edges Read More …
Blog
[Solved]: Time complexity of generating the first n primes and their product
Problem Detail: Suppose that I have a turing machine that receives as input the string $1^{ntimes n}$ (unary input), what is the time complexity of writing $p_1,…,p_n$ on the output tape, where $p_i$ is the i-th prime number (written in binary)? Read More …
[Solved]: Why is binary subtraction referred to as the invert-add-shift-add method?
Problem Detail: I’m being asked this question for my computer conceptes class, can’t find anything about this in my text book, and have only been able to find half-baked answers googling it. Why is binary subtraction referred to as the invert-add-shift-add Read More …
[Solved]: sock matching algorithm
Problem Detail: There are $n$ pairs of socks, all different. They all went out of the dryer, so there are now $2n$ socks scattered around. Given two socks, the only operation I can do is to decide whether they are identical Read More …
[Solved]: Find k nearest neighbors on a sphere
Problem Detail: Given a set $S$ of $N$ points on a sphere, and another point $P$ on the sphere, I want to find the $k$ points in $S$ that are the closest (Euclidean or great circle distance). I’m willing to do Read More …
[Solved]: Turing Machine that computes maximum steps of halting machines
Problem Detail: Suppose that $TM_{halting}$ is the set of machines that halt. Given a number of states $m$ and a length $n$ of the input, let $f(m,n)$ be the maximum number of steps a machine with $m$ states in $TM_{halting}$ can Read More …
[Solved]: Language for teaching basic programming
Problem Detail: I’m interesting in teaching programming to middle school students. I’d like a programming language with the following criteria: Simple – pared down to the absolute minimum needed to support sophisticated programming without too much code. As such, for this Read More …
[Solved]: Halting problem without self-reference
Problem Detail: In the halting problem, we are interested if there is a Turing machine $T$ that can tell whether a given Turing machine $M$ halts or not on a given input $i$. Usually, the proof starts assuming such a $T$ Read More …
[Solved]: How do I show that a DFA accepts only one word?
Problem Detail: I want to show that $qquaddisplaystyle O = {M : M text{ is a DFA}, |L(M)| = 1}$. Here $|L(M)|=1$ means the DFA contains only one state. I really don’t know where to get started in this problem. Should Read More …
[Solved]: Showing that minimal vertex deletion to a bipartite graph is NP-complete
Problem Detail: Consider the following problem whose input instance is a simple graph $G$ and a natural integer $k$. Is there a set $S subseteq V(G)$ such that $G – S$ is bipartite and $|S| leq k$? I would like to Read More …