Problem Detail: I’m referring to regular expressions as language: begin{equation*} Sigma = { “a”, “b”, “(“, “)”, “*”, … } end{equation*} and begin{equation*} L = Sigma^* text{, which form a legal regular expression} end{equation*} I am not referring to their computational Read More …
Category: Uncategorized
[Solved]: Number of digits in a binary product
Problem Detail: Assume i have 2 numbers in binary form (or, more precisely, assume to know the number of their digits, DF1, DF2): 101010101001010101010101010111111111111111111111010101 10101111111111111111010101 Is there a formula for the exact number of binary digits (DP) of the product? DP Read More …
[Solved]: Does NP-completeness require to find the solution?
Problem Detail: In the paper “Computing Equilibria:A Computational Complexity Perspective” by Tim Roughgarden, they consider the problem: Problem 2.1 (Clique). Given a graph $G = (V, E)$ and an integer $k$: if there is a set $K ⊆ V$ with $|K| Read More …
[Solved]: Cost of partitioning in quicksort
Problem Detail: I’m reading “Algorithms Fourth Edition” by Sedgewick & Wayne and am wondering if I have spotted an error in the book or if I just can’t wrap my head around something so simple. When talking about the complexity of Read More …
[Solved]: Is it decidable whether a Turing machine will ever leave the start state on any input?
Problem Detail: Is $L={ M | Mtext{ leaves the start state on every input}}$ decidable? I have an intuition that the following language is undecidable, since the complement $L^C$ seems to not be recursively enumerable. Some TM might remain on the Read More …
[Solved]: Why can’t we round results of linear programming to get integer programming?
Problem Detail: If linear programming suggests that we need $2.5$ trucks to deliver goods, why can’t we round up and say $3$ trucks are needed? If linear programming suggests we can afford only $3.7$ workers, then why can’t we just Read More …
[Solved]: Understanding hashtable performance in the worst-case
Problem Detail: Under assumption that the hash function is uniform, we have worst-case performance for the search operation in a separate-chaining (e.g. java.util.HashMap) hashtable $O(log n)$. Why? I cannot really understand this. If we have a uniformly-distributed hash values it should Read More …
[Solved]: How can I prepare for CS in university
Problem Detail: How can I prepare for an introductory CS college course? I am currently in Grade 12 and next year I will be studying Computer Science at a university in South Africa (syllabus is here). However CS has a very Read More …
[Solved]: I know Binary Search is more efficient than Ternary search, but my results are opposite. Help interpreting results?
Problem Detail: I have a piece of code that applies recursive Binary and Ternary searches on sorted arrays of increasing size, i.e. 500, 1000, 2000, 4000, etc. The entire code segment is about 200 lines so I’ve been forced to upload Read More …
[Solved]: References on teaching introductory programming courses
Problem Detail: As the new semester starts soon, I am interested in research regarding the teaching of introductory programming courses. I would like to improve my university course and I am looking for scientific papers on that topic. One trend I Read More …