Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
-2 votes
1 answer
57 views

I'm using genetic algorithm for knapsack problem and when I wanted to debug it says : int' object is not subscriptable it just pointed this 3 spots in the code and in the end it just said this is the ...
0 votes
0 answers
76 views

Problem Statement There are N items, numbered 1, 2, ..., N. For each item i (1 ≤ i ≤ N): It has a weight w[i] It has a value v[i] Taro wants to choose some of these N items and carry them home in a ...
0 votes
1 answer
128 views

I'm trying to use dynamic programming to solve a knapsack variation, where you are given an array of containers, each of them having a weight, a resistance and an id, I need to find the tallest pile ...
0 votes
1 answer
83 views

Given a set of 140 options, my goal is to select the set of options that minimize the objective function and acheive a constraint that weight must be > 5584 units. Criteria 1 is the objective ...
6 votes
3 answers
373 views

I have a tibble: sample_tibble <- tibble( group = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4), threshold = c(100, 100, 100, 100, 100, 80, 80, 80, 80, 80, 80, 150, 150, 150,...
0 votes
0 answers
85 views

Problem description: A store has N boxes where sequences of bottles can be placed (a sequence can be empty), with each box having a bonus factor c_i and a weight l_i. There are only K bottles ...
0 votes
0 answers
69 views

I am trying to solve a Knapsack problem with a two-dimensional array on CodeBlocks, but after the program runs, I press the number on the keyboard, and the running terminal does not display the number ...
3 votes
1 answer
147 views

I have a list of tuples (a, b) of two unrelated positive integers. I am trying to create another list based off of this that maximizes the sum of a, while staying above a threshold. I also have two ...
4 votes
2 answers
175 views

I am working on an algorithm for optimizing the costs of a printing company by solving a problem they face. The problem is similar to knapsack problem but with a twist, instead of minimizing the ...
0 votes
2 answers
183 views

You have n items. Each object has a weight, the weight of the object numbered i is equal to x_i. You need to put them in a backpack that holds no more than Sg. At the same time, you want the ...
0 votes
1 answer
149 views

hot to solve give me a proper steps The current Dart SDK version is 3.2.0. Because datingappmain depends on flutter_tindercard >=0.1.1 which doesn't support null safety, version solving failed. ...
0 votes
0 answers
104 views

I have an assignment to solve a Knapsack problem from a set of dataset i'm given and one of the ways i have to do solve it with is branch and bound depth first The program below works fine when given ...
-4 votes
3 answers
103 views

Lets say we are given a list of durations (5s, 10s, 10s, 15s, 15s, 15s, 25s, 30s....) and we want to find a list of unique durations that can be created using this list of single durations. for ...
4 votes
1 answer
287 views

In the classic 0-1 knapsack problem, I am using the following (dynamic programming) algorithm to construct a "dp table": def knapsack(weights, values, capacity): n = len(weights) ...
1 vote
0 answers
51 views

I'm working on a JavaFX project where I need to manage a 3D grid representing a Tetris-like game environment. My current implementation involves multiple nested loops and array manipulations, which I ...

15 30 50 per page
1
2 3 4 5
...
73

AltStyle によって変換されたページ (->オリジナル) /