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

  • Home
  • SEARCH
  • 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 6622585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:25:32+00:00 2026-05-25T21:25:32+00:00

Give an n log n time lower bound for an algorithm to check if

  • 0

Give an n log n time lower bound for an algorithm to check if a set of points has a special point k.

k is defined as:

for a set A of points, if for every point m in A, there is a point q in A such that k is in the middle of the line segment mq such a k does not have to belong to A.

For example, this set has a special point k = (0.5, 0.5) for a set of four points (1,0), (0,1), (1,1), (0,0).

I was totally poker faced when they asked me this, nothing came to my mind. I guess it needs some strong geometrical background.

  • 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-25T21:25:33+00:00Added an answer on May 25, 2026 at 9:25 pm

    O(nlogn) solution (I’m still not clear why you’re looking for a lower bound solution. You might as well just do an exhaustive check, and then just run an nlogn loop to make sure of the lower bound. Not very difficult. I think you must mean upper bound):

    Find the only valid candidate point by averaging all the points. I.e. summing their co-ordinates and dividing by the number of points. If such a k exists, this is it. If no such k exists, we’ll find that the point found is invalid in the final step.

    Create a new array (set) of points, where we shift our axes so they centre on the point k. I.e. if k = (xk,yk), a point (x,y) will become (x-xk, y-yk). Sort the points according to the ratio x/y and the norm sqrt(x2+y2). As the next step shows, it doesn’t matter how this sort is done, i.e. which is the main criterion and which the secondary.

    We could search for each point’s complement, or better, simply traverse the array and verify that every two adjacent points are indeed complements. I.e. if this is a solution then every two complementary points in this new array are of the form (x,y) and (-x,-y) since we re-centered our axes, which means they have the same ratio (“gradient”) and norm, and after the sort, must be adjacent.

    If k is not valid, then the there is a point who we will arrive at in this traversal, and find that it’s neighbour is not of the right/complementary form ==> there is no such k.

    Time =
    O(n) for finding the candidate k +
    O(n) for building the new array, since each new point can be calculated in O(1) +
    O(nlogn) for the sort +
    O(n) for the verifying traversal
    = O(nlogn)

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

Sidebar

Related Questions

Give a linear-time algorithm to test whether a tree has a perfect matching, that
Give an algorithm to find a given element x (give the co-ordinates), in an
i give users special URL with access key in it. users accessing the public
I need to save client machine time when he log in on my web
Is there any way to check from .NET if windows update is enabled? I
I'm trying to create an Event Log and Event Source at install time using
Let A[1]<=A[2]<=....<=A[n]. Let X be an arbitrary number. Give an algorithm find all pairs
Can a map and a min-heap used together give better amortized time that either
Give me some of your thoughts on which is a better coding practice/makes more
Give a base class Base , I want to write a method Test, like

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.