Skip to main content
A

Anonymous

Dec 14, 2024

For maximum efficiency, a good rule of thumb in an OR decision is to ____.?

For maximum efficiency in an OR decision, what is a good rule of thumb to follow? Should one first ask the question that is more likely to be true, or the question that is more likely to be false? Alternatively, is it more effective to restructure the decision as an AND decision and ask the question that is more likely to be true or the one that is more likely to be false?

3 Answers

A
Anonymous

Feb 13, 2025

Depends on the language. Many languages use short circuit evaluation so you could pick up some efficiency -- but typically the compiler is smart enough to perform such an optimization for you.

If you first ask the question that is more likely to be true then you're less likely to even need to ask any more questions.

Eg.

A true 80 percent

B true 50 percent

If you ask B first then there are more times in which you'd need to ask A.

Another,

Let's say you want the value of R where

R = A or B or C or...

most languages evaluate this left to right. If you evaluate A and it's true the R is true regardless of the values of the other variables. In fact, some language don't even evaluate the other variables.

first ask the question that is more likely to be true

Want to answer this question?

Join our community to share your knowledge!

Related Questions

3
Another expression for “it is raining” is “Está nublado.”

Question 1 (Yes/No Worth 1 point): Another expression for "it is raining" is "Está nublado." (Yes/No) Question 3 (Fill-i...

8
CSS stands for Cybernet Slash Support or Cybernet Software Systems ?

What does CSS stand for: Cybernet Slash Support or Cybernet Software Systems? I came across a company located in T. Naga...

1
Guys help please!! Just 1 Algebra 2 question?

I need assistance with an Algebra 2 problem. The question states that the variable ( r ) varies directly with ( s ) and...

2
how is Frank Garza’s Jockey School?

I hope this message finds you well. I have a few questions regarding Frank Garza’s Jockey School. I want to clarify that...

8
I am in 12th……I hav my physics board exam tomorrow……how do I complete my full course in one day ?

I'm in 12th grade, and I have my physics board exam tomorrow. How can I effectively cover the entire course material in...

6
projectile motion homework?

A rescue pilot needs to drop a survival kit while flying at an altitude of 2,000.0 meters with a forward velocity of 100...

10
Preschool vs. Montessori?

Hi everyone, I’m trying to make a decision between enrolling my child in a preschool or a Montessori program. He’s curr...

3
what is the hybridization of phosphorus atom in PCl3?

What is the hybridization of the phosphorus atom in PCl3? Additionally, could you please provide an explanation of the s...

4
What should I wear for Home Depot orientation tomorrow?

I just got hired for a part-time sales job at Home Depot, and I have my orientation tomorrow. I've never had a job where...

7
Which view in a presentation program displays your slides in full-screen mode?

What view in a presentation program allows you to display your slides in full-screen mode?