Is SOP equal to the negation of POS of the same truth table? - boolean

Is the Sum Of Product equal to the negation of Product Of Sum of the same truth table?

I did a research and found that SOP of a truth table is equal to the POS of the same truth table. So, If I get the negation of a SOP, it is equal to the negation of POS of same table.

Related

Why are sum of minterms equated to 1 and product of maxterms to 0?

I have learnt that to convert an expression in the form of a Truth Table to a Sum of Product expressions, we use the concept of minterms. After preparing the truth table we find out which products evaluate to 1 and add those products.
While in the case of Product of Sum expression, we take those sums that evaluate to 0 and take the product of those sums.
I could not understand the logic behind this taking of 0 and 1. In an answer I read here, I found that POS is considered as a negative logic. I could not understand the concept behind it. What is the real logic behind this?
This is something I was confused with as well. When we write the truth table and see for which cases the value of F evaluates to 1, we get multiple cases. In SOP, ANY of those minterms can be true and the whole Function would be 1 because 1+X=1 This is the intuition behind SOP being positive logic and hence automatically, its complement, POS being negative logic.
Check out this answer for further clarification.
https://math.stackexchange.com/questions/2794909/boolean-algebra-sum-of-products-and-product-of-sums-why-is-the-procedure-def#

D trigger scheme test

I want to test my D trigger scheme and I don't know how to do that. I don't even know how "truth table" works and maybe someone can help/explain how to make a test for my D trigger scheme?
A logical table works as follows:
Each row represents a case, each column represents a statement. A cell represents the logical value of a statement. It is wise to differentiate mentally atomic columns from molecular columns. In your case, you have three atomic columns, they represent the cases. These are the first three columns in your logical table. The other columns are molecular columns, that is, their value is composed by other columns.
D is said to be the value of XOR-ing the third and the fifth column. If you look in each row the value of the third and the fifth column in the table, you will see that D4 is true (1) if they differ and it is false (0) if they are similar.
I am not sure what do you mean by testing the D trigger scheme, but if by that you mean that we should test whether the formula matches to the values, then we can say that yes, it matches, since the general concept of XOR is matched in all cases in your logical table.

Why are these two table columns not equal

I want to see whether a column X in a table T is in sorted order. class(x) is double. I compare X to sort(x) using isequal and find that the answer is false.
I visually inspect, and find no entries that differ. Further, by making a table [T.x sort(T.x)], I see that the first 2011 entries are equal to each other. The 2012th row is some how not equal, using the isequal function. Here is a dput of this row
ans =
reshape([2080857.000000 2080857.000000 ],[1 2])
Converting to int64 also does not give equality.
This is not the same as the linked duplicate question. I have tried techniques from there, including format long g and my values are still the same. In addition, the two columns of the table are the 'same', one is just the sorted ordering of the other, and to isequal, the first 2011 entries are equal and the 2012th entry is equal to my naked eye, or converted to integer.

Assigning the different row to another matrix after comparing two matrices

i have two matrices
r=10,000x2
q=10,000x2
i have to find out those rows of q which are one value or both values(as it is a two column matrix) different then r and allocate them in another matrix, right now i am trying this.i cannot use isequal because i want to know those rows
which are not equal this code gives me the individual elements not the complete rows different
can anyone help please
if r(:,:)~=q(:,:)
IN= find(registeredPts(:,:)~=q(:,:))
end
You can probably do this using ismember. Is this what you want? Here you get the values from q in rows that are different from r.
q=[1,2;3,4;5,6]
r=[1,2;3,5;5,6]
x = q(sum(ismember(q,r),2) < 2,:)
x =
3 4
What this do:
ismember creates an array with 1's in the positions where q == r, and 0 in the remaining positions. sum(.., 2) takes the column sum of each of these rows. If the sum is less than 2, that row is included in the new array.
Update
If the values might differ some due to floating point arithmetic, check out ismemberf from the file exchange. I haven't tested it myself, but it looks good.

How do I deterimine if a double is not infinity, -infinity or Nan in SSRS?

If got a dataset returned from SSAS where some records may be infinity or -infinity (calculated in SSAS not in the report).
I want to calculate the average of this column but ignore those records that are positive or negative infinity.
My thought is to create a calculated field that would logically do this:
= IIF(IsInfinity(Fields!ASP.Value) or IsNegativeInfinity(Fields!ASP.Value), 0 Fields!ASP.Value)
What I can't figure out is how to do the IsInfinity or IsNegativeInfinity.
Or conversely is there a way to calculate Average for a column ignoring those records?
Just stumbled across this problem and found a simple solution for determining whether a numeric field is infinity.
=iif((Fields!Amount.Value+1).Equals(Fields!Amount.Value), false,true)
I'm assuming you are using the business intelligence studio rather than the report builder tool.
Maybe you are trying a formula because you can't change the SSAS MDX query, but if you could then the infinity would likely be caused by a divide by zero. The NaN is likely caused by trying to do Maths with NULL values.
Ideally change the cube itself so that the measure is safe from divide by zero (e.g. IIF [measure] = 0,don't do the division just return "", otherwise do it) . Second option would be create a calculated measure in the MDX query that does something similar.
As for a formula, there are no IsInfinity functions so you would have to look at the value of the field and see if its 1.#IND or 1.#INF or NaN.