I'm in problem set 3. Maybe I missed something, but I didn't hear exactly *how* to do bisection search! I tried looking it up online but I just got a lot of algorithmic gibberish I'm sure makes perfect sense to smart people. Anybody got an easier explanation?
MIT 6.00 Intro Computer Science (OCW)
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
A bisection search is used to converge on an answer that means each time we guess, we get closer to the correct answer. You need to know a min possible answer and a max possible answer.
Let's say I ask you to guess the number 'm thinking of which is between 1 and 100, inclusively, and let's say I only need you to be accurate within +/- 5.
I pick 36, but you don't know this.
You guess (high + low)/2 = (100+1)/2 which is about 50
I say lower.
High = 49
Low = 1
You guess (high + low)/2 = (49 + 1)/2 = 25
I say higher.
High = 49
Low = 26
You guess (high + low)/2 = (49 + 26)/2 = 75/2 = 37
I say you're within 5! You win!
That's how bisection search works.
Thanks! :) that helps a lot!
it wasn't covered in the lecture?