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 8269969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:24:37+00:00 2026-06-08T06:24:37+00:00

I’ve the following problem: Given n points in a space, I’m searching a hyperplane

  • 0

I’ve the following problem:

Given n points in a space, I’m searching a hyperplane that goes through them.

The easiest example of such a problem is two points (x_1=0,x_2=0) and (1,-1) and I would like to get 1*x_1+1*x_2=0 returned.

My points will be n-tuples of 32-bit integers. The coefficients a_i of the desired hyperplane a_1 x_1 + a_2 x_2 + … = c must be 32-bit integers as well. In case the hyperplane cannot be defined this way, I would like to have this reported.

My project is coded in c++.

I would probably able to code this up by myself but I anticipate that this would be quite a bit of work. Also, my hunch is that this is a problem general enough that there might be an open-source library which would solve my problem. Does anybody know about a library which could solve my problem?

Thanks in advance!

  • 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-06-08T06:24:39+00:00Added an answer on June 8, 2026 at 6:24 am

    Actually this is not very hard, given that the given points are linear independent.

    Let u^i in Z^n be your nodes, then define v^i as (u^i_0, …, u^i_{n-1},-1).

    Now create a matrix A

    ( v^0_0     v^0_1 ...     v^0_n     )
    ( v^1_0     v^1_1 ...     v^1_n     )
        .         .             .
        .         .             .
        .         .             .
    ( v^{n-2}_0 v^{n-2}_1 ... v^{n-2}_n )
    

    What you have to solve is A * x == 0.

    Now go ahead and perform the Gaussian elimination. Make sure that you still let the coefficients to be integers. So instead of doing r_k -= r_ki * r_i / r_ii, you’ll have to do r_k = r_ki * r_i – r_ii * r_k. After each step, divide the processed row by its greatest common divisor. This usually avoids overflow. If you experience overflows, just use a larger type for the matrix operations itself.

    In the end, you’ll have a matrix in which there are at most two columns that have more than one entry. Your solution will depend on the choice of values of these two rows only, e.g. it will look something like

    1 1 1 0 0 0
    2 0 0 1 0 0
    0 1 0 0 1 0
    1 1 0 0 0 1
    

    assign any values to x_0 and x_1 (in this example) and you’re done.
    The last value of x will be your right hand side of the hyperplane equality.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

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.