Problem Detail: For example if $$ f(x)= Theta (g(x)) $$ from the definition of the theta notation, there exist c1 and c2 constants such that $$c_1 g(x) le f(x) le c_2 g(x)$$ then if only we took the constants $1/c_1$ and Read More …
Blog
[Solved]: Analyzing programs with multiple for-loops
Problem Detail: If they were all linked to make a condition such as ($1 < i < j < k < n$), I know how to solve, but the last loop is disconnected so I have no clue on how to Read More …
[Solved]: Interval scheduling scheduling problem with minimal workers
Problem Detail: I am writing a greedy algorithm for a variation of the interval scheduling problem that I haven’t seen before. I have a set of jobs, each with start and finish time. All jobs in set must be assigned to Read More …
[Solved]: Where is Program Counter (PC) stored?
Problem Detail: Where is program counter stored? CPU caches? Also how big are these counters? What happens if that memory has been filled up? I know that it’s a value that stores the next instruction for the CPU to process, as Read More …
[Solved]: Number of ways to fill a 2xN grid with M colors
Problem Detail: This question was asked in the onsite regionals for ACM ICPC 2013 at Amritapuri. In short, the question asked to find the number of ways to fill a $ 2times N$ grid with $M$ colors such that no two Read More …
[Solved]: What’s flawed about the “save-the-input” method of reversible computing?
Problem Detail: I’m an undergraduate just beginning to read about reversible computing. I know that, because of Landauer’s principle, irreversible computations dissipate heat (and reversible ones do not). I brought it up with my professor, who had never heard of reversible Read More …
[Solved]: Understanding reductions: Would a polynomial time algorithm for one NP-complete problem mean a polynomial time algorithm for all NP-complete problems?
Problem Detail: To prove that some decision problem $A$ is NP-complete, my understanding is that it suffices to show that the problem is in NP (i.e. that one can verify or reject all statements in polynomial time), and to demonstrate that Read More …
[Solved]: How many shortest distances change when adding an edge to a graph?
Problem Detail: Let $G=(V,E)$ be some complete, weighted, undirected graph. We construct a second graph $G'=(V, E')$ by adding edges one by one from $E$ to $E'$. We add $Theta(|V|)$ edges to $G'$ in total. Every time we add one edge Read More …
[Solved]: Negation of nested quantifiers
Problem Detail: The problem is: $$exists x forall y (x ge y)$$ With a domain of all real positive integers. The negation is: $$forall x exists y (x < y)$$ so, if $y = x + 1$, the negation is true. Read More …
[Solved]: Find maximum distance between elements given constraints on some
Problem Detail: I have a list of numbered elements 1 to N that fit into positions on a number line starting with 1. I also have constraints for these elements: The element 1 is in position 1, and element N must Read More …