Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged dynamic-programming
0
votes
0
answers
91
General Topic Doubt: Algorithms - Dynamic Programming
Read the following statements about 0/1 Knapsack problem. (i) Time complexity of Knapsack is O(n* W) where W is the weight of the Knapsack and there are n items. (ii) Time complexity of Knapsack is min( O(n*W) , O(2^n) ) where W is the weight of the ... ) and (iii) is true (ii) and (iii) is true (i) ( iii) (iv) is true (ii) (iii) (iv) is true.
Read the following statements about 0/1 Knapsack problem.(i) Time complexity of Knapsack is O(n* W) where W is the weight of the Knapsack and there are n items.(ii) Time ...
VIKAS TIWARI
1.1k
views
VIKAS TIWARI
asked
Dec 13, 2017
Algorithms
algorithms
dynamic-programming
knapsack-problem
general-topic-doubt
+
–
1
votes
1
answer
92
Greedy vs Dynamic
Unlike greedy algorithms, dynamic programming method always provide correct/optimal solution. Is the above statement correct?
Unlike greedy algorithms, dynamic programming method always provide correct/optimal solution.Is the above statement correct?
Tuhin Dutta
6.3k
views
Tuhin Dutta
asked
Dec 13, 2017
Algorithms
algorithms
greedy-algorithm
dynamic-programming
+
–
2
votes
2
answers
93
Matrix Multiplications
Let $A1, A2, A3, A4, A5$ be five matrices of dimensions $2\times3, 3\times5, 5\times2, 2\times4, 4\times3$ respectively. The minimum number of scalar multiplications required to find the product $A1, A2 ,A3, A4, A5$ using the basic matrix multiplication method is_______
Let $A1, A2, A3, A4, A5$ be five matrices of dimensions $2\times3, 3\times5, 5\times2, 2\times4, 4\times3$ respectively. The minimum number of scalar multiplications requ...
Parshu gate
3.2k
views
Parshu gate
asked
Dec 10, 2017
Algorithms
matrix-chain-ordering
dynamic-programming
algorithms
+
–
0
votes
1
answer
94
Dynamic programming
Parshu gate
637
views
Parshu gate
asked
Dec 5, 2017
Algorithms
algorithms
dynamic-programming
ace-test-series
+
–
1
votes
3
answers
95
Matrix chain multiplication
Which of the following is the recurrence relation for the matrix chain multiplication problem where p[i-1]*p[i] gives the dimension of the i^th matrix? dp[i,j]=1 if i=j dp[i,j]=min{dp[i,k]+dp[k+1,j]} dp[i,j]=1 if i=j dp[i,j]=min{dp[i,k]+dp[k+1,j]}+p[i-1]*p[k]*p[j] dp[i,j]= ... dp[i,j]=min{dp[i,k]+dp[k+1,j]} dp[i,j]=0 if i=j dp[i,j]=min{dp[i,k]+dp[k+1,j]}+p[i-1]*p[k]*p[j]
Which of the following is the recurrence relation for the matrix chain multiplication problem where p[i-1]*p[i] gives the dimension of the i^th matrix? dp[i,j]=1 if i=jd...
Parshu gate
4.3k
views
Parshu gate
asked
Nov 27, 2017
Algorithms
dynamic-programming
algorithms
matrix-chain-ordering
+
–
0
votes
1
answer
96
Knapsack problem
5.Consider the Knapsack instance with 5 objects and a capacity M=11, profit P=(5,4,7,2,3) and weight W=(4,3,6,2,2.). Solve it using dynamic programming approach.
5.Consider the Knapsack instance with 5 objects and a capacity M=11, profit P=(5,4,7,2,3) andweight W=(4,3,6,2,2.). Solve it using dynamic programming approach.
Syedabbas110
2.8k
views
Syedabbas110
asked
Oct 30, 2017
Algorithms
algorithms
knapsack-problem
dynamic-programming
+
–
2
votes
2
answers
97
CLRS Divide-and-Conquer Strassens's algorithm
Do we need to study the Strassens's algorithm in detail like proof or working of that algorithm or we just need to know the time complexity of the algorithm because I can't find it's explanation anywhere?
Do we need to study the Strassens's algorithm in detail like proof or working of that algorithm or we just need to know the time complexity of the algorithm because I can...
Manasi Srivastava
876
views
Manasi Srivastava
asked
Oct 9, 2017
Algorithms
algorithms
divide-and-conquer
dynamic-programming
+
–
5
votes
5
answers
98
Matrix Chain
Total no. of ways to perform matrix multiplication having 7 matrices is ? Total no. of ways to by which we could parenthesize 7 matrices is ? Does the above two questions are different or same ? Plz explain the answer.
Total no. of ways to perform matrix multiplication having 7 matrices is ?Total no. of ways to by which we could parenthesize 7 matrices is ?Does the above two questions ...
dragonball
15.4k
views
dragonball
asked
Oct 1, 2017
Algorithms
algorithms
dynamic-programming
+
–
0
votes
0
answers
99
DYNAMIC PROGRAMMING
Parshu gate
442
views
Parshu gate
asked
Sep 17, 2017
Algorithms
algorithms
dynamic-programming
graph-theory
+
–
0
votes
0
answers
100
dynamic programming
Parshu gate
257
views
Parshu gate
asked
Sep 17, 2017
Algorithms
dynamic-programming
algorithms
+
–
0
votes
1
answer
101
Dynamic Programming: How to Approach these type of recurrence problems in DP?
gateoverflow_
484
views
gateoverflow_
asked
Sep 11, 2017
Algorithms
dynamic-programming
recurrence-relation
ace-test-series
+
–
0
votes
0
answers
102
Floyd-warshall for longest path problem
I have few doubts related to Longest distance problem. From Wikipedia --> The NP-hardness of the unweighted longest path problem can be shown using a reduction from the Hamiltonian path problem: a graph G has a ... normal algorithm as asked in (https://stackoverflow.com/questions/42500120/floyd-warshall-for-longest-distance-for-undirected-graph)
I have few doubts related to Longest distance problem. From Wikipedia >The NP-hardness of the unweighted longest path problem can be shown using a reduction from the Ha...
Chhotu
2.5k
views
Chhotu
asked
Sep 8, 2017
Algorithms
graph-algorithms
dynamic-programming
+
–
0
votes
1
answer
103
dynamic programming
set2018
1.1k
views
set2018
asked
Aug 25, 2017
Algorithms
algorithms
dynamic-programming
+
–
1
votes
2
answers
104
algorithm
fib(n) { if(n==0) return 0; if(n==1) return 1; return(fib(n-1) + fib(n-2)); } for fib(4) the number of function calls by dynamic programmming is 7 and without dynamic programming is 9? am i wrong...if so correct me
fib(n){if(n==0)return 0;if(n==1)return 1;return(fib(n-1) + fib(n-2));}for fib(4) the number of function calls by dynamic programmming is 7and without dynamic programming ...
A_i_$_h
549
views
A_i_$_h
asked
Jul 25, 2017
Algorithms
recurrence-relation
dynamic-programming
+
–
1
votes
1
answer
105
algorithm
Number of ways we can perform matrix multiplication and number of ways a matrix can be parenthesized means the same?
Number of ways we can perform matrix multiplicationandnumber of ways a matrix can be parenthesized means the same?
A_i_$_h
311
views
A_i_$_h
asked
Jul 25, 2017
Algorithms
algorithms
dynamic-programming
+
–
1
votes
1
answer
106
algorithm
travelling salesman problem is based on a) dynamic programming b)greedy method c)recursive approach d)divide and conquer
travelling salesman problem is based ona) dynamic programmingb)greedy methodc)recursive approachd)divide and conquer
A_i_$_h
1.3k
views
A_i_$_h
asked
Jul 24, 2017
Algorithms
travelling-salesman-problem
algorithm-design
dynamic-programming
+
–
0
votes
1
answer
107
Syllabus Related
Are 'Longest Common Palindromic Subsequence' and 'Longest monotonically Increasing Subsequence' in Gate syllabus??
Are 'Longest Common Palindromic Subsequence' and 'Longest monotonically Increasing Subsequence' in Gate syllabus??
atul_21
293
views
atul_21
asked
Jun 22, 2017
Algorithms
dynamic-programming
+
–
1
votes
1
answer
108
algorithm
is sum of subset problem is there in the gate cse syllabus ?
is sum of subset problem is there in the gate cse syllabus ?
akankshadewangan24
382
views
akankshadewangan24
asked
Jun 19, 2017
Algorithms
dynamic-programming
+
–
3
votes
1
answer
109
Longest Common Subsequence
For finding longest common subsequence(LCS), standard sources mention that the recursive procedure consisting of the recursive tree occupies O(m+n) space( WITHOUT applying Dynamic Programming). I am unable to understand why is space occupied O(m+n)? Consider the tree of LCS(3 ... value of2^ k = O(m+n) and hence, space should be k=log(m+n). What's wrong with my logic?
For finding longest common subsequence(LCS), standard sources mention that the recursive procedure consisting of the recursive tree occupies O(m+n) space( WITHOUT applyin...
Bongbirdie
1.4k
views
Bongbirdie
asked
May 17, 2017
Algorithms
algorithms
longest-common-subsequence
dynamic-programming
+
–
1
votes
4
answers
110
difference between dynamic programming and divide and conquer technique is
What is the difference between dynamic programming and divide and conquer technique,
What is the difference between dynamic programming and divide and conquer technique,
LavTheRawkstar
6.2k
views
LavTheRawkstar
asked
Apr 17, 2017
Algorithms
divide-and-conquer
algorithms
dynamic-programming
programming
+
–
0
votes
1
answer
111
coremen
what is difference between divide and conquer and dynamic programming?
what is difference between divide and conquer and dynamic programming?
shebya nautiyal
1.4k
views
shebya nautiyal
asked
Apr 5, 2017
Algorithms
divide-and-conquer
dynamic-programming
+
–
2
votes
2
answers
112
Dynamic Programming
Find an optimal parenthesization of a matrix-chain product whose sequence of di-mensions <5,10,3,12,5,50,6>.
Find an optimal parenthesization of a matrix-chain product whose sequence of di-mensions<5,10,3,12,5,50,6>.
saurabh rai
4.3k
views
saurabh rai
asked
Mar 21, 2017
Algorithms
algorithms
dynamic-programming
+
–
0
votes
0
answers
113
MadeEasy Subject Test: Algorithms - Dynamic Programming
sushmita
325
views
sushmita
asked
Mar 15, 2017
Algorithms
made-easy-test-series
algorithms
dynamic-programming
+
–
2
votes
1
answer
114
Self Framed
Whats the minimum number of multiplications required to compute $x^{7}$ * $x^{17}$ for any given integer value of 'x' ? A) 4 B) 5 C) 6 D) 7
Whats the minimum number of multiplications required to compute$x^{7}$ * $x^{17}$ for any given integer value of 'x' ?A) 4B) 5C) 6D) 7
Sushant Gokhale
448
views
Sushant Gokhale
asked
Feb 21, 2017
DS
dynamic-programming
+
–
2
votes
1
answer
115
Algorithm
Supremo
466
views
Supremo
asked
Jan 19, 2017
Algorithms
algorithms
dynamic-programming
recurrence-relation
numerical-answers
test-series
+
–
1
votes
1
answer
116
time complexity
given a N-bit string. what is the time complexity to find out all subsets of that string which is parlindrome?
given a N-bit string.what is the time complexity to find out all subsets of that string which is parlindrome?
Rajnish Kumar
936
views
Rajnish Kumar
asked
Jan 17, 2017
Algorithms
time-complexity
dynamic-programming
+
–
3
votes
2
answers
117
What is the general idea to approach to problems in Dynamic Programming ?
Could someone tell me What is the general idea to approach to problems in Dynamic Programming ? ie. Given a problem How do I start my thinking :P , Im not getting a clue to deal with DP problems . Making Recursive Equations etc ... would give us 25, 10, 5, but the best solution only requires 2 coins - 2 of the 20 cent coins
Could someone tell me What is the general idea to approach to problems in Dynamic Programming ?ie. Given a problem How do I start my thinking :P , Im not getting a clue t...
Dulqar
1.2k
views
Dulqar
asked
Jan 6, 2017
Algorithms
algorithms
dynamic-programming
+
–
2
votes
1
answer
118
MadeEasy Subject Test: Algorithms - Dynamic Programming
Lucky sunda
1.2k
views
Lucky sunda
asked
Jan 3, 2017
Algorithms
made-easy-test-series
algorithms
dynamic-programming
+
–
1
votes
2
answers
119
CMI2016-B-6
An automatic spelling checker works as follows. Given a word $w$, first check if $w$ is found in the dictionary. If $w$ is not in the dictionary, compute a dictionary entry that is close to $w$. For instance if the user types $\mathsf{ocurrance}$, the spelling checker ... alignments of $x$ and $y$. What is the running time of your algorithm (in terms of the lengths of $x$ and $y)?$
An automatic spelling checker works as follows. Given a word $w$, first check if $w$ is found in the dictionary. If $w$ is not in the dictionary, compute a dictionary ent...
go_editor
807
views
go_editor
asked
Dec 31, 2016
Algorithms
cmi2016
dynamic-programming
algorithm-design
descriptive
+
–
1
votes
2
answers
120
Virtual Gate Test Series: Algorithms - Matrix Chain Ordering
Consider the following chain of matrices $A_{1}$ to $A_{4}$ having dimensions given below $A_{1}\rightarrow 2\times 3$ $A_{2}\rightarrow 3\times 5$ $A_{3}\rightarrow 5\times 4$ $A_{4}\rightarrow 4\times 2$ The following table is filled ... of scalar multiplications$:$ What are the values of $P$ and $Q?$ $60,140$ $60,82$ $60,40$ $60,92$
Consider the following chain of matrices $A_{1}$ to $A_{4}$ having dimensions given below$A_{1}\rightarrow 2\times 3$$A_{2}\rightarrow 3\times 5$$A_{3}\rightarrow 5\times...
firki lama
1.2k
views
firki lama
asked
Dec 29, 2016
Algorithms
algorithms
dynamic-programming
matrix-chain-ordering
virtual-gate-test-series
+
–
Page:
« prev
1
2
3
4
5
6
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register