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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:04:43+00:00 2026-05-12T07:04:43+00:00

What is a good way to implement Gaussian elimination when the operators are custom

  • 0

What is a good way to implement Gaussian elimination when the operators are custom operators, rather then standard arithmetic ones?

Here are the operators:

Addition:

0 + 0 = 0
0 + 1 = 1
1 + 1 = 0

Subtraction:

0 - 0 = 0
0 - 1 = 1
1 - 1 = 0

Multiplication:

0 * 0 = 0
0 * 1 = 0
1 * 1 = 1

Division:

0 / 0 = illegal
0 / 1 = 0
1 / 1 = 1

Here is a sample set of equations as augmented matrix, with the RHS in the right-most column:

1, 1, 0, 1, 0, 0, 0, 0, 0, 1
0, 1, 0, 1, 1, 0, 0, 0, 0, 1
0, 1, 1, 0, 0, 1, 0, 0, 0, 1
1, 0, 0, 1, 0, 0, 0, 0, 0, 1
0, 1, 0, 1, 1, 0, 0, 0, 0, 1
0, 0, 0, 0, 0, 1, 0, 0, 0, 1
0, 0, 0, 1, 0, 0, 1, 0, 0, 1
0, 0, 0, 1, 1, 0, 1, 1, 0, 1
0, 0, 0, 0, 0, 1, 0, 0, 1, 1

The solution for this set is:

x1 = 1
x2 = 0
x3 = 0
x4 = 0
x5 = 1
x6 = 1
x7 = 1
x8 = 1
x9 = 0

Gaussian elimination failed for me as I tried it on this set.

The equations will have 9, 16, 25 or 36 terms. It would be great if the algorithm is easily extendable to larger squares, up to 100.
I’m looking for an algorithm, in pseudo code or JavaScript preferably.

  • 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-12T07:04:43+00:00Added an answer on May 12, 2026 at 7:04 am

    Gaussian Elimination Algorithm in pseudocode can be found here.

    It doesn’t matter if you are using ‘normal’ numbers or if you are in Z2 ring, the algorithm remains the same.

    What you could do is implement a structure to hold the values you are operating over and overload all necessary operators. Then all you need to do will be to rewrite pseudocode to the language you want to use it in.

    Unfortunately since you have mentioned JavaScript you cannot override operators in that language so this will become a bit more complex. I guess you could define functions that will perform operators job and use them instead of standard operators.

    function add(v1, v2) {
        if ((v1 != 0 && v1 != 1) || (v2 != 0 && v2 != 1)) {
            alert('Invalid params');
            return;
        }
    
        return (v1 + v2) % 2;
    }
    
    function subtract(v1, v2) {
        if ((v1 != 0 && v1 != 1) || (v2 != 0 && v2 != 1)) {
            alert('Invalid params');
            return;
        }
    
        return Math.abs((v1 - v2) % 2);
    }
    
    function multiply(v1, v2) {
        if ((v1 != 0 && v1 != 1) || (v2 != 0 && v2 != 1)) {
            alert('Invalid params');
            return;
        }
    
        return v1 * v2;
    }
    
    function divide(v1, v2) {
        if ((v1 != 0 && v1 != 1) || (v2 != 0 && v2 != 1)) {
            alert('Invalid params');
            return;
        } else if (v2 == 0) {
            alert('Divider cannot be zero');
            return;
        }
    
        return v1 / v2;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is a good way to implement keyboard handling? In any language, where I
Is there a good way in C++ to implement (or fake) a type for
Is there any good way to deal with the class renaming refactor from Resharper
Is there a good way for displaying unicode text in opengl under Windows? For
What is a good way to remove the code from display pages when developing
Is there a good way to create a form in VB6 that can easily
Does anyone have a good way to build MSI (vdproj) projects using MsBuild or
What is a good way to perform animation using .NET? I would prefer not
Is there a good way to see what format an image is, without having
What is a good way to render data produced by a Java process in

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.