Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged knapsack-problem
0
votes
1
answer
1
Dynamic Programming
int max(int a, int b) { return (a > b) ? a : b; } // Returns the maximum value that can be // put in a knapsack of capacity W int knapSack(int W, int wt[], int val[], int n) { // Base Case if (n == 0 || W == 0) return 0; // If ... , wt, val, n - 1), knapSack(W, wt, val, n - 1)); } This statement implies that the max value return by the two different recursive problems right?
ryandany07
asked
in
Algorithms
Aug 18
by
ryandany07
185
views
algorithms
dynamic-programming
knapsack-problem
0
votes
1
answer
2
#aktu #aktu 2016-17
please provide the solution
Nitesh_Yadav
asked
in
Algorithms
Dec 29, 2021
by
Nitesh_Yadav
146
views
algorithms
knapsack-problem
0
votes
1
answer
3
Applied Test Series
Consider the following items with their associated weights and values. If a knapsack of capacity 25 units of weight is available and we are allowed to take either the item completely or leave it the maximum possible profit if we follow the greedy approach by being greedy about profit is _____
LRU
asked
in
Algorithms
Dec 28, 2021
by
LRU
682
views
test-series
knapsack-problem
algorithms
greedy-algorithm
0
votes
1
answer
4
Applied Test Series: Knapsack Problem
The following table givens the frequency of 4 letters in a database of text If Huffman encoding is used to encode the word “aaabca” the number of bits required for it is given by ______. Need help!
ramakrushna
asked
in
Operating System
Dec 25, 2021
by
ramakrushna
212
views
test-series
knapsack-problem
algorithms
0
votes
1
answer
5
Testbook Test Series
rsansiya111
asked
in
Algorithms
Dec 17, 2021
by
rsansiya111
147
views
testbook-test-series
greedy-algorithm
knapsack-problem
1
vote
1
answer
6
NIELIT Scientific Assistant A 2020 November: 64
Which of the following is a correct time complexity to solve the $0/1$ knapsack problem where $n$ and $w$ represents the number of items and capacity of knapsack respectively? $O(n)$ $O(w)$ $O(nw)$ $O(n+w)$
gatecse
asked
in
Algorithms
Dec 9, 2020
by
gatecse
276
views
nielit-sta-2020
algorithms
dynamic-programming
knapsack-problem
time-complexity
2
votes
2
answers
7
NIELIT 2016 DEC Scientist B (CS) - Section B: 7
The Knapsack problem belongs to which domain of problems? Optimization NP complete Linear Solution Sorting
Lakshman Patel RJIT
asked
in
Algorithms
Mar 31, 2020
by
Lakshman Patel RJIT
5.9k
views
nielit2016dec-scientistb-cs
algorithms
knapsack-problem
algorithm-design-techniques
0
votes
2
answers
8
NIELIT 2017 July Scientist B (IT) - Section B: 60
$0/1$-Knapsack is a well known problem where, it is desired to get the maximum total profit by placing $n$ items (each item is having some weight and associated profit) into a knapsack of capacity $W$. The table given below shows the weights and associated ... $19$ $18$ $17$ $20$
Lakshman Patel RJIT
asked
in
Algorithms
Mar 30, 2020
by
Lakshman Patel RJIT
1.9k
views
nielit2017july-scientistb-it
algorithms
greedy-algorithm
knapsack-problem
0
votes
0
answers
9
self doubt *0/1 knapsack problem*
In 0/1 knapsack problem ,suppose if maximum weight is given as W and we are asked to find out max profit then * IS IT NECESSARY THAT THE TOTAL WEIGHT SHOULD BE EXACTLY EQUAL TO W OR IT CAN BE LESS THAN W AS WELL????
karan25gupta
asked
in
Algorithms
Apr 17, 2019
by
karan25gupta
524
views
algorithms
dynamic-programming
knapsack-problem
0
votes
1
answer
10
self doubt
Can we solve fractional knapsack using dynamic programming?
DIYA BASU
asked
in
Algorithms
Feb 14, 2019
by
DIYA BASU
296
views
knapsack-problem
dynamic-programming
0
votes
0
answers
11
self_doubt
Is there any better approach to solve 0/1 knapsack problem other than tabular method ? as it consumes a lot of time when greater number of objects are given.
Shivam Kasat
asked
in
Algorithms
Jan 8, 2019
by
Shivam Kasat
290
views
algorithms
knapsack-problem
0
votes
1
answer
12
MadeEasyAlgo
Maximum profit using 0/1 Knapsack with W=200 is there any other than brute force method to solve this??? or we have to do only with tabular method?please solve and mention the way that is efficient w.r.t time if any.
Abhisek Tiwari 4
asked
in
Algorithms
Dec 24, 2018
by
Abhisek Tiwari 4
266
views
algorithms
dynamic-programming
knapsack-problem
numerical-answers
made-easy-booklet
0
votes
1
answer
13
Dynamic Programming
What is the best way to solve a 0/1 knapsack problem? Any trick to solve it without wasting much time? Not How to
CJ147
asked
in
Algorithms
Dec 3, 2018
by
CJ147
249
views
dynamic-programming
knapsack-problem
1
vote
1
answer
14
ACE TEST SERIES QUESTION
Shankar Kakde
asked
in
Algorithms
Oct 2, 2018
by
Shankar Kakde
174
views
knapsack-problem
algorithms
ace-test-series
0
votes
0
answers
15
Self doubt
How to solve fractional knapsack problem using heap ?
Prince Sindhiya
asked
in
Algorithms
Jul 22, 2018
by
Prince Sindhiya
115
views
algorithms
knapsack-problem
0
votes
1
answer
16
Time complexity analysis
What will be the time complexity if fractional knapsack is implemented using min heap instead of sorted array a) O(nlogn) b)O(n^2) c)O(n) d) none of these
Rohit Pandey
asked
in
Algorithms
Jun 27, 2018
by
Rohit Pandey
564
views
time-complexity
knapsack-problem
sorting
heap
0
votes
1
answer
17
Fractional Knapsack
Is fractional Kanpsack or knapsack problem in our GATE 2019 Syllabus
Na462
asked
in
Algorithms
Apr 30, 2018
by
Na462
426
views
knapsack-problem
0
votes
0
answers
18
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.
VIKAS TIWARI
asked
in
Algorithms
Dec 13, 2017
by
VIKAS TIWARI
728
views
algorithms
dynamic-programming
knapsack-problem
general-topic-doubt
0
votes
1
answer
19
Knapsack
The following Knapsack bag. The Knapsack bag maximum Capacity is 50. Find out the maximum profit for Fractional Knapsack. P Q R S T U V W Weight 18 12 16 14 16 20 10 15 Profit 34 15 22 16 17 22 18 26 90 80.25 85.50 91.2
Parshu gate
asked
in
Algorithms
Nov 17, 2017
by
Parshu gate
7.3k
views
algorithms
greedy-algorithm
knapsack-problem
1
vote
0
answers
20
techtud
In the knapsack problem we are given a set of n items, where each item i is specified by a size si and a value vi. We are also given a size bound S (the size of our knapsack). The goal is to find the subset of items of maximum total value such that sum of their sizes is at ... needed. It is already complete algorithm. (B) arr[S][n]= result; (C) arr[n][n]= result; (D) arr[n][S] = result;
Manoja Rajalakshmi A
asked
in
Algorithms
Nov 8, 2017
by
Manoja Rajalakshmi A
404
views
knapsack-problem
algorithms
2
votes
1
answer
21
knapsack problem what is answer to this anyone ??
sumit goyal 1
asked
in
Algorithms
Nov 7, 2017
by
sumit goyal 1
672
views
algorithms
knapsack-problem
test-series
0
votes
1
answer
22
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.
Syedabbas110
asked
in
Algorithms
Oct 30, 2017
by
Syedabbas110
2.1k
views
algorithms
knapsack-problem
dynamic-programming
1
vote
1
answer
23
algorithm
how is 0/1 knapsack time complexity O(2^n/2) ?
A_i_$_h
asked
in
Algorithms
Jul 25, 2017
by
A_i_$_h
117
views
knapsack-problem
time-complexity
0
votes
1
answer
24
Fractional Knapsack(Greedy Method)
Consider the following instance of the knapsack problem: n=3 , W=50 , (v1,v2,v3) = (60,100,120) and weight (w1,w2,w3) = (10,20,30) . solve the given knapsack problem applying greedy algorithm.
LavTheRawkstar
asked
in
Algorithms
Apr 15, 2017
by
LavTheRawkstar
2.6k
views
algorithms
knapsack-problem
greedy-algorithm
1
vote
1
answer
25
#Confusion Is it necessary to arrange the weights in Ascending order while solving 0/1 Knapsack problem using Dynamic
LavTheRawkstar
asked
in
Algorithms
Mar 26, 2017
by
LavTheRawkstar
2.0k
views
knapsack-problem
algorithms
1
vote
1
answer
26
Find the Optimal Solution of Fractional Knapsack where W=15
Item Total Weight Total Profit 1 2 10 2 3 5 3 5 15 4 7 7 5 1 6 6 4 18 7 1 3 Answer is 55.33 but how?
LavTheRawkstar
asked
in
Algorithms
Feb 28, 2017
by
LavTheRawkstar
3.1k
views
algorithms
knapsack-problem
0
votes
1
answer
27
Consider the Knapsack incidence with n=3(items) with weights {w1,w2,w3}={2,3,4} and profits are {p1,p2,p3}={1,2,5}
LavTheRawkstar
asked
in
Algorithms
Feb 28, 2017
by
LavTheRawkstar
9.9k
views
knapsack-problem
greedy-algorithm
6
votes
2
answers
28
Knapsack-Greedy
Sarvottam Patel
asked
in
Algorithms
Jan 21, 2017
by
Sarvottam Patel
1.6k
views
greedy-algorithm
knapsack-problem
algorithms
Page:
1
2
next »
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
RECRUITMENT IN OIL AND GAS CORPORATION LIMITED
Aptitude Overflow Book
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(647)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(854)
Recent questions tagged knapsack-problem
Recent Blog Comments
@abir_banerjee Thanks Abir. I'm third year...
@nolan_keats Currently I am in third year...
@abir_banerjee thank you Abir.Supposing you...
@nolan_keats just a suggestion as I also...
@abir_banerjee Hope I can do this in span of one...