0
$\begingroup$

I'm not sure how to formulate that in terms of maths.

I have four input variables whose value is arbitrary (among positive integers):

  • nOpposition
  • nGovernment
  • nCrossbenchers
  • nSpeaker

I have four output variables (with positive integer values):

  • wingRows
  • wingCols
  • crossRows
  • crossCols

I have a set of constraints that need to be satisfied:

  • nOpposition <= wingRows * wingCols
  • nGovernment <= wingRows * wingCols
  • nCrossbenchers <= crossRows * crossCols
  • crossRows <= wingRows*2 + 2
  • nSpeaker <= wingRows*2 + 2

I want to find a formula that will give me, for a set of given input values, the set of output values that will minimize :

  • | (2 + wingCols + crossCols) / (2 * wingRows + 2) - 2 |

(Yes, it's an absolute value.)

I have no idea how to go about this.

$\endgroup$
1
  • $\begingroup$ what about brute force? $\endgroup$ Commented Sep 6 at 15:22

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.