[CS@TUK] Questions and Answers - Recent questions and answers
https://q2a.cs.uni-kl.de/qa
Powered by Question2AnswerAnswered: Trace Scheduling
https://q2a.cs.uni-kl.de/3923/trace-scheduling?show=3924#a3924
Yes, you are right. The example shows how trace scheduling works (which is correct), but the intention is then to generate VLIW instructions from that which is not possible because of the dependency on x4 as you remarked (unless the VLIW execution engines would provide forwarding which is however against the philosophy to keep the processor as simple as possible). <br />
<br />
Since there is also a declaration of a local variable x6, it seems that I forgot to rename one of the x4 to x6.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3923/trace-scheduling?show=3924#a3924Fri, 17 Nov 2023 17:00:52 +0000Answered: To the Runtime Analysis of Pipelined Processors in Rechnerorganisation und Systemsoftware.
https://q2a.cs.uni-kl.de/3921/pipelined-processors-rechnerorganisation-systemsoftware?show=3922#a3922
The number np that is in question here is the number of instruction cycles required by the pipelined processor to execute the n instructions of the program. Note that the pipelined processor has to execute additional nop instructions, and their number "typically" grows linearly with the number of pipeline stages, so that with two constants (that we typically do not know), we have np = alpha1 * p + alpha2. <br />
<br />
So, the more pipeline stages p we have, the more nop instructions, we have to execute, and that suggests that we should not have too many pipeline stages. On the other hand, the time required for a cycle shrinks with the number of pipeline stages, so that we get the formula on page 135 that may have an optimal number of pipeline stages where the runtime is minimal.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3921/pipelined-processors-rechnerorganisation-systemsoftware?show=3922#a3922Wed, 15 Nov 2023 12:04:04 +0000Answered: Memory consistency model PRAM
https://q2a.cs.uni-kl.de/3919/memory-consistency-model-pram?show=3920#a3920
<p>For PRAM consistency, we consider the actions with their program order but have no need to order all actions into a single total order as required for sequential consistency. Instead, each thread may have its own different view on the ordering of the actions, but also for these local views, we have to respect the write order of the other threads.</p><p>To be more precise, if you consider the definition of PRAM consistency on slide 79 of the related chapter, you see that we consider Rstr(<=P,A(p)∪A(write)) which means that we consider all actions A(p) of thread p, and all the write actions A(write) of the other threads, and we respect their program order <=P. </p><p>In the example, threads P and Q have the following actions:</p><pre> p1: read(x,3)
p2: write(x,1)
p3: write(y,2)
q1: read(y,2)
q2: write(x,3)
q3: read(x,1)
</pre><p>For checking PRAM consistency, we need to add the write actions of the other thread(es) to the actions of each thread. For thread P, this is no problem:</p><pre> q2: write(x,3)
p1: read(x,3)
p2: write(x,1)
p3: write(y,2)
</pre><p>For thread Q, we must add p3 in before q1 since otherwise, there is no reason why q1 may read value 2 from y. But then, p2 must even occur before p3 since we have to respect the ordering of the write actions of thread P. However, then, which is consistent with the value read by q1. But then, variable x will be initialized with 1, and this becomes a problem for q2:</p><pre> p2: write(x,1)
p3: write(y,2)
q1: read(y,2)
q2: write(x,3)
q3: read(x,1)</pre><div>The above is the only possibility, and it is not consistent.</div>* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3919/memory-consistency-model-pram?show=3920#a3920Tue, 05 Sep 2023 14:19:38 +0000Answered: Fourier Doubt
https://q2a.cs.uni-kl.de/3914/fourier-doubt?show=3916#a3916
Yes, you can select any value in the determined interval. For the last variable that is left, we have already such an interval determined by the greatest of the lower bounds and the least of the upper bounds.<br />
<br />
Once determined such a value, you get another interval in the same way for the next variable, and so on. In particular, you can thereby select integer values if there is an integer solution which makes Fourier-Motzkin not more difficult for integers than for reals. Even more, you can also handle inequalities with < instead of <= which is not possible with Simplex.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3914/fourier-doubt?show=3916#a3916Mon, 28 Aug 2023 15:09:36 +0000Answered: Notation in exam
https://q2a.cs.uni-kl.de/3913/notation-in-exam?show=3915#a3915
That will be fine, but we should also know (maybe from the context) whether it is radix-2 or 2-complement since that makes a difference.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3913/notation-in-exam?show=3915#a3915Mon, 28 Aug 2023 10:49:51 +0000Answered: omega automaton
https://q2a.cs.uni-kl.de/3910/omega-automaton?show=3911#a3911
You can list all transitions as minterms which results in a full DNF of the transition relation which is no better than the explicit listing of the transitions (thus not making use of the symbolic representation). You have to use inputs as well for doing so, and that can be done for all automata. As the state transition diagram shown has wildcard * transitions, you better use them also instead of listing all input combinations.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3910/omega-automaton?show=3911#a3911Sun, 27 Aug 2023 12:08:46 +0000Answered: translating LTL to omega automaton
https://q2a.cs.uni-kl.de/3906/translating-ltl-to-omega-automaton?show=3908#a3908
I think that was already asked, and my answer was: Sure, the chapter on temporal logic explains many procedures to to this, right? Why shouldn't we use them here?* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3906/translating-ltl-to-omega-automaton?show=3908#a3908Sun, 27 Aug 2023 11:41:51 +0000Answered: In LTL validity checking is there a way to translate the LTL formula to omega automaton?
https://q2a.cs.uni-kl.de/3905/validity-checking-there-translate-formula-omega-automaton?show=3907#a3907
Sure, the chapter on temporal logic explains many procedures to to this, right? Why shouldn't we use them here?* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3905/validity-checking-there-translate-formula-omega-automaton?show=3907#a3907Sun, 27 Aug 2023 11:41:28 +0000Answered: Parity Games - Attractor set computation
https://q2a.cs.uni-kl.de/3902/parity-games-attractor-set-computation?show=3904#a3904
To compute attr(0,{s4}), we have to inspect the predecessor states of s4 which are s2 and s3. Both belong to player 0, so they belong to the attractor since player 0 can enforce from there to reach s4. <br />
<br />
Going further, we have to inspect the predecessors of {s2,s3} which needs to consider state s1 which belongs to player 1. Player 1 may however choose the transition to s0, so s1 does not belong to the attractor.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3902/parity-games-attractor-set-computation?show=3904#a3904Sun, 27 Aug 2023 08:03:49 +0000Answered: Rechenweg B-Komplement Multiplikation
https://q2a.cs.uni-kl.de/3900/rechenweg-b-komplement-multiplikation?show=3901#a3901
Ich denke, dass die nicht die volle Punktezahl geben sollte, da man dann ja nicht gezeigt hat, dass man die B-Komplementmultiplikation beherrscht. Auch beim Schaltungsentwurf würde man durch Konvertierung in Radix-B Zahlen und separate Behandlung des Vorzeichens nicht so effiziente Schaltungen gewinnen wie bei der direkten B-Komplementarithmetik, die sich kaum von der Radix-B-Arithmetik unterscheidet. Solche Aufgaben haben den Sinn, dass man zeigt, dass man weiß, an welchen Stellen sich die Verfahren unterscheiden (führende Ziffern mit alpha lesen und mit gamma schreiben). Also besser lieber die B-Komplementverfahren verwenden, um die volle Punktezahl zu bekommen.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3900/rechenweg-b-komplement-multiplikation?show=3901#a3901Sat, 26 Aug 2023 18:35:59 +0000Answered: Omega automaton transition relation
https://q2a.cs.uni-kl.de/3892/omega-automaton-transition-relation?show=3898#a3898
Well, the simplest way is that you would have to list all transitions as minterms of a DNF. It would start like this:<br />
<br />
!p&!q&!Xp&!Xq | !p&!q&!Xp&Xq | ...<br />
<br />
You could generate the associated Kripke structure, but that is just more work and you will get the same formula as the one above. So, that is not useful.<br />
<br />
The acceptance condition is the set of gray states (I guess) which is<br />
<br />
p&q<br />
<br />
but from the diagram, we don't know whether that is a safety, liveness or whatever automaton.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3892/omega-automaton-transition-relation?show=3898#a3898Sat, 26 Aug 2023 16:59:03 +0000Answered: CTL & LTL equivalence
https://q2a.cs.uni-kl.de/3891/ctl-%26-ltl-equivalence?show=3897#a3897
<p>Consider the path s0->s2->s2... of the structure in solution (d)</p><pre><span style="font-size:14px"> 0 1 2 3 4 5 6
a 0 0 0 0 0 0 ...
b 0 1 1 1 1 1 ...
[a SB b] 0 0 0 0 0 0 ...
!a 1 1 1 1 1 1 ...
[!a SU b] 1 1 1 1 1 1 ...</span></pre><p>So, [!a SU b] holds, and [a SB b] is false, so your are right!</p><div></div>* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3891/ctl-%26-ltl-equivalence?show=3897#a3897Sat, 26 Aug 2023 16:53:47 +0000Answered: LTL and CTL equivalence
https://q2a.cs.uni-kl.de/3889/ltl-and-ctl-equivalence?show=3896#a3896
<p>It looks good! Consider the structure in the example solution:</p><pre><span style="font-size:14px"> 0 1 2 3 4 5 6
a 0 0 0 0 0 0 ...
b 1 0 1 0 1 0 ...
[a SU b] 1 0 1 0 1 0 ...
X[a SU b] 0 1 0 1 0 1 ...
Xa 0 0 0 0 0 0 ...
[Xa SU b] 1 0 1 0 1 0 ...
</span>
</pre><p>Note that [a SU b] becomes equivalent to "b" if "a" is always false. Thus, the two formulas X[a SU b] and [Xa SU b] just become equivalent to Xb and b, respectively.</p><p>Your first structure generates the following</p><pre><span style="font-size:14px"> 0 1 2 3 4 5 6
a 0 1 0 0 0 0 ...
b 0 0 1 1 1 1 ...
[a SU b] 0 1 1 1 1 1 ...
X[a SU b] 1 1 1 1 1 1 ...
Xa 1 0 0 0 0 0 ...
b 0 0 1 1 1 1 ...
[Xa SU b] 0 0 1 1 1 1 ...
</span>
</pre><p>So, here X[a SU b] holds, and [Xa SU b] is false. </p><p>Finally, your second structure:</p><pre><span style="font-size:14px"> 0 1 2 3 4 5 6
a 0 0 0 0 0 0 ...
b 0 1 1 1 1 1 ...
[a SU b] 0 1 1 1 1 1 ...
X[a SU b] 1 1 1 1 1 1 ...
Xa 0 0 0 0 0 0 ...
b 0 1 1 1 1 1 ...
[Xa SU b] 0 1 1 1 1 1 ...
</span>
</pre><p>Again, here X[a SU b] holds, and [Xa SU b] is false. </p><div></div>* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3889/ltl-and-ctl-equivalence?show=3896#a3896Sat, 26 Aug 2023 16:49:42 +0000Answered: Correctness of sequent calculus
https://q2a.cs.uni-kl.de/3890/correctness-of-sequent-calculus?show=3894#a3894
<p>The rules used in the table are</p><ul><li>a<->b := a&b | !a&!b (for the left)</li><li>a<->b := (a->b) &| (b->a) (for the right)</li><li>Each one of these rules branches into two subgoals, why do you think that there are four? </li></ul><p></p># Study-Organisation (Master)https://q2a.cs.uni-kl.de/3890/correctness-of-sequent-calculus?show=3894#a3894Sat, 26 Aug 2023 16:18:39 +0000Answered: Translation to mu-calculus
https://q2a.cs.uni-kl.de/3888/translation-to-mu-calculus?show=3893#a3893
It is derived from νy.<>μx.(y ∧ φ ∨ <>x) (see page 41, VRS-05-MuCalculus), but there are also other variants.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3888/translation-to-mu-calculus?show=3893#a3893Sat, 26 Aug 2023 16:11:59 +0000Answered: Sequent Calculus
https://q2a.cs.uni-kl.de/3885/sequent-calculus?show=3886#a3886
We have introduced operators other than negation, conjunction and disjunction as macros. You must therefore expand them to apply the rules of the sequent calculus. Apart from that, you should not make simplifications, since otherwise, you may already solve the problem without using sequent calculus at all. The above formula is however quite difficult for the sequent calculus (I mean to handle manually).# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3885/sequent-calculus?show=3886#a3886Sat, 26 Aug 2023 14:01:47 +0000Answered: Omega automaton determinisation
https://q2a.cs.uni-kl.de/3876/omega-automaton-determinisation?show=3879#a3879
For NDetG -> DetG, you can always use the subset construction after removing the unsafe states. <br />
<br />
For NDetF, that is not always possible, at least it works for totally defined automata, and sometimes also for others, which is however not that easy to decide. The safe way for NDetF is therefore to convert it to NDetFG and to use the breakpoint construction to get a DetFG automaton. Note that some NDetF automata do not have equivalent DetF automata at all.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3876/omega-automaton-determinisation?show=3879#a3879Sat, 26 Aug 2023 09:36:23 +0000Answered: Fourier-Motzkin doubt
https://q2a.cs.uni-kl.de/3874/fourier-motzkin-doubt?show=3875#a3875
It is one of the advantages of Fourier-Motzkin to find integer solutions much easier. Once, the variables are eliminated, we backtrack and can thereby choose a value for each variable of the determined interval for that variable. If there is an integer value possible, pick it, otherwise, there is no integer solution.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3874/fourier-motzkin-doubt?show=3875#a3875Sat, 26 Aug 2023 09:30:51 +0000Answered: BDD to ZDD conversion
https://q2a.cs.uni-kl.de/3861/bdd-to-zdd-conversion?show=3863#a3863
What you essentially suggest is to convert the BDD to a FDD and then to a ZDD. I doubt that this is simpler in general. <br />
<br />
However, why not undoing the BDD elimination rule to get a non-reduced BDD and then applying the elimination rule of ZDDs? That can also be done on subtrees first to keep the complexity under control.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3861/bdd-to-zdd-conversion?show=3863#a3863Sat, 26 Aug 2023 08:00:21 +0000Answered: Zielonka Algorithm
https://q2a.cs.uni-kl.de/3860/zielonka-algorithm?show=3862#a3862
In general, the states are determined, i.e., for each state exactly one of the two players has a winning strategy. The winning strategy is not unique, there may be many choices a player can have if that player. has a winning strategy in a state. <br />
<br />
In the game you mention, the play (s8s0)^w is a game play with highest rank 9 so player 1 will win. However, it would be foolish of player 0 to play that game: in state s9, player 0 has a winning strategy, and player 0 would therefore select the transition to s3, then to s4 where player 1 has no other choice to go back to s3. Then the game play is s8->s0->(s3->s4)^w with highest rank 8 and thus player 0 will win!<br />
<br />
So, in state s8, player 1 has a winning strategy, but the only choice is to switch to s1 where player 1 also has a winning strategy. Switching to s0, i.e., to a state where the other player has a winning strategy is not wise.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3860/zielonka-algorithm?show=3862#a3862Sat, 26 Aug 2023 07:55:58 +0000Answered: FDD2BDD algorithm doubt
https://q2a.cs.uni-kl.de/3846/fdd2bdd-algorithm-doubt?show=3858#a3858
The algorithm always takes the cofactors, regardless which variable is their root. So, in that case, you just have the leaf node 0.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3846/fdd2bdd-algorithm-doubt?show=3858#a3858Fri, 25 Aug 2023 20:52:25 +0000Answered: Zielonka attractors
https://q2a.cs.uni-kl.de/3850/zielonka-attractors?show=3854#a3854
<p>s1 is a deadend state, and the attractors are defined with modal operators ⟨A⟩ and ⟨B⟩ as follows:</p><ul><li> attrA(φ) := μx.(φ ∨ ⟨A⟩x) </li><li> attrB(φ) := μx.(φ ∨ ⟨B⟩x)</li><li> ⟨A⟩φ := A ∧ <>φ ∨ B ∧ []φ = (A=><>φ|[]φ)</li><li> ⟨B⟩φ := A ∧ []φ ∨ B ∧ <>φ = (A=>[]φ|<>φ)</li></ul><p>Since we compute least fixpoints, we start with the empty set of states. Now, if φ=false, then we have</p><ul><li> ⟨A⟩false := A ∧ <>false ∨ B ∧ []false = B ∧ dead</li><li> ⟨B⟩false := A ∧ []false ∨ B ∧ <>false = A ∧ dead</li></ul><p>Hence, the attractors also collect deadend states controlled by the other player (see also page 145 of VRS-05-MuCalculus). This is correct, since if a player cannot choose a transition (since there is none), then the player will lose the game.</p># Study-Organisation (Master)https://q2a.cs.uni-kl.de/3850/zielonka-attractors?show=3854#a3854Fri, 25 Aug 2023 19:13:26 +0000Answered: CTL* MODEL CHECKING
https://q2a.cs.uni-kl.de/3852/ctl-model-checking?show=3853#a3853
Well, also !a holds infinitely, often and GF phi implies F phi, so F!a is always true on the path of the structure.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3852/ctl-model-checking?show=3853#a3853Fri, 25 Aug 2023 18:56:11 +0000Answered: CTL* model checking
https://q2a.cs.uni-kl.de/3844/ctl-model-checking?show=3848#a3848
Property S1 holds in state s0, since all paths leaving states s0 satisfy next p or q: We have p next when we go left, and q next when we go right. Property S2 does not hold in state s0 since neither do all paths leaving state s0 satisfy next p, nor do all paths leaving state s0 satisfy next q.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3844/ctl-model-checking?show=3848#a3848Fri, 25 Aug 2023 16:35:56 +0000Answered: FG automaton
https://q2a.cs.uni-kl.de/3837/fg-automaton?show=3842#a3842
The equivalence [a SU b] = Aexists({q},1, q<->b|a&next(q), q & FG!q) is not valid: Look, for all points of time, you may have a=0, b=1 and q=1. Then, [a SU b] is always true, but this is not an accepting run of the automaton on the right hand side. Why do you think that the two formulas are equivalent?# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3837/fg-automaton?show=3842#a3842Fri, 25 Aug 2023 16:24:04 +0000Answered: FDD2BDD algorithm
https://q2a.cs.uni-kl.de/3838/fdd2bdd-algorithm?show=3841#a3841
<p>For BDD2FDD, you recursively compute the FDDs of the cofactors. Then, you compute the xor of these FDDs which is (of course) a computation that takes the two FDDs of the recursive calls and computes a FDD as their xor operation. This Apply function works as the one for BDDs, i.e., recursively traverses the FDDs and moves the maximal node upwards.</p><p>For FDD2BDD, you recursively compute the BDDs of the sub functions high(f) and low(f). Then, you compute the xor of these BDDs which is (of course) a computation that takes the two BDDs computed by the recursive calls and computes a BDD as their xor operation. You just use the Apply algorithm for the latter.</p><p>So, what is the question?</p><div></div># Study-Organisation (Master)https://q2a.cs.uni-kl.de/3838/fdd2bdd-algorithm?show=3841#a3841Fri, 25 Aug 2023 16:18:22 +0000Answered: BDDtoFDD: Is it mandatory to use function?
https://q2a.cs.uni-kl.de/3832/bddtofdd-is-it-mandatory-to-use-function?show=3834#a3834
For that conversion, we typically do not insist on using that particular function. There are alternative ways to compute the result that are also fine.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3832/bddtofdd-is-it-mandatory-to-use-function?show=3834#a3834Fri, 25 Aug 2023 11:53:12 +0000Answered: G automaton to F automaton
https://q2a.cs.uni-kl.de/3831/g-automaton-to-f-automaton?show=3833#a3833
What you have done makes sense to me. <br />
<br />
![a SU b] = Aexists({q},!q, q<->b|a&next(q),G true)<br />
<br />
We have two states {} and {q}, both are accepting (safe) states, and {} is the single initial state. We then have to determinize it with the subset construction so that we can then negate it again to obtain a DetF automaton for [a SU b].# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3831/g-automaton-to-f-automaton?show=3833#a3833Fri, 25 Aug 2023 11:51:14 +0000Answered: B-Complement Multiplikation in Altklausur
https://q2a.cs.uni-kl.de/3826/b-complement-multiplikation-in-altklausur?show=3827#a3827
<p>Schauen wir uns das im Detail an: Wir wollen die Zahlen 4-Komplementzahlen y=31022 und x=2311 multiplizieren. Mit dem Baugh-Wooley-Verfahren ergibt sich dann das folgende Schema (Seite 142, DiRa-04-IntegerArithmetic):</p><pre><span style="font-size:14px"> α(2)*2 3*2 1*2 1*2
α(2)*2 3*2 1*2 1*2
α(2)*0 3*0 1*0 1*0
α(2)*1 3*1 1*1 1*1
α(2)*α(3) 3*α(3) 1*α(3) 1*α(3)
--------------------------------------------------------------------
p8 p7 p6 p5 p4 p3 p2 p1 p0
</span>
</pre><p>Mit α(2)=-2 und α(3)=-1 ergibt dies zunächst</p><pre><span style="font-size:14px"> (-2)*2 3*2 1*2 1*2
(-2)*2 3*2 1*2 1*2
(-2)*0 3*0 1*0 1*0
(-2)*1 3*1 1*1 1*1
(-2)*(-3) 3*(-3) 1*(-3) 1*(-3)
--------------------------------------------------------------------
p8 p7 p6 p5 p4 p3 p2 p1 p0
</span>
</pre><p>Nun muss man die Partialprodukte ausrechnen und aufaddieren. Der Algorithmus (Seite 144, DiRa-04-IntegerArithmetic) macht dies wie folgt:</p><pre><span style="font-size:14px">x[0]= 2 y[0]= 1 pp[-1, 1]= 0 cp[ 0,-1]= 0-> sm= 2 cp[0,0]= 0 pp[0,0]= 2
x[0]= 2 y[1]= 1 pp[-1, 2]= 0 cp[ 0, 0]= 0-> sm= 2 cp[0,1]= 0 pp[0,1]= 2
x[0]= 2 y[2]= 3 pp[-1, 3]= 0 cp[ 0, 1]= 0-> sm= 6 cp[0,2]= 1 pp[0,2]= 2
x[0]= 2 y[3]=-2 pp[-1, 4]= 0 cp[ 0, 2]= 1-> sm=-3 cp[0,3]=-1 pp[0,3]= 1 </span></pre><pre><span style="font-size:14px">--> pp[0,4]= 3
</span></pre><pre><span style="font-size:14px">x[1]= 2 y[0]= 1 pp[ 0, 1]= 2 cp[ 1,-1]= 0-> sm= 4 cp[1,0]= 1 pp[1,0]= 0
x[1]= 2 y[1]= 1 pp[ 0, 2]= 2 cp[ 1, 0]= 1-> sm= 5 cp[1,1]= 1 pp[1,1]= 1
x[1]= 2 y[2]= 3 pp[ 0, 3]= 1 cp[ 1, 1]= 1-> sm= 8 cp[1,2]= 2 pp[1,2]= 0
x[1]= 2 y[3]=-2 pp[ 0, 4]=-1 cp[ 1, 2]= 2-> sm=-3 cp[1,3]=-1 pp[1,3]= 1 </span></pre><pre><span style="font-size:14px">--> pp[1,4]= 3
x[2]= 0 y[0]= 1 pp[ 1, 1]= 1 cp[ 2,-1]= 0-> sm= 1 cp[2,0]= 0 pp[2,0]= 1
x[2]= 0 y[1]= 1 pp[ 1, 2]= 0 cp[ 2, 0]= 0-> sm= 0 cp[2,1]= 0 pp[2,1]= 0
x[2]= 0 y[2]= 3 pp[ 1, 3]= 1 cp[ 2, 1]= 0-> sm= 1 cp[2,2]= 0 pp[2,2]= 1
x[2]= 0 y[3]=-2 pp[ 1, 4]=-1 cp[ 2, 2]= 0-> sm=-1 cp[2,3]=-1 pp[2,3]= 3 </span></pre><pre><span style="font-size:14px">--> pp[2,4]= 3
x[3]= 1 y[0]= 1 pp[ 2, 1]= 0 cp[ 3,-1]= 0-> sm= 1 cp[3,0]= 0 pp[3,0]= 1
x[3]= 1 y[1]= 1 pp[ 2, 2]= 1 cp[ 3, 0]= 0-> sm= 2 cp[3,1]= 0 pp[3,1]= 2
x[3]= 1 y[2]= 3 pp[ 2, 3]= 3 cp[ 3, 1]= 0-> sm= 6 cp[3,2]= 1 pp[3,2]= 2
x[3]= 1 y[3]=-2 pp[ 2, 4]=-1 cp[ 3, 2]= 1-> sm=-2 cp[3,3]=-1 pp[3,3]= 2 </span></pre><pre><span style="font-size:14px">--> pp[3,4]= 3
x[4]=-1 y[0]= 1 pp[ 3, 1]= 2 cp[ 4,-1]= 0-> sm= 1 cp[4,0]= 0 pp[4,0]= 1
x[4]=-1 y[1]= 1 pp[ 3, 2]= 2 cp[ 4, 0]= 0-> sm= 1 cp[4,1]= 0 pp[4,1]= 1
x[4]=-1 y[2]= 3 pp[ 3, 3]= 2 cp[ 4, 1]= 0-> sm=-1 cp[4,2]=-1 pp[4,2]= 3
x[4]=-1 y[3]=-2 pp[ 3, 4]=-1 cp[ 4, 2]=-1-> sm= 0 cp[4,3]= 0 pp[4,3]= 0 </span></pre><pre><span style="font-size:14px">--> pp[4,4]= 0</span></pre><p>Also, was ist nun der Fehler?</p><p>An der fraglichen Stelle finden wir oben die folgenden Zahlen:</p><p>x[0]= 2 y[3]=-2 pp[-1, 4]= 0 cp[ 0, 2]= 1-> sm=-3 cp[0,3]=-1 pp[0,3]= 1 --> pp[0,4]= 3</p><p>Diese Werte wurden wie folgt berechnet:</p><pre> sm = x[0] * y[3] + pp[-1,4] + cp[0,2] = 2*(-2) + 0 + 1 = -3
-3 = (-1)*4+1 = cp[0,3] * 4 + pp[0,3]
--> cp[0,3]=-1 pp[0,3]= 1
--> pp[0,4]= gamma(cp[0,3]) = gamma(cp[0,3]) = 3
</pre><p>Insofern stimmt das Bild in der Musterlösung mit dem Algorithmus überein und beide sind korrekt!</p><p>Beachten Sie, dass -3 = (-1)*4+1 gilt, so dass (-3) div 4 = -1 ist. Beachten Sie auch (das haben Sie aber schon gesehen), dass man beim letzten Übertrag einer Zeile die Funktion gamma anwenden muss. </p><p></p>* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3826/b-complement-multiplikation-in-altklausur?show=3827#a3827Fri, 25 Aug 2023 10:12:48 +0000Answered: ZDD to BDD. Is set rep. enough?
https://q2a.cs.uni-kl.de/3824/zdd-to-bdd-is-set-rep-enough?show=3825#a3825
If the task is to generate a BDD from a ZDD, you should draw the BDD as well. Also, if the task is to generate a FDD from a ZDD, you should draw the FDD as well (that is finally the task).* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3824/zdd-to-bdd-is-set-rep-enough?show=3825#a3825Thu, 24 Aug 2023 20:15:56 +0000Answered: fdd2bdd doubt
https://q2a.cs.uni-kl.de/3821/fdd2bdd-doubt?show=3822#a3822
In general, I would say no, for particular examples, I would say certainly. The problem is that there are so many boolean functions that for some one of the intermediate steps like generating a DNF may explode so that other ways can then be more efficient. However, there is no silver bullet, I am afraid.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3821/fdd2bdd-doubt?show=3822#a3822Thu, 24 Aug 2023 16:00:22 +0000Answered: draw accepting states from w-automaton
https://q2a.cs.uni-kl.de/3816/draw-accepting-states-from-w-automaton?show=3817#a3817
When we have a NDet-G, NDet-F, NDet-FG or NDet-GF automaton then the accepting states are defined by the acceptance conditions G phi, F phi, FG phi, and GF phi as the set of states that satisfy phi. In the above case, there is a set of sets of accepting states, and we may list the union in the graph, but we should better use different colors for each particular state set. So, we get the accepting states always from the acceptance conditions.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3816/draw-accepting-states-from-w-automaton?show=3817#a3817Thu, 24 Aug 2023 11:20:58 +0000Answered: Doubt regarding Kripke
https://q2a.cs.uni-kl.de/3813/doubt-regarding-kripke?show=3814#a3814
Since s0 and s1 turn out to be bisimilar, we cannot distinguish these states by any mu-calculus formula without past modalities <:> and [:]. That means whether s5 makes a transition to s1 or to s0 does not matter, since from there, we can do the same things.<br />
<br />
If we would allow past modalities (as in the full mu-calculus), your concern must be considered, which is why we then have to consider a stronger kind of bisimulation (see lecture notes).# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3813/doubt-regarding-kripke?show=3814#a3814Thu, 24 Aug 2023 09:29:32 +0000Answered: LTL to LO2 doubt
https://q2a.cs.uni-kl.de/3810/ltl-to-lo2-doubt?show=3811#a3811
The teaching tool uses as few variables as possible. Indeed, one can show that three variables are sufficient because of the special kind of predicate logic that corresponds with LTL. You have used other names to avoid the shadowing of existing variables, which is safer than what the tool does. So, yes, your solution is correct.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3810/ltl-to-lo2-doubt?show=3811#a3811Thu, 24 Aug 2023 08:21:19 +0000Answered: Fragen zu Altklausuren
https://q2a.cs.uni-kl.de/3799/fragen-zu-altklausuren?show=3803#a3803
Ich denke, dass wir auf die Angaben der Dezimalzahlen verzichten können. Insgesamt bin ich der Ansicht, dass der Rechenweg bzw. die Formel die wesentlichen Punkte geben sollte. Das Eintippen in einen Taschenrechner ist nicht, was wir bewerten wollen.<br />
<br />
Was die zweite Frage angeht, sollten die einzelnen Partialprodukte gezeigt und aufaddiert werden (ich gehe davon aus, dass es eine einfache Multiplikation war). Schnelle Multiplikationsverfahren kann man nicht so gut von Hand rechnen. Sie müssen das dann aber im Radix-4-System machen (inklusive Überträge).* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3799/fragen-zu-altklausuren?show=3803#a3803Wed, 23 Aug 2023 14:14:36 +0000Answered: Simplex integer solution
https://q2a.cs.uni-kl.de/3796/simplex-integer-solution?show=3801#a3801
We have to strengthen the constraints to the next integer values for all solutions that are not yet integers. x0 was just the first, one could also choose y1 or y2. <br />
<br />
If floor does not work, the next step would be to try the ceil-value with the same variable as explained on page 118 of the related chapter. If that does also not work, there is no solution, but it may also happen that the recursion does not terminate as explained on 117.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3796/simplex-integer-solution?show=3801#a3801Wed, 23 Aug 2023 14:10:33 +0000Answered: Symbolic computation
https://q2a.cs.uni-kl.de/3792/symbolic-computation?show=3795#a3795
Yes, that seems to be a solution from another exam problem!# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3792/symbolic-computation?show=3795#a3795Wed, 23 Aug 2023 13:15:09 +0000Answered: omega automaton
https://q2a.cs.uni-kl.de/3791/omega-automaton?show=3794#a3794
Temporal logic formulas can often be better understood when these are translated to deterministic automata. F[a SU b] cannot be translated to Det-G but to Det-F. However, if you use the standard translation, you will get two GF-constraints, However, determinizing Büchi automata is very difficult.<br />
<br />
Hence, we use the following workaround: We translate !F[a SU b] to a NDet-G automaton, determinize it to a Det-G automaton, and negate it to get a Det-F automaton equivalent to F[a SU b].# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3791/omega-automaton?show=3794#a3794Wed, 23 Aug 2023 13:12:04 +0000Answered: Beta rounding floating point numbers
https://q2a.cs.uni-kl.de/3785/beta-rounding-floating-point-numbers?show=3793#a3793
<p>Thanks for pointing out a couple of bugs! </p><p>First, the exponent is defined with a bias that should be *half of the maximum exponent*, which obviously requires rounding if the maximum exponent is an odd number (as usual). So we have to decide whether to round it up or down. This is usually (in DiRa always!) done using the integer quotient, i.e. using the floor function, which means that we end up rounding down to minus infinity.</p><p>Now let's look at the specific questions: First, there is an error on slide 27: If the exponent has e digits to base B, this means that we have beta = (B^e-1) div 2 = B^{e-1}*b-1 with b:= B div 2 (integer quotient). On page 27, the correct formula is beta = (B^e-1) div 2, but the simplification B^{e-1}-1 is only correct for B=2. </p><p>This can be proved as follows: For B=2b with b := B div 2, we get</p><ul><li>beta = (B^e-1) div 2 = (B^{e-1}*2*b-1) div 2 = floor((B^{e-1}*b-(1/2)) = B^{e-1}*b-1</li></ul><p>and for B=2b+1 with b := B div 2, we get:</p><ul><li>beta = (B^e-1) div 2 = (B^{e-1}*(2*b+1)-1) div 2 = floor((B^{e-1}*b-(1/2)) = B^{e-1}*b-1</li></ul><p>So, on slide 27, it should be beta = (B^e-1) div 2 = B^{e-1}*b-1 with b:= B div 2 (integer quotient). We then have the exponents 0-beta,...,B^e-1-beta = 1-B^{e-1}*b,...,B^{e-1}*(B-b).</p><p>Next, on slide 42, we look at floating point numbers with e=2 and B=2, so we get beta = (2^2-1) div 2 = 3 div 2 = 1 and the exponent range is -1,0,1,2. To convert the floating point number [0|01|01] to decimal, we do the following: We have m=2 and e=2, so the formula for evaluating the numbers given on page 18 results in M*2^{1-2} * 2^{E-beta} = M*2^{-1} * 2^{E-1} = M * 2^{E-2} = 1*2^{-1} = 0.5. Therefore, the decimal numbers listed on page 42 are not correct! I remember adding the extra column of decimal numbers at the very end and calculating it by hand, which I now realize was a mistake. In fact, the correct numbers need to be doubled. However, the lesson learned on page 42 is not affected by the decimal values, since we want to see which numbers have unique and multiple representations. This may explain why this error was overlooked.</p><p>Next, look at slide 50: The conversion of [0|001|1000] to decimal is done as follows: We have m=4 and e=3, so we get beta = (B^e-1) div 2 = (2^3-1) div 2 = 7 div 2 = 3 with exponents allowed -3,...,4. The formula for evaluating the numbers given on page 18 gives M*2^{1-4} * 2^{E-3} = 8*2^{-3} * 2^{1-3} = 2^{-2} = 0.25, which you can also find in the table on page 40. So that is correct!</p><p>On slide 49, you can still apply what has been written above. </p><p>On slide 50, however, the rules change because we are looking at IEEE754 numbers. To convert [0|001|1000] to decimal, we first need to check if the number is a normal or denormal number. Since it is a normal number, we use the formula on page 47 with the hidden bit 1, which is the 1 of the mantissa 1000 as mentioned on page 50. There are 3 bits for the exponent and 4 bits for the mantissa, so we have m:=4, m'=m-1=3, and e=3, so beta=(2^3-1) div 2 = 3. Since the numbers on page 50 are *listed with the hidden bit* (as mentioned there), we have the mantissa 000 when it comes to the formula on page 47. So the number is evaluated as (1.0+M*2^{1-m})*2^(E-beta) = (1.0+M*2^{-3})*2^(E-3) = (1.0+0*2^{-3})*2^(1-3) = (1.0+0.0)*2^(-2) = 1.0/4.0 = 0.25, so the values on pages 49 and 50 are correct.</p><p>So, in summary, you have to calculate beta := (B^e-1) div 2 using the integer quotient, i.e. rounding to zero. The simplification on page 27 of this formula is not correct for B other than 2, and the decimal values on page 42 should be twice as large. The rest is correct as far as I can tell.</p><p></p>* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3785/beta-rounding-floating-point-numbers?show=3793#a3793Wed, 23 Aug 2023 12:48:52 +0000Answered: Meaning of I' in omega automata
https://q2a.cs.uni-kl.de/3775/meaning-of-i-in-omega-automata?show=3776#a3776
Indeed, the meaning of the primed variables may be ambiguous. In general, it is just used to denote a copy of a variable which may have another value. For instance, for the variables of a current point of time, we may generated primed variables for the next point of time. But that may not always be just the next-time operator, it may also just denote another variable. <br />
<br />
For the closure under the temporal operators, the primed variables denote the next point of time, so q' denotes next(q) and I' denotes anyone of the initial states at the next point of time. Hence, the automaton for the F-closure starts in anyone of the original initial states where q is false, and will remain there for a while, and may or may not set next(q). If q is made true, then the transitions R of the original automaton are enabled.<br />
<br />
In the first case that you mention (with the flat formulas), the primed variables are just other variables, not related to the others.* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3775/meaning-of-i-in-omega-automata?show=3776#a3776Tue, 22 Aug 2023 16:43:59 +0000Answered: Omega Automata Transition Diagram.
https://q2a.cs.uni-kl.de/3767/omega-automata-transition-diagram?show=3774#a3774
Not really sure what you mean, but "*" is just a wildcard that abbreviates every input, right?# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3767/omega-automata-transition-diagram?show=3774#a3774Tue, 22 Aug 2023 15:50:54 +0000Answered: LTL validity checking
https://q2a.cs.uni-kl.de/3771/ltl-validity-checking?show=3773#a3773
<p>We get</p><pre> p q
0 0 (0 <-> a | b & Xp) & (0 <-> 0 | a & Xq)
0 1 (0 <-> a | b & Xp) & (1 <-> 0 | a & Xq)
1 0 (1 <-> a | b & Xp) & (0 <-> 1 | a & Xq)
1 1 (1 <-> a | b & Xp) & (1 <-> 1 | a & Xq)
</pre><p>and thus</p><pre> p q
0 0 !(a | b & Xp) & !(a & Xq)
0 1 !(a | b & Xp) & (a & Xq)
1 0 (a | b & Xp) & 0
1 1 (a | b & Xp) & 1
</pre><p>and thus</p><pre> p q
0 0 !(a | b & Xp) & !(a & Xq)
0 1 !(a | b & Xp) & (a & Xq)
1 0 0
1 1 (a | b & Xp)
</pre><p>Now, note that</p><pre> !(a | b & Xp) & !(a & Xq)
= !a & !(b & Xp) & !(a & Xq)
= !a & !(b & Xp) & !(0 & Xq)
= !a & !(b & Xp)
= !a & !b | !a & !Xp
</pre><p>and</p><pre> !(a | b & Xp) & (a & Xq)
= !a & !(b & Xp) & (a & Xq)
= !a & !(b & Xp) & (0 & Xq)
= 0</pre><p></p># Study-Organisation (Master)https://q2a.cs.uni-kl.de/3771/ltl-validity-checking?show=3773#a3773Tue, 22 Aug 2023 15:49:44 +0000Answered: Wieso kleiner Fanout bei Parallel Prefix gut ?
https://q2a.cs.uni-kl.de/3770/wieso-kleiner-fanout-bei-parallel-prefix-gut?show=3772#a3772
<p>Grundsätzlich sollte der Fanout bei Gattern so klein wie möglich sein (siehe <a rel="nofollow" href="https://de.wikipedia.org/wiki/Fan-Out">https://de.wikipedia.org/wiki/Fan-Out</a>). Bei manchen Schaltungen mit n Eingängen wächst der Fanout der Gatter mit n an, was dann ab einem maximalen n elektrotechnische Probleme verursacht.</p><p>In der Klausur wird das nicht wirklich wichtig sein. Aber zum Grundverständnis von Schaltungen muss es mal erwähnt werden, da es manche der Algorithmen zum Parallel-Prefix-Problem in der Praxis disqualifiziert.</p>* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3770/wieso-kleiner-fanout-bei-parallel-prefix-gut?show=3772#a3772Tue, 22 Aug 2023 15:32:26 +0000Answered: Zielonka Algorithm
https://q2a.cs.uni-kl.de/3766/zielonka-algorithm?show=3768#a3768
To compute the attractor of player 1 of {s0,s2,s3}, we consider the predecessor states of the states, and check whether they belong to the attractor: <br />
<br />
Predecessors of s0 are s2 and s4, and since s2 is controlled by player 1, it belongs to the attractor. State s4 belongs to player 0, and player 0 may choose the transition from s4 to s1, so s4 does not belong to the attractor.<br />
<br />
Predecessors of s2 are s3 and s7, and since s3 has only this transition to s2, it belongs to the attractor. State s7 belongs to player 0, so it also belong to the attractor.<br />
<br />
The only predecessors of s3 is s0 which belongs to player 0, so it also belong to the attractor.<br />
<br />
Hence, we now already have states {s0,s2,s3,s7}. We consider the predecessors of s7 which are s5 and s6 which both belong to player 0. State s5 has however only that transition so it is added to the attractor, but s6 has another transition to s1, so it does not belong to the attractor. <br />
<br />
We next consider the predecessors of s5 which s2 and s7 which already belong to the attractor, so we got {s0,s2,s3,s5,s7}.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3766/zielonka-algorithm?show=3768#a3768Tue, 22 Aug 2023 14:49:21 +0000Answered: DPLL Algorithm
https://q2a.cs.uni-kl.de/3759/dpll-algorithm?show=3763#a3763
<p>That is certain possible in general, and in this example, it also generates a model of the formula. If we compute the BDD of the formula, we can also see all the possible models (but I think you should have written b or c must be true):</p><p><img alt="" src="https://q2a.cs.uni-kl.de/?qa=blob&qa_blobid=9575437827812347374" style="height:830px; width:400px"></p># Study-Organisation (Master)https://q2a.cs.uni-kl.de/3759/dpll-algorithm?show=3763#a3763Mon, 21 Aug 2023 18:55:00 +0000Answered: Translation between logic
https://q2a.cs.uni-kl.de/3758/translation-between-logic?show=3762#a3762
<p>AF(phi1 & Xphi2) is not a CTL formula (regardless whether valid or not), since CTL formulas are defined as those CTL* formulas where a temporal operator occurs right after a path quantifier and where after each path quantifier there is a temporal operator. There is however no path quantifier in front of the X operator since there is a conjunction, so it is not a CTL formula. Even worse: AF(phi1 & Xphi2) is not equivalent to any CTL formula!</p><p>AF(phi1 & AX phi2) is a CTL formula provided that phi1 and phi2 are CTL formulas.</p><p>However, X=AX is not correct, please remove this from your cheat sheet. </p><p>The point is that AF(phi1 & AX phi2) and AF(phi1 & X phi2) are not equivalent. The formulas look very similar, but are not the same. If you continue reading the slides, you will find on page 38 a Kripke structure that satisfies one of the formulas, but not the other one.</p><p>Fa & b = b & Fa is certainly valid since conjunction is commutative, and since disjunction is also commutative, also Fa | b = b | Fa is valid.</p><p>However, Fa | b = Fa is not valid, and neither is Fa & b = b. You can find easily counterexamples with the LTL teaching tool.</p><div></div># Study-Organisation (Master)https://q2a.cs.uni-kl.de/3758/translation-between-logic?show=3762#a3762Mon, 21 Aug 2023 18:45:08 +0000Answered: BDD2FDD doubt
https://q2a.cs.uni-kl.de/3747/bdd2fdd-doubt?show=3761#a3761
<p>Well, there are at least two options that I can suggest: (1) use the function BDD2FDD on page 157 of VRS-03-BinaryDecisionDiagrams or (2) use the following steps:</p><ol><li>convert the BDD to a DNF : !d | d&b | d&!b&!a = a&b&d | a&b&!d | a&!b&!d | !a&b&d | !a&b&!d | !a&!b&d | !a&!b&!d</li><li>convert the DNF to a RMF : a&b&d ⊕ a&d ⊕ true</li><li>convert the RMF to a FDD : true ⊕ d&(a&b ⊕ a) = true ⊕ d&(a ⊕ b&(a))</li></ol><div></div>* TF "Emb. Sys. and Rob."https://q2a.cs.uni-kl.de/3747/bdd2fdd-doubt?show=3761#a3761Mon, 21 Aug 2023 18:32:38 +0000Answered: Translation of logics
https://q2a.cs.uni-kl.de/3754/translation-of-logics?show=3755#a3755
No, that is not correct. E is not equivalent to EF, so the first step is already incorrect. Also in the particular formula, the two formulas E([a SU b] & ¬[c SU d]) and EF([a SU b] & ¬ [c SU d]) are not equivalent.<br />
<br />
Second, where do the AG operators in the second step come from?# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3754/translation-of-logics?show=3755#a3755Mon, 21 Aug 2023 13:02:16 +0000Answered: Translation between logics
https://q2a.cs.uni-kl.de/3741/translation-between-logics?show=3742#a3742
If we write E((Fa) ^ (Fb)) without the outermost brackets, it will be E(Fa) ^ (Fb) which is just EFa ^ Fb and since that is another formula, we need to write the brackets. <br />
<br />
Your solution is incorrect. It is true that you can use Fa=!G!a and Fb=!G!b, but you cannot reduce (!G!a)^(!G!b) to !G(!a&!b) while you could reduce (G!a)^(G!b) to G(!a&!b) but that is another formula.# Study-Organisation (Master)https://q2a.cs.uni-kl.de/3741/translation-between-logics?show=3742#a3742Mon, 21 Aug 2023 09:30:57 +0000omega automaton
https://q2a.cs.uni-kl.de/3738/omega-automaton
<p>Hi, </p><p>I have a doubt regarding LTL to omega automaton,</p><p>[a SU b] to and F-automaton.</p><p>Since, we don't have direct formula for [a SU b] to F automaton, I have taken the negation of [a SU b] to a G automaton, then from there I reduced to a F automaton, But something went wrong in-between, got stuck here. Could you please help me to solve this?</p><p><img alt="" src="https://q2a.cs.uni-kl.de/?qa=blob&qa_blobid=13263924078794693089" style="height:489px; width:400px"></p><p></p><p>but the answer for this one is , [a U b] = Aexist ({q}, ¬q, ¬q ^ a ^ ¬b ^ ¬q0 | (q | b) ^ q0 , Fq)</p># Study-Organisation (Master)https://q2a.cs.uni-kl.de/3738/omega-automatonMon, 21 Aug 2023 08:08:14 +0000