Problem Detail: I’m learning about undecidability, and found this question: Is this language decidable, make a proof: L = { M : machine M halts for every input of length not exceeding 100 } Update: This is translated from an exam Read More …
Category: Uncategorized
Counting Inversions Using Merge Sort
Problem Detail: In Corman, Introduction To Algorithms, 3rd edition, question 2-4 it asks to count the number of inversions in a list of numbers in $theta( n lg n )$ time. He uses a modified Merge Sort to accomplish this. However, Read More …
Getting parallel items in dependency resolution
Problem Detail: I have implemented a topological sort based on the Wikipedia article which I’m using for dependency resolution, but it returns a linear list. What kind of algorithm can I use to find the independent paths? Asked By : Masse Answered Read More …
The stable marriage algorithm with asymmetric arrays
Problem Detail: I have a question about the stable marriage algorithm, for what I know it can only be used when I have arrays with the same number of elements for building the preference and the ranking matrices. For example if Read More …
What are flops and how are they benchmarked?
Problem Detail: Apple has just proudly stated that their new mac pro will be able to give up to 7 teraflops of computing power. Flops stands for Floating Point Operations Per Second. How exactly is this benchmarked though? Certain floating point Read More …
Reduce Vertex cover to SAT
Problem Detail: I need to reduce the vertex cover problem to a SAT problem, or rather tell whether a vertex cover of size k exists for a given graph, after solving with a SAT solver. I know how to reduce a Read More …
Intro to Martin-Löf type theory
Problem Detail: What would be the best introduction to Per Martin-Löfs ideas about type theory? I’ve looked at some lectures from the Oregon PL summer school, but I’m still sort of puzzled by the following question: What is a type? I Read More …
Is the language that accepts strings concatenated with their reverse regular?
Problem Detail: If the set of regular languages is closed under the concatenation operation and is also closed under the reverse operation ($x^R$ is the reverse of $x$) then is the language generated by $${ww^R|winSigma^*}$$ for some input alphabet $Sigma$, also Read More …
Math in computer science is hard?
Problem Detail: I am in High School (P.R.) and I am a regular person in math. Should I try computer science? Asked By : Lean Answered By : Yuval Filmus This is a very subjective question, but generally speaking, a computer science degree Read More …
Space complexity analysis of binary recursive sum algorithm
Problem Detail: I was reading page 147 of Goodrich and Tamassia, Data Structures and Algorithms in Java, 3rd Ed. (Google books). It gives example of linear sum algorithm which uses linear recursion to calculate sum of all elements of the array: Read More …