Problem Detail: I’m currently watching a video on the analysis of Krager’s Algorithm, and I am confused about something. The analysis goes as follows: Fix a min cut $(A,B)$. Let $k$ = # of edges crossing $(A,B)$ , these edges will Read More …
Author: ignougroup
[Solved]: How to iterate through all values of an array?
Problem Detail: I’m trying to implement a brute-force algorithm. If I have one variable x, I can iterate through all its values using a for loop: for x in {1,2,..,MAX}: do something with x But what if I have an array Read More …
[Solved]: Tile Problem : Dynamic Programming
Problem Detail: Came across the following tile problem : Given a “2 x n” board and tiles of size “2 x 1″, count the number of ways to tile the given board using the 2 x 1 tiles. A tile can Read More …
[Solved]: Finding a certain prefix of a string
Problem Detail: Let $Sigma = { sigma_1 , …, sigma_t }$ and let $S$ be a string from $Sigma^*$. Denote: $n=|S|$, that is $S$ has $n$ letters. I’d like to find the shortest prefix $T$ of $S$ such that $S$ is Read More …
[Solved]: How to prove P ⊆ Co-NP
Problem Detail: My approach Let L ∈ P $exists$ Turing Machine $M_1$ which decides L. We can easily construct $M_2$ which decides $bar{L}$ $bar{L}$ ∈ CO-NP $implies$ P ⊆ Co-NP I’m not sure whether its a correct way to prove this Read More …
[Solved]: Why it is nearly impossible to have an approximation algorithm for Maximum Clique problem?
Problem Detail: I read a theorem which states that: If there exists a polynomial time approximation algorithm for solving the Maximum Clique problem (or the Maximum Independent Set problem) for any constant performance ratio r, then NP = P. But I Read More …
[Solved]: Monetary computations theory (manual/textbook)
Problem Detail: My problem is due to the fact that I am manipulating a set of amounts that span over some intervals of time (start date/end date) and that are rounded to cents. I have to multiply each of them by Read More …
[Solved]: Naive Bayes MapReduce
Problem Detail: I have the following question to answer in a MapReduce assignment sheet The Naive Bayes classifier is a widely-used tool for analyzing data. Consider a data set that has $n$ data items, each of which has the same $m+1$ Read More …
[Solved]: If the Halting Problem was solvable, and we solved it, what would be its implications?
Problem Detail: Perhaps a way to better understand the Halting Problem’s importance is to know what would happen or what could be possible if this was solved. What would be the Halting Problem’s implications in today’s technology, mathematics and its practical Read More …
[Solved]: DLOGTIME complexity class and testing the length of the input string
Problem Detail: I read that testing the length of the input string is in DLOGTIME. The question is how can testing the length of the input string be in DLOGTIME? $text{DLOGTIME} = O(log n)$, so what number would be in $n$? Read More …