Questions tagged [optimal-strategy]

Finding an optimal strategy is common in games, where given a set of players the goal is to maximize the points of some fixed player. It is also common in resources allocation.

Filter by
Sorted by
Tagged with
0
votes
1answer
41 views

Can we get any subsequence of size $\ge \lfloor \frac{n}{2} \rfloor$ in a sorted order from a sequence in linear time?

Given a sequence $A$ of $N$ distinct integers, does there exist a strategy to get at least one subsequence with size $\geq \lfloor \frac{N}{2} \rfloor$ of the sequence in sorted order in $O(n)$ time? ...
2
votes
1answer
29 views

Responsive input sliders - is there a better way?

I am building an app where a user controls inputs via multiple sliders each with discrete steps. The app then uses the combination of slider values to run some calculations and returns back an output ...
2
votes
1answer
28 views

Allocation of many students to many schools based on capacity

Say I have a set of schools coordinates (S). I also have a set of neighborhoods centroid coordinates (N). I know how many kids are in each neighborhood, and they are categorized as either primary, ...
1
vote
3answers
203 views

How can I prove that my greedy algorithm for least guards is optimal?

This is the problem: An art gallery hired you to put guards so they can monitor artworks in a hallway. The goal is to minimize the amount of guards needed in this hallway. Each guard has a range of ...
6
votes
0answers
160 views

Correctness of a greedy Algorithm on Knockout Tournaments

You are given a function $\operatorname{rk}:\{1\dots 2^k\}\rightarrow \mathbb{N^+}$ representing the ranks of the players $1\dots2^k$ in a participating in a tournament. The tournament evolves in a ...