Problem Detail: A friend of mine actually asked me a very interesting computer science related question, and I have been stuck on it for a long time. The problem is: you have to travel $1000$ km. The only gas station is Read More …
Category: Uncategorized
[Solved]: Proving that the language of TMs with finite left head moves is undecidable
Problem Detail: I’m trying to prove that the following language is undecidable:$$ { langle M, w rangle ~|~ M text{ is a TM where its head moves left a finite number of times on } w } $$ But I’m having Read More …
[Solved]: Are there languages generated by linear grammar which aren’t regular?
Problem Detail: Are there languages generated by linear grammer which aren’t regular? Asked By : Iancovici Answered By : Shaull Of course. Look at the first example on Wikipedia: $qquad S to aSb mid varepsilon$ is linear and generates ${a^nb^n mid n in Read More …
[Solved]: Is this language defined using twin primes regular?
Problem Detail: Let $qquad L = {a^n mid exists_{p geq n} p,, p+2 text{ are prime}}.$ Is $L$ regular? This question looked suspicious at the first glance and I’ve realized that it is connected with the twin prime conjecture. My problem Read More …
[Solved]: Why does merging two sorted arrays take 2N – 1 comparisons?
Problem Detail: A friend of mine asked me a question on how to prove that merging two sorted arrays requires at least 2N – 1 comparisons Prove that merging two sorted arrays of N items requires at least 2N-1 comparisons. /* Read More …
[Solved]: Number of possible programs in a language
Problem Detail: Is the number of possible programs usually finite or infinite? I’m playing with the idea of generating all possible programs for a language – is that even a finite number or must we be more specific, finite RAM etc? Read More …
[Solved]: Show that the halting problem is decidable for one-pass Turing machines
Problem Detail: $L={<!M,x!>, mid M’s text{ transition function can only move right and } Mtext{ halts on } x }$. I need to show that $L$ is recursive/decidable. I thought of checking the encoding of $M$ first and determine whether its Read More …
[Solved]: If NP is not a proper subset of coNP, why does NP not equal coNP?
Problem Detail: I am studying some lecture notes on the complexity of algorithms. The notes give a proof that NP is not a proper subset of coNP. However, they still assert that NP is a subset of coNP (which I agree Read More …
[Solved]: Why do the swap step in Prim’s algorithm for minimum spanning trees?
Problem Detail: I was watching the video lecture from MIT on Prim’s algorithm for minimum spanning trees. Why do we need to do the swap step for proving the theorem that if we choose a set of vertices in minimum spanning Read More …
[Solved]: Complexity of GF(2) and applications to cryptography
Problem Detail: If I have a system of N polynomial equations with N unknowns in GF(2): What are some good methods to solve them? What’s the highest value of N that can be reasonable solved? Now, my root interest isn’t GF, Read More …