From 9b7c783f1fd590f4e2f2209a4871cee84ee569ec Mon Sep 17 00:00:00 2001 From: Koen van der Heijden Date: Mon, 12 Dec 2016 01:09:59 +0100 Subject: solution job sched --- part1.tex | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/part1.tex b/part1.tex index 94aace6..420d7fb 100644 --- a/part1.tex +++ b/part1.tex @@ -47,10 +47,9 @@ be in the same truck. % combination: they are not allowed to be put in the same truck. \subsection*{Solution:} -\begin{itemize} - \item[(a)] - \item[(b)] -\end{itemize} +\subsubsection*{(a)} + +\subsubsection*{(b)} \section*{Problem: Chip design} @@ -139,15 +138,51 @@ We also reformed all previously mentioned requirements into formula's that can b (=> (<= j10 j7) (<= (+ j10 15) j7)) \end{lstlisting} +The complete scheduling output, where an integer represents the time at which a job was started is as follows: +\begin{lstlisting} +j1 -> 1 +j2 -> 0 +j3 -> 7 +j4 -> 0 +j5 -> 15 +j6 -> 0 +j7 -> 25 +j8 -> 15 +j9 -> 28 +j10 -> 0 +j11 -> 15 +j12 -> 42 +\end{lstlisting} + +Note that $42 + 12 + 5$ is indeed equal to $59$. + \subsubsection*{(b)} This solution was retrieved in the same way as answer a. This answer is $m = 65$. -2 extra lines were added to ensure that job 6 lies withing job 12: +2 extra lines were added to ensure that job 6 lies within job 12: \begin{lstlisting} (>= j6 j12) (<= (+ j6 11) (+ j12 17)) \end{lstlisting} +With those 2 extra formula lines, the new schedule becomes: + +\begin{lstlisting} +j1 -> 1 +j2 -> 0 +j3 -> 7 +j4 -> 0 +j5 -> 15 +j6 -> 42 +j7 -> 53 +j8 -> 15 +j9 -> 28 +j10 -> 0 +j11 -> 15 +j12 -> 42 +\end{lstlisting} +Note that $53 + 7 + 5$ is indeed equal to $65$. + \section*{Problem: Integer sum from neighbors} Eight integer variables $a_1$, $a_2$, $a_3$, $a_4$, $a_5$, $a_6$, $a_7$, $a_8$ are given, for which the initial value of -- cgit v1.2.1