Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 9550

Questions about problems that entail selecting the best element from some set of available alternatives, and methods to solve them.

7 votes

What is the formal name for this algorithmic problem?

This general form of problem is a facility location problem. The specific version you're asking about is a covering problem – you have a set of points (the houses) and you're trying to cover them with …
David Richerby's user avatar
2 votes
Accepted

Why can no task have a utilization rate greater than one?

It appears that you have a periodic scheduling system on a single processor where task $i$ must run for $C_i$ seconds out of every $T_i$. If this is the case, then the requirement that $\tfrac{C_i}{T …
David Richerby's user avatar
2 votes
Accepted

Optimizing iteration over all permutations of a bit array

There's no possibility of an efficient algorithm here, unless you have more information about $T$. $T$ might only return true for one input and, in the worst case, you'd have to try all $2^n$ possibil …
David Richerby's user avatar
3 votes

Optimized resource allocation problem

This is just the assignment problem: you need to find a maximum-weight matching between the users and frequencies. The Hungarian algorithm solves this in time $O(n^3)$.
David Richerby's user avatar
5 votes
Accepted

Distributing resources for maximum gain

This is a knapsack problem. In the most basic version, you have a single resource (e.g., space in your knapsack) and you're trying to choose which items to put in it so you can carry the greatest valu …
David Richerby's user avatar
17 votes
Accepted

What is the optimal solution of the 1962 Procter and Gamble's TSP Contest?

Full details are in Robert L. Karg and James L. Thompson, A Heuristic Approach to Solving Traveling Salesman Problems (Management Science, 10(2):225–248, 1964). The PDF is available from JStor and In …
David Richerby's user avatar
2 votes
Accepted

Is the length of the shortest quine in a programming language computable?

You need to formally define the computational problem. It appears that the input is "a programming language" and the output is the length of the shortest quine in that language. But how is the program …
David Richerby's user avatar
4 votes
Accepted

Optimal way for grouping events

Represent the events as a bipartite graphs: the vertices are the users and subjects and the edges are events (so there's an edge from user $x$ to subject $y$ if there's an event involving that user an …
David Richerby's user avatar
3 votes
Accepted

Combinatorial optimization problem - What would you call this?

It's called four-dimensional matching and it's NP-complete.
David Richerby's user avatar
2 votes

Longest cycle in a digraph

The problem of finding a longest simple cycle in a digraph is NP-hard, since the problem of finding a longest simple cycle in an undirected graph is a special case: you can consider an undirected grap …
David Richerby's user avatar
4 votes

How to find the maximal set of elements $S$ of an array such that every element in $S$ is gr...

Any recursive algorithm can be rewritten to use iteration. After all, a Turing machine knows nothing about recursion but can implement any algorithm. In principle, you can rewrite your recursive funct …
David Richerby's user avatar
3 votes
Accepted

What is the name for polynomially solvable optimisation problems?

An optimization problem is an example of a function problem: i.e., one where the task is to map some input to some output. The class of function problems solvable in polynomial time is FP. … (Note that there is a class OptP but that's not the polynomial-time optimization problems. …
David Richerby's user avatar
1 vote

Optimal insertion of edges for a graph

Let your vertex set be $\{v_1, \dots, v_n\}$. If $n\leq5$, just add all possible edges. Otherwise, create a new graph with vertices $\big\{v_{i,j}\mid i\in\{1, \dots, n\},\ j\in\{1, 2, 3, 4\}\big\}$ …
David Richerby's user avatar
3 votes

Optimal meeting point

narek gives the polynomial-time algorithm. The more general problem is the facility location problem. This includes several problems but the basic idea is that you want to know where to build your res …
David Richerby's user avatar
1 vote

How to solve the optimization of bin packing using the decision version

This answer will probably be quite annoying... To be explicit, your bin packing problem is: find a way of assigning items of size $s_1, \dots, s_k$, to the minimum number of bins such that no bin con …
David Richerby's user avatar

15 30 50 per page