Problem Detail: I’m still a bit confused with the terms “input length” and “input size” when used to analyze and describe the asymptomatic upper bound for an algorithm Seems that input length for the algorithm depends a lot of the kind Read More …
Category: Uncategorized
Artificial Intelligence: Condition for BFS being optimal
Problem Detail: It is said in the book Artificial Intelligence: A Modern Approach for finding a solution on a tree using BFS that: breadth-first search is optimal if the path cost is a nondecreasing function of the depth of the node. Read More …
Is every NP-hard problem computable?
Problem Detail: Is it required that a NP-hard problem must be computable? I don’t think so, but I am not sure. Asked By : Kevin Meier Answered By : jmite No, an $NP$-hard problem need not be computable. The definition is fairly complete: Read More …
Prove transitivity of big-O notation
Problem Detail: I’m doing a practice question (not graded HW) to understand mathematical proofs and their application to Big O proofs. So far, however, the very first problem in my text is stumping me wholly. Suppose $f(n) = O(g(N))$ and $g(n) Read More …
Variant of the knapsack problem
Problem Detail: How would you approach the knapsack problem in a dynamic programming situation if you now have to limit the number of item in the knapsack by a constant $p$ ? This is the same problem (max weight of $W$, Read More …
Potential function binary heap extract max O(1)
Problem Detail: I need help figuring the potential function for a max heap so that extract max is completed in $O(1)$ amortised time. I should add that I do not have a good understanding of the potential method. I know that Read More …
Why is the A* search heuristic optimal even if it underestimates costs?
Problem Detail: A* search finds optimal solution to problems as long as the heuristic is admissible which means it never overestimates the cost of the path to the from any given node (and consistent but let us focus on being admissible Read More …
Can someone show me step-by-step how to calculate the primitive operations of this algorithm?
Problem Detail: See the example algorithm below from my course notes, I don’t follow the operation counting in the inner loop. Can someone walk me through this step-by-step? Here’s the algorithm: Algorithm PrefixAverages1(A, n): Input: An integer array A of size Read More …
Difference between Normative annexes and Informative annexes in ADA 95
Problem Detail: I was reading the ADA 95 reference manual. I came across these two words in annexes Normative and informative . I couldnt find the difference between those. Your help will be much appreciated. Asked By : Proton Boss Answered By Read More …
How to show that given language is unambiguous
Problem Detail: Given following grammar: $$ begin{align} S rightarrow &A1B A rightarrow & 0A mid varepsilon B rightarrow & 0B mid 1B mid varepsilon end{align} $$ How can I show that this grammar is unambiguous? I need to find a grammar Read More …