Skip to main content
Advice
0 votes
1 replies
71 views

I have a list of sets which I need to group into pairwise disjoint families. I know this is a set packing problem akin to the maximum independent set and thus NP-hard. One way to solve it is to ...
Stop US and Israel's user avatar
1 vote
1 answer
117 views

The book Algorithms Illuminated Part 4 has the following definition to prove problems NP-hard: A problem A reduces to another problem B if an algorithm that solves B can be easily translated into one ...
MangoPizza's user avatar
3 votes
0 answers
63 views

A graph G(V,E) is defined by a set of vertices V and a set of edges E. Given W⊆V, find a connected subgraph G'(V',E') of G that satisfies the following conditions: i) ∀p∈V,∃p'∈V' such that p′ is ...
Sword fish's user avatar
0 votes
0 answers
52 views

I'm looking for an approximation approach to what I am assuming is an NP hard problem. Given a list of sets F = {S1,...,Sm) that contain at most n elements from (0,...,n-1): what is the largest subset ...
user3220162's user avatar
0 votes
0 answers
90 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 ...
HelloContinent's user avatar
0 votes
1 answer
88 views

As shown in this code, I need to use certain data in one table as a basis to modify another table and add some information. When this kind of table information scale is large, this violent traversal ...
kkk su's user avatar
  • 25
1 vote
1 answer
60 views

I'm trying to write a decision tree learner in numpy. For this, the x values need to be sorted once only and after that i should be able to reuse them. For this, I have a 2d array of features x, of ...
NotProbable's user avatar
0 votes
1 answer
1k views

A greedy algorithm to find a vertex cover for a given graph would be to greedily select the vertex with the maximum degree and add it to the vertex cover set. Remove the node and all its edges from ...
NITHIN SABU's user avatar
0 votes
0 answers
62 views

Problem: Given elements and sets that the elements can corespond to, find optimal division these elements to sets, such that number of sets is minimal. Example: 'a' : (1, 2), 'b' : (1, 3), 'c' : (3, 5)...
jon's user avatar
  • 53
0 votes
1 answer
482 views

I installed NUMPY by using pip install NUMPY and it installed and then I'm still not able to use np. method . the NUMPY version is 1.26.3. the error in "np is not defined". can somebody ...
Mehran Kaj's user avatar
1 vote
0 answers
224 views

Consider the K-Hamiltonian Path (KHP) decision problem stated below: KHP = (G, K), where: G = (V, E) is an undirected graph of n vertices and m edges K is a positive integer Do there exist at least n/...
CsGeek's user avatar
  • 11
1 vote
0 answers
65 views

A k-plex is a graph in which every vertex is adjacent to all but at most k vertices within the graph. Say I have a complete, undirected, weighted graph (a clique and also a k-plex), and I want to ...
Mamiglia's user avatar
  • 163
1 vote
0 answers
198 views

The general bin-packing problem is NP complete. I have read several papers and other source but I am still not clear about whether a bin-packing problem with a fixed number of bins is NP-hard. ...
Christian's user avatar
2 votes
1 answer
660 views

I am motivated by the post, Complexity of n-queens-completion. I am interested in completion problem of non-attacking rooks on a chessboard. Input: Given a chessboard of size 𝑛×𝑛 with 𝑛−𝑘 rooks ...
Mohammad Al-Turkistany's user avatar
3 votes
2 answers
173 views

I am trying to solve the following problem: I have several blocked sets (which may contain duplicate elements). I must pick a (varying) number of elements from each blocked set to unblock it. I am ...
CircularRefraction's user avatar

15 30 50 per page
1
2 3 4 5
34