A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • one year ago

So, I'm having some difficulty understanding bisection searching... When a computer is using brute force to find an answer to a problem it goes through each possible choice, correct? So bisection searching is completed when you write code to limit the search space? What does this code look like? I was confused by the instructors example.

  • This Question is Open
  1. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Here is a link to some code that using bisection searching (I hope it helps you): http://stackoverflow.com/questions/15075792/using-bisection-search-on-lowest-payments-on-credit-card-debt-and

  2. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I believe bisection sort works because there is some transitive property about the data that will allow you to dismiss half of it with each iteration.

  3. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    For example, if the data is ordered, then the middle element can tell you whether it will be in the left half or the right half.

  4. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    So the code to make use of bisection search will limit the area the code by setting variables that outline the low and high limits of the search field? To make it even easier you can increment the variable by a larger value to make the brute force attack faster? Does that sound correct?

  5. rsmith6559
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    Brute force and bisection are two different approaches to the problem of finding one element of a set of ordered elements. The telephone book (white pages) are a good demonstration: I want to find a buddy whose last name is Smith. I bisect the white pages to the middle and see that I'm at 'M'. I know that 'S' comes after 'M', so I can ignore the pages below where I am. I've cut the number of elements to search in half. I then bisect the upper pages and get 'T'. 'T' is after 'S', so I know the upper pages are useless. I continue on until I find my buddy. Bisection will find my target in less than log2n ( the number of elements log 2 ). A million elements can be searched with a maximum of 20 tries ( 2**20 ). Because the solution, ( finding the correct element ) can be found by repeatedly doing the same procedure, the problem is recursive. I hope they're teaching bisection and recursion separately.

  6. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Wow, that's a good way to describe it! Thank you for the reply!

  7. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.