Questions tagged [partition-problem]

In computer science, the partition problem is to decide whether a given multiset of integers can be partitioned into two "halves" that have the same sum.

partition-problem
13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
1 answer
386 views

SHORTEST delivery time by 2 transporters

I am dealing with an algorithmic problem. I have a known graph algorithm with a single central node. The aim is to deliver goods from this central node to some other, specified nodes by TWO ...
ludgo's user avatar
  • 475
2 votes
0 answers
549 views

Get the elements of subsets in Balanced Partition using Backpointers

I want to implement the Balanced Partition probelm and get the elements of the subsets using backpointers. I have a question about Backpointers: With the help of MIT's Dynamic Programming Practice ...
MrWeix's user avatar
  • 377
1 vote
0 answers
147 views

How can N integers be divided into M equally sized groups such that the difference between their maximum and minimum sums is minimum?

How can N integers be divided into M equally sized groups such that the difference between their maximum and minimum sums is minimum? I see that it belongs to the partition kind of problems, but I ...
Soare Alexandru's user avatar
1 vote
0 answers
164 views

How to split a list of objects on the basis of two criteria in optimized way?

I have a list of objects say bag which has Quantity, Volume and weight. I want to split or join multiple object on the user input which will be max weight and max volume , So we want to split the list ...
Java Programmer's user avatar
1 vote
2 answers
341 views

Team creation algorithm via player preference

I'm making a matchmaking client that matches 10 people together into two teams: Each person chooses four people they would like to play with, ranked from highest to lowest. Two teams are then formed ...
SlickJava's user avatar
  • 111
1 vote
1 answer
383 views

Recursively divide a list that each iteration divides into two parts to get the closest sum overall

Given a list of numbers L = { a1, a2, a3, a4, ... , aN} The problem is to divide this L into two parts, not just once but recursively until it becomes atomic. The main idea is like this post but ...
Phizaz's user avatar
  • 613
0 votes
0 answers
13 views

Show popup message after ad helper ads show in flutter android studio

AdHelper.showRewardedAd(onComplete: () async { await VpnEngine.startVpn(vpnConfig); }); } AdHelper.showInterstitialAd(onComplete: () async { await VpnEngine.stopVpn(); }); } showDialog( ...
SS Rimel's user avatar
0 votes
1 answer
207 views

Contiguous subarray and non-Contiguous

I was trying to solve this problem on leetcode. You are given a 0-indexed integer array nums. You have to partition the array into one or more contiguous subarrays. We call a partition of the array ...
Mina Eskandar's user avatar
0 votes
0 answers
38 views

Given an array and group them as a possible sum

Given an array and group them as a possible sum. Input Only this array : [1,2,3,4,5] Output : {[5,1] [4,2]} {[3,2] [4,1]} Is there any way to solve this problem without using nesting of for loop?
Alok Tripathi's user avatar
0 votes
0 answers
100 views

Partition-P roblem with discontinuous subsets

I'm trying to solve a variant of the partition problem. I have two important twists. I need to solve for k partitions, not just 2, as in the classic partition problem. The following code does ...
Adam's user avatar
  • 911
0 votes
0 answers
290 views

Strange issue with custom email template in magento

Hi for some need i need to set up a new email template with new header and footer with for this i have create a new template in configuration->transaction emails and crate a new template with ...
Rohit Goel's user avatar
  • 3,484
0 votes
1 answer
365 views

PartitionProblem variation - fixed size of subsets

I have a problem which is a variation of the partition problem which is NP-complete. This is an optimization problem, not a decision problem. Problem: Partition a list of numbers into two subsets ...
Bruce's user avatar
  • 955
-1 votes
1 answer
684 views

Grouping using analytical functions in Oracle

I've got a table with the columns: col1 (primary key) number col2 number - contains few duplicates This table contains 600 records. I'm trying to construct a query where the user can give any group ...
ragav's user avatar
  • 66