Problem Detail: I have a question whether or not CSS and HTML are regular languages. I believe CSS is a regular language, since it should be possible to create a regular expression to match the structure of CSS. However, I believe Read More …
Blog
[Solved]: How asymptotically bad is naive shuffling?
Problem Detail: It’s well-known that this ‘naive’ algorithm for shuffling an array by swapping each item with another randomly-chosen one doesn’t work correctly: for (i=0..n-1) swap(A[i], A[random(n)]); Specifically, since at each of $n$ iterations, one of $n$ choices is made (with Read More …
[Solved]: NP-hard proof: Polynomial time reduction
Problem Detail: As I understand, to show that a certain problem $P$ is NP-hard we can reduce a known NP-hard problem $Q$ to a problem in $P$. This reduction, say $f$, has to be polynomial time. Could someone please explain is Read More …
[Solved]: Clarification with Kuhn-Munkres/Hungarian Algorithm
Problem Detail: I have been attempting to get my mind around the Kuhn-Munkres/Hungarian Algorithm. I have been using the following statement of the algorithm which I found here. Based on my readings on the algorithm, my understanding is that the improvement Read More …
[Solved]: How fundamental are matroids and greedoids in algorithm design?
Problem Detail: Initially, Matroids were introduced to generalize the notions of linear independence of a collection of subsets $E$ over some ground set $I$. Certain problems that contain this structure permit greedy algorithms to find optimal solutions. The concept of Greedoids Read More …
[Solved]: Proving that {0^{2^k}} is not regular with the Myhill-Nerode theorem
Problem Detail: My language is the repetition of 0 to a length that’s a power of 2: $L = { 0^k ni k=2^n, n geq 1 }$ I want to know how to prove that this language is not regular. I Read More …
[Solved]: Ray Tracing versus object-based rendering?
Problem Detail: Intro graphics courses usually have a project that asks you to build a ray tracer to render a scene. Many graphics students entering grad school say that they want to work on ray tracing. And yet it seems that Read More …
[Solved]: Do Kleene star and complement commute?
Problem Detail: I am having hard time solving the following problem. Are there any languages for which $$ overline{L^*} = (overline{L})^* $$ Assuming $emptyset^* = emptyset$, if I consider $Sigma = {a}$ and L = $Sigma^*$, I get that $L^* = Read More …
[Solved]: Why is it that every k-tape Turing machine has a 1-tape TM that runs in $O(t^2(n))$?
Problem Detail: Apparently, for every k-tape Turing machine that runs in time $O(t(n))$, there exists a 1-tape Turing machine that runs in $O(t^2(n))$. I can see how any multi-tape machine $M$ can be simulated by a 1-tape machine $S$. Just have Read More …
[Solved]: Finding vertices for which there either exists a path to all other vertices or other vertices have a path to them
Problem Detail: Or in other words, find all $v in V$ such that there exists a path $forall w in V$ $v rightarrow w$ or $w rightarrow v$. This is for a directed acyclic graph. I need to find an $O(|E| Read More …