The tag has no usage guidance.

learn more… | top users | synonyms

4
votes
3answers
146 views

Trying to understand P vs NP vs NP Complete vs NP Hard

I am trying to understand these classifications and why they exist. Is my understanding right? If not, what? P is polynomial complexity, or O(nk) for some non-negative real number k, such as O(1), ...
0
votes
2answers
146 views

Optimization problem where to start, what algorithms to use? [closed]

I have an optimization problem and I was wondering where to start from to be able resolve it. I think it can be solved with an NP-complete algorithm but I am not sure where to start from. The problem ...
3
votes
2answers
184 views

Algorithm to find minimal set

I have a set of sets S and I want to find a minimal set of elements M such that each set in S shares at least one element with M. S = set of sets ∀ f∈S ∃e · e∈f ∧ e∈M For example: S = {{1}, {1, 2, ...
2
votes
2answers
318 views

Dynamic Programming Problem - To find smallest integer number 'x' which contains only digits 1's and 0's such that x mod n = 0

To design an algorithm that will output the smallest integer number 'x' which contains only digits 1's and 0's such that x mod n = 0 and x > 0..... For example: 2 divides 10 3 divides 111 4 ...
3
votes
2answers
841 views

Simplified knapsack in PHP

I have two instances where I'd like to display information in a "justified" alignment - but I don't care if the values are switched in order. One example being displaying the usernames of people ...