Hot answers tagged

1 vote

3sat to clique reduction program

Let 3-SAT formula $\phi$ be $C_1 \wedge C_2 \wedge \dots \wedge C_m$, where $C_i$ is a clause consisting of the disjunction of three literals: $(\ell_i^1 \vee \ell_i^2 \vee \ell_i^3)$. We can create ...
Steven's user avatar
  • 27.4k
1 vote

Threads and its priority in Java

Operating systems don't always let a user control thread priority in the way that a programmer would like, and certainly not without extra privileges. General-purpose operating systems have multiple ...
Pseudonym's user avatar
  • 21.3k
1 vote

Java optimization and minimization

You can solve this with linear programming. Let's start with the variables. Let $x_d$ denote the number of drivers whose work week starts on day $d$, e.g., $x_\text{Monday}$ denotes the number of ...
D.W.'s user avatar
  • 154k
1 vote

Numerical Approximation in Java

With $p:=\dfrac ms$, squaring and collecting all the constants to avoid the mess, the equation reads $$e^{p^2}=\lambda p^2$$ or $$-p^2e^{-p^2}=-\lambda^{-1}.$$ Hence using the Lambert function, $$s=\...
Yves Daoust's user avatar
  • 10.3k

Only top scored, non community-wiki answers of a minimum length are eligible