#How do I even go about solving this?
28 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @gloomy zealot! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Uhh.. Although I'm a java beginner, I do have a thought. Since !(a==c), E is not right. Same thing with D, since a==b doesn't match a<b, nor does it guarantee for a<c and !(a==c) to match This goes the same way with C. For B, a<b matches, but it isn't guaranteed for !(a==c).
A, although, shows a<c, matching the first condition, a<c || a<b, and matches the condition !(a==c) because it has to be smaller. Therefore, the answer is A.
..At least that's what I think. I hope this helped!
@gloomy zealot
How do I even go about solving this?
the expression given can be reduced quite a bit, using some identities
||a < c or a < b && a != c||||spread the or into the and operation:(a < c or a < b) && (a < c or a != c)||||reduce:(a < c or a < b) && a < c||||from this you can see thata < cis necessary and sufficient for the condition to evaluate to true. you could reduce it further to prove it but this is enough to see it easily||
(||replaced withorbecause it was breaking the spoilers, sorry.)
as damku showed, since this is multiple choice, process of elimination works well here, but it won't work for real-use stuff, for which you'd narrow it with a strategy like i described.
"prepositional logic" is the relevant field here
It's time to draw a big truth table lol
even tho
by the short circuiting principle, if you have a OR b, if a is true, the entire expression is true. Therefore A is the correct answer.
if a < c is true then the entire proposition is true
lmao yeah that's much simpler for this case
Oh yeah I've never been good with truth tables
these type of questions really trip me up
but wouldn't that also work with a < b?
If you don't mind, can you explain the 2nd step? I'm not sure where the second a < c came from
no, due to operator precedence, the expression there is a < c || (a < b && !(a == c))
it's spreading the || into the parens in my above message ^
shouldve explained that more clearly, mb
wait shit that's wrong
yeah i got nothing, i shouldn't be doing support this late lol
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.