Problem Detail: We are going over the pumping lemma in class and we recently went over the following example: Let $$ L = { w mid w text{ has a different number of 0s and 1s} } $$ Consider $$ s Read More …
Blog
[Solved]: Why does Schaefer’s theorem not prove that P=NP?
Problem Detail: This is probably a stupid question, but I just don’t understand. In another question they came up with Schaefer’s dichotomy theorem. To me it looks like it proves that every CSP problem is either in P or in NP-complete, Read More …
[Solved]: How to explain the steps in the implementation of hashing functions like SHA1
Problem Detail: I was reading the article about the SHA1 hashing function (I know it is not secure anymore) and I’ve found a pseudocode implementation on Wikipedia. I can see that there are a lot of mathematical operations, and what I Read More …
[Solved]: Clever memory management with constant time operations?
Problem Detail: Let’s consider a memory segment (whose size can grow or shrink, like a file, when needed) on which you can perform two basic memory allocation operations involving fixed size blocks: allocation of one block freeing a previously allocated block Read More …
[Solved]: What are examples of inconsistency and incompleteness in Unix/C?
Problem Detail: In Richard Gabriel’s famous essay The Rise of Worse is Better, he contrasts caricatured versions of the MIT/Stanford (Lisp) and New Jersey (C/Unix) design philosophies along the axes of simplicity, correctness, consistency, and completeness. He gives the example of Read More …
[Solved]: How to read typing rules?
Problem Detail: I started reading more and more language research papers. I find it very interesting and a good way to learn more about programming in general. However, there usually comes a section where I always struggle with (take for instance Read More …
[Solved]: Undecidability of the following language
Problem Detail: So we can prove that the language say $A = { langle M,w rangle mid text{M is TM that accepts } w^R text{ whenever it accepts } w }$ is undecidable by assuming it is decidable and use that Read More …
[Solved]: Advantage of MTZ problem formulation of TSP
Problem Detail: In class, we saw the Miller-Tucker-Zemlin formulation of the Travelling Salesmen Problem (TSP). MTZ is a way of formulating the TSP as an integer linear programming instance. I understand how MTZ works, but I’m confused why MTZ is considered Read More …
[Solved]: Context-free language and regular expressions
Problem Detail: I have the following context-free language: S -> ASa | b A -> aA | a I don’t understand why this is not regular. I first said that it’s generated by the regular expression a+ba+. The following is regular Read More …
[Solved]: Number of words of a given length in a regular language
Problem Detail: Is there an algebraic characterization of the number of words of a given length in a regular language? Wikipedia states a result somewhat imprecisely: For any regular language $L$ there exist constants $lambda_1,,ldots,,lambda_k$ and polynomials $p_1(x),,ldots,,p_k(x)$ such that for Read More …