Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7181449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:33:33+00:00 2026-05-28T17:33:33+00:00

the question is like this: there is a sorted list of n numbers. Given

  • 0

the question is like this: there is a sorted list of n numbers. Given x, find a number which is equal to x in the sorted list. Here we assume that x is indeed in the list. There is an oracle that can answer “yes” or “no” to your question “whether x>=y?”. Unlike normal binary search, the oracle is allowed to lie once to your question. The most naive way to solve this problem is you ask each question twice to the oracle. If the two answers are the same, you know that the orale is not lying. This algorithm we need compare 2log_2(n) times. But this question ask me to find an algorithm that can find x using only log_2(n)+o(logn) comparisons.

I tried very hard but failed. Can anybody give me some advice on how to solve this problem? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:33:34+00:00Added an answer on May 28, 2026 at 5:33 pm

    Keep track of the interval you are in. If you need a total of k questions, check for consistency (whether you are in the interval you are supposed to be) every sqrt(k) steps. While checking for consistency you may ask each question twice to be sure. If you detect inconsistency, go back sqrt(k) steps. You will be asking no more than c*sqrt(k) additional questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are many questions like this but I can't find one that seems to
I have a question regarding sorting in C#. Lets assume that there is List<Person>
First of all there is probably a question like this already but i couldn't
Inspired by this question , I'd like to know whether there is any trick
I know there's no one answer to this question, but I'd like to get
I'd think there was a question on this already, but I can't find one.
This is similar to a recent question. I will be maintaining sorted a list
There are some similar questions like this already, but none of those fixes worked
There are many questions like this, but none of them seem to answer my
There a bunch of other questions like this, but the only substantial answer I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.