Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.2k answers

1.6k comments

529 users

0 votes

Hi, I tried to submit my solution for the SNF for 

a&b&c&d|c&d&!b|d&!c|!d

I tried to input

d ? (c ? (b ? a : true) : true) : true

but I got an error (not in SNF)

However,

d ? (c ? (b ? (a ? true : false) : true) : true) : true

got accepted as a correct solution.

Shouldn't my first solution also be correct? SNF is defindes as a representation of a boolean function only using IF THEN ELSE and 1, 0 (VRS-03 page 4).

in * TF "Emb. Sys. and Rob." by (1.7k points)
edited by

1 Answer

+2 votes
 
Best answer
It depends what you mean here with "correct". The two formulas are obviously equivalent to each other and both are only using ITE operations, variables and the Boolean constants. However, SNF as defined in the tool (and the slides) continues making case distinctions even when a variable is given, so you must not end with a variable "a" and should rather create its SNF as (a ? true : false). This is done to make SNF more comparable to BDDs which also make case distinctions for variables. You may have a more liberal definition that still will generate equivalent formulas, but then the canonical normal form property would be lost also.
by (166k points)
selected by
Alright, thanks. I used the definition of SNF on page 4 of presentation #3 and therefore thought the SNF only has to satisfy the 2 conditions shown there, which are only using IF THEN ELSE and TRUE, FALSE. I think it might be helpful to clarify this in the slides.
I agree and will make a note about that on the slides!

Related questions

0 votes
1 answer
0 votes
1 answer
asked May 13, 2020 in * TF "Emb. Sys. and Rob." by EngiMary (1.7k points)
+1 vote
1 answer
asked May 6, 2020 in * TF "Emb. Sys. and Rob." by EngiMary (1.7k points)
0 votes
1 answer
0 votes
1 answer
asked May 16, 2022 in * TF "Emb. Sys. and Rob." by zain (440 points)
Imprint | Privacy Policy
...