[CS@TUK] Questions and Answers - Recent questions and answers in * Other Teaching Fields
https://q2a.cs.uni-kl.de/qa/other-teaching-fields
Powered by Question2AnswerAnswered: Exercise 5.3 Graph Coloring
https://q2a.cs.uni-kl.de/954/exercise-5-3-graph-coloring?show=956#a956
<p>I think you are trying to encode a specific colouring directly into a formula. That is not the goal here. Instead we want a formula such that every satisfying assignment of that formula corresponds to a valid colouring and vice versa.</p><p>In order to successfully colour a graph we need to satisfy the following constraints:</p><ol><li>Each node gets exactly one colour</li><li>Adjacent nodes get different colours</li></ol><p>Try to break these constraints down into smaller chunks, translate each to a formula and combine them with conjunctions.</p><hr><p>For example if we have a node <strong>1</strong> and colours <strong>a b c </strong>we have the variables <strong>a1 b1 c1</strong>. The formula</p><p style="text-align:center"><strong>(a1 | b1 | c1)</strong></p><p>Enforces that at least one of <strong>a1 b1 c1</strong> must be true, meaning <strong>1</strong> gets at least one colour. The formulas</p><p style="text-align:center"><strong>(a1 -> !b1 & !c1) &<br>(b1 -> !a1 & !c1) &<br>(c1 -> !a1 & !b1) </strong></p><p>mean <em>"If one of <strong>a1 b1 c1 </strong>is true, then the other two must be false"</em>, meaning <strong>1</strong> gets at most one colour.</p><p>Now try to combine them and think which of the above constraints (1. or 2.) this is. For the other constraint you will have to consider the graph's structure (try adding some constraints for each edge).</p>* Other Teaching Fieldshttps://q2a.cs.uni-kl.de/954/exercise-5-3-graph-coloring?show=956#a956Wed, 03 Jun 2020 16:33:02 +0000Answered: Exercise Sheet5-A4-operator bases
https://q2a.cs.uni-kl.de/940/exercise-sheet5-a4-operator-bases?show=943#a943
Right! I guess you are confused as to what the problem is. Refer to slide 17/146 in propositional logic. There it is shown how the operators ! (negation), | (disjunction) and & (conjunction) are formulated using the entities in the set {(=>|), true, false} (i.e if-then-else operator (=>|) and boolean constants true and false). This proves that the set is a complete base (i.e. capable of formulating any boolean function).<br />
<br />
Similarly you have to construct ! (negation), | (disjunction) and & (conjunction) using the set F = {<->, false, |}, thus proving that F is a complete base too.<br />
<br />
Note that negation, disjunction and conjunction (denoted by ¬, v and ^ in slides) are denoted respectively by !, | and & in the exercise.* Other Teaching Fieldshttps://q2a.cs.uni-kl.de/940/exercise-sheet5-a4-operator-bases?show=943#a943Wed, 03 Jun 2020 08:10:04 +0000Answered: Normalized Numbers on Sheet 3-39
https://q2a.cs.uni-kl.de/776/normalized-numbers-on-sheet-3-39?show=812#a812
<p>The goal of normalization is to give each number a unique representation. We achieve this by shifting the mantissa until the left most digit is not zero. At the same time the exponent is decrement to preserve the value. So for B=2 the mantissa must start with 1. Unfortunately this leaves a gap around 0. To fill this gap we allow denormalized numbers.</p><p>Imagine you are trying represent a number smaller than the smallest normalized number. You start off with a mantissa and should normalize it. You are going to shift it left while decrementing the exponent. At some point you can't decrement the exponent any more, because it has already reached 0, but the mantissa is still not starting with 1. Now you have a denormalized number.</p><hr><blockquote><p>Are all numbers with exp = 0 denormalized?</p></blockquote><p>That depends. In the process above (shift and decrement) you might reach exponent zero at the same time when the first bit of the mantissa is 1. Then you have a normalized mantissa and exponent zero. This becomes a problem when we make use of a hidden bit. Normalized numbers will have a hidden 1, while denormalized numbers will have a hidden 0. So we need some way of spotting denormalized numbers. IEEE 754 (slide 44, 45, 46) deals with this by reserving exponent zero for denormalized numbers. So there, yes, exponent zero means denormalized. But without a hidden bit you might have a normalized number with exponent zero.</p><hr><blockquote><p>[..] that the black numbers on Sheet 3-39 are denormalized</p></blockquote><p>If the representation makes use of a hidden bit, then yes all the black ones are denormalized. If this is a representation without hidden bit, then only the two innermost (left and right of zero) are denormalized.</p>* Other Teaching Fieldshttps://q2a.cs.uni-kl.de/776/normalized-numbers-on-sheet-3-39?show=812#a812Sat, 23 May 2020 22:43:17 +0000Answered: Frage zu Folie 2-26
https://q2a.cs.uni-kl.de/575/frage-zu-folie-2-26?show=577#a577
<p>You are right, the mentioned formula is not correct. The correct formula is as follows: </p><p><img alt="" src="https://q2a.cs.uni-kl.de/?qa=blob&qa_blobid=4318344371126846847" style="height:156px; width:760px"></p>* Other Teaching Fieldshttps://q2a.cs.uni-kl.de/575/frage-zu-folie-2-26?show=577#a577Sat, 09 May 2020 08:49:35 +0000