Boolean simplification issue - boolean-logic

Boolean simplification of B'C'+A'B'+A'C+BC' it's supposed to be A'+C'.
Currently I'm stucked at:
C'(B'+B)+A'(B'+C) =
C'+A'(B'+C)
I just can use the basic theoremes, nothing of k-maps.

After a long thinking I mannaged to resolve it; if it helps anyone:
B'C'+A'B'+A'C+B'C' = C'(B'+B) + A'C + A'B = C' + A' + A'B = C' + A'(1+B') = A'+ C'

Related

How can I fix an error in the MCMChregress function that seems to stem from the R argument

I'm attempting to run a Bayesian Hierarchical model using MCMChregress, but don't know to fix the problem expressed by this error. My code is below. I believe the problem has to do with the R and r argument and how they relate to the number of parameters. So I didn't include the data set. Let me know if any additional information would be helpful!
"Error: in Wishart(r,rR) prior, R not comformable [q times q].
Error in form.wishart.prior.hmodels(r, R, nq) :
Please respecify and call MCMChregress() again."
#bayesian hierarchical
bhlm.2 = MCMChregress(
fixed = nip_wk_avg ~ unique_elements + vbs.theme_relevance +
vbs.total_score + vbs.product_attributes +
Super_Segment + vbs.play_promise +
vbs.visual_appeal + outgoing + pp79.99 + pp19.99,
random = ~ unique_elements + vbs.theme_relevance +
vbs.total_score + vbs.product_attributes +
Super_Segment + vbs.play_promise +
vbs.visual_appeal + outgoing + pp79.99 + pp19.99,
group = "Super_Theme", data = train.data,
r = 20, R = diag(20))

SSRS Hyperlink expressions

I am wanting to understand if possible to set a conditional hyperlink expression in SSRS within the Action setting.
My code which works currently is
=iif(First(Fields!IsHosted.Value, "ReportServer") = "Y", First(Fields!ServerName.Value, "ReportServer"), Globals!ReportServerUrl) +
"/Pages/ReportViewer.aspx?" + Globals!ReportFolder + "/" +
code.GetTargetReportName("Student Performance Against Goal Drill") +
"&GoalCol=" + Code.URLEncode(Parameters!GoalCol.Value) +
"&SectionCol=" + Code.URLEncode(Parameters!SectionCol.Value) +
"&TargetCol=" + Code.URLEncode(Parameters!TargetCol.Value) +
"&ItemCol=" + Cstr(Fields!Item.Value)
I simply want to say "If field B =0 then do nothing, else use the above. I am not familiar how to wrap this statement in the action.
You can nest IIF() functions:
=IIF(First(Fields!B.Value,"ReportServer") = 0,Nothing,
iif(First(Fields!IsHosted.Value, "ReportServer") = "Y",First(Fields!ServerName.Value, "ReportServer"), Globals!ReportServerUrl) +
"/Pages/ReportViewer.aspx?" + Globals!ReportFolder + "/" +
code.GetTargetReportName("Student Performance Against Goal Drill") +
"&GoalCol=" + Code.URLEncode(Parameters!GoalCol.Value) +
"&SectionCol=" + Code.URLEncode(Parameters!SectionCol.Value) +
"&TargetCol=" + Code.URLEncode(Parameters!TargetCol.Value) +
"&ItemCol=" + Cstr(Fields!Item.Value)
)
I don't know what the dataset structure is but this could help you.

incorrect syntax near 'A'

What could be wrong with this select statement? I get an error called incorrect syntax near 'A'.
Since I am more used to write queries in postgreSQL, my guess is that MySQL has a bit different syntax.
cmd.CommandText = "WITH CurrentStop AS (SELECT[Stop Id] FROM Stops WHERE[Route Id] = " +
routeId + "AND Serial = " + stopsDriven + ")" +
"SELECT A.Firstname, A.Lastname, B.Make, B.Capacity, B.Route, D.Name" +
"FROM Driver A, Bus B, CurrentStop C, Stop D" +
"WHERE A.Id = " + row[0] + "AND B.[Bus Id] = " + row[1] + "AND C.[Stop Id] = D.[Stop Id]";
By the way, all inputs are in system only so no SQL injection could possibly happen.
Print out the query before trying to execute it and examine it closely. This solves a large chunk of the "what's wrong with my dynamically generated query?" style questions we see here.
For example, I'd be wary of the lack of space between (not necessarily an exhaustive list, these are just the ones I noticed):
routeId and the following AND;
row[0] and the following AND;
row[1] and the following AND;
D.Name and the following FROM; and
Stop D and the following WHERE.
Those last two are definitely problematic since, while it is possible the variables may end in a space (though unusual), the fixed strings certainly don't. And both may be causing the specific error you see since they would come out as:
D.NameFROM Driver A
Stop DWHERE A.

Actionscript - call symbol using variable as part of name (increment number) and change x/y position

Looked everywhere for this but can't find anything so I hope someone can help. Maybe there is something online but I am not putting it in the right words....
Using Actionscript I want to change the x and y multiple symbols I have that go up by row number and col number in their names i.e. SP_01_01 - SP_01-10...... SP_02_01... etc
I need to access that symbol using two other variables holding the Number parts of the name and change the x and y values.
Here is what I have tried from what I've searched and thought was corrent
["SP__" + rownum + "_" + colnum].x = xcol;
["SP__" + rownum + "_" + colnum].y = yrow;
Try to call objects in this way:
getChildByName("SP__" + rownum + "_" + colnum).x = xcol;
getChildByName("SP__" + rownum + "_" + colnum).y = yrow;
This way even better:
import flash.display.DisplayObject;
var cell:DisplayObject = getChildByName("SP__" + rownum + "_" + colnum);
cell.x = xcol;
cell.y = yrow;

Basic boolean minimization

I am trying to simplify the following piece of boolean algebra so I can construct the circuit :
A'.B'.C.D + A'.B.C.D' + A'.B.C.D + A.B'.C'.D + A.B'.C.D + A.B.C'.D + A.B.C.D' + A.B.C.D
So far I have gotten it to :
(C.D) + (B.C) + (A.C'.D)
Is this correct?
I want to get the best possible minimization.
The steps I have went through so far are :
A'.B'.C.D + A'.B.C.D' + A'.B.C.D + A+B'+C'+D + A.B'+C+D + A.B.C'.D + A.B.C.D' + A.B.C.D
= A.A'(B'.C.D) + A.A'(B.C.D') + A.A'(B.C.D) + B.B'(A.C'.D)
= (B.C.D) + (B'.C.D) + (B.C.D) + (B.C.D') + (A.C'.D)
= (C.D) + (B.C) + (A.C'.D)
Can I do any more?
Assuming your equation is actually:
X = (A'.B'.C.D) + (A'.B.C.D') + (A'.B.C.D) + (A+B'+C'+D) + (A.B'+C+D) + (A.B.C'.D) + (A.B.C.D') + (A.B.C.D);
I just ran this through Logic Friday and it factored it down to:
X = 1;
So you might want to check your simplification work and/or check that you've given the correct equation.
However I suspect there may be typos in the original equation above, and perhaps it should be:
X = (A'.B'.C.D) + (A'.B.C.D') + (A'.B.C.D) + (A.B'.C'.D) + (A.B'.C.D) + (A.B.C'.D) + (A.B.C.D') + (A.B.C.D);
?
In which case Logic Friday simplifies it to:
X = B.C + A.D + C.D;
The only thing I can see that you could possibly do is distribute the "C" in the left two terms:
(C).(B+D)+(A.C'.D)
Or you could distribute the "D":
(C+A.C').D + (B.C)
Response to Comment: The distributive law is described here: http://www.ee.surrey.ac.uk/Projects/Labview/boolalgebra/. See the information under heading "T3"
Here's another solution (found by brute force):
(a+c).(b+d).(c+d)
for simplifying boolean expressions use karnaugh maps. i think it is very much useful if we less number of variables. but if we have more variables then we can follow methods because this method is not that preferable.