#How do I even go about solving this?

28 messages · Page 1 of 1 (latest)

gloomy zealot
warped citrusBOT
#

This post has been reserved for your question.

Hey @gloomy zealot! Please use /close or the Close Post button 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.

hasty pewter
#

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

wooden tundra
#

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 that a < c is 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 with or because 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

thorny lion
#

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

wooden tundra
#

lmao yeah that's much simpler for this case

gloomy zealot
#

Oh yeah I've never been good with truth tables

#

these type of questions really trip me up

gloomy zealot
gloomy zealot
wooden tundra
#

no, due to operator precedence, the expression there is a < c || (a < b && !(a == c))

wooden tundra
#

shouldve explained that more clearly, mb

#

wait shit that's wrong

#

yeah i got nothing, i shouldn't be doing support this late lol

gloomy zealot
#

all good lol

#

I think I kind of get what thomas is saying

#

thanks for the help!

warped citrusBOT
# gloomy zealot thanks for the help!

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.

wooden tundra
#

thomas' solution is the right way to analyze this expression

#

it's ultimately the same reduction i was aiming for, i just failed to execute that properly lol