2
$\begingroup$

I need to find the maximum of a sum of ceiling functions. The following are given $$N,C\in\mathbb{Z}\text{ with }0\leq N\text{ and }1\leq C$$ $$\frac{p}{q}\in\mathbb{Q}\text{ with }p,q \text{ coprime and } p\geq q\geq 1$$

Maximize

$$\sum_{i=1}^k{\Bigl\lceil a_i\frac{p}{q} \Bigr\rceil}$$

where $a_i$ is a partition of $N$ with $k$ terms and $k\leq \min(N,C)$.

I only need the maximum value, not the partition of $N$. My first idea was to let $k=\min(N,C)$ and take $k\lceil \frac{Np}{kq}\rceil$ as the max. But I think that's wrong for some inputs. Any help would be greatly appreciated.

EDIT: An answer might be $k=\min{(N,C)}$, $a_1=N-\max{(0,k-1)}$, then $a_i=1$ for $i>1$?

$\endgroup$
2
  • 1
    $\begingroup$ Are there any more restraints on $p$ and $q$? Do we know $p < q$, say? $\endgroup$ Commented Mar 20, 2022 at 22:09
  • $\begingroup$ I have updated the question to reflect that $p \geq q$ $\endgroup$
    – xdaimon
    Commented May 5, 2022 at 19:00

0

You must log in to answer this question.