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, 2022
by
ryandany07
805
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
593
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
1.6k
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
532
views
test-series
knapsack-problem
algorithms
0
votes
1
answer
5
Testbook Test Series
rsansiya111
asked
in
Algorithms
Dec 17, 2021
by
rsansiya111
331
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
661
views
nielit-sta-2020
algorithms
dynamic-programming
easy
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
admin
asked
in
Algorithms
Mar 31, 2020
by
admin
8.5k
views
nielit2016dec-scientistb-cs
algorithms
knapsack-problem
algorithm-design-technique
1
vote
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$
admin
asked
in
Algorithms
Mar 30, 2020
by
admin
2.6k
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
688
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
493
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
421
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
615
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
434
views
dynamic-programming
knapsack-problem
1
vote
1
answer
14
ACE TEST SERIES QUESTION
Shankar Kakde
asked
in
Algorithms
Oct 1, 2018
by
Shankar Kakde
362
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
179
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
793
views
time-complexity
knapsack-problem
sorting
binary-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
646
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
1.0k
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 16, 2017
by
Parshu gate
8.2k
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 7, 2017
by
Manoja Rajalakshmi A
516
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
1.1k
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.8k
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
329
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
3.9k
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 25, 2017
by
LavTheRawkstar
2.6k
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
7.2k
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
12.8k
views
knapsack-problem
greedy-algorithm
Page:
1
2
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged knapsack-problem
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...