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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:58:34+00:00 2026-05-12T08:58:34+00:00

How can I invert a binary equation, such that I can find which inputs

  • 0

How can I invert a binary equation, such that I can find which inputs will produce a given output.

Example:

Inputs: i0 through i8
Outputs: o0 through o8
Operators: ^ = XOR, & = AND

Binary equations:

(1&i0) ^ (1&i1) ^ (0&i2) ^ (1&i3) ^ (0&i4) ^ (0&i5) ^ (0&i6) ^ (0&i7) ^ (0&i8) = o0
(0&i0) ^ (1&i1) ^ (0&i2) ^ (1&i3) ^ (1&i4) ^ (0&i5) ^ (0&i6) ^ (0&i7) ^ (0&i8) = o1
(0&i0) ^ (1&i1) ^ (1&i2) ^ (0&i3) ^ (0&i4) ^ (1&i5) ^ (0&i6) ^ (0&i7) ^ (0&i8) = o2
(1&i0) ^ (0&i1) ^ (0&i2) ^ (1&i3) ^ (0&i4) ^ (0&i5) ^ (0&i6) ^ (0&i7) ^ (0&i8) = o3
(0&i0) ^ (1&i1) ^ (0&i2) ^ (1&i3) ^ (1&i4) ^ (0&i5) ^ (0&i6) ^ (0&i7) ^ (0&i8) = o4
(0&i0) ^ (0&i1) ^ (0&i2) ^ (0&i3) ^ (0&i4) ^ (1&i5) ^ (0&i6) ^ (0&i7) ^ (0&i8) = o5
(0&i0) ^ (0&i1) ^ (0&i2) ^ (1&i3) ^ (0&i4) ^ (0&i5) ^ (1&i6) ^ (0&i7) ^ (0&i8) = o6
(0&i0) ^ (0&i1) ^ (0&i2) ^ (1&i3) ^ (1&i4) ^ (0&i5) ^ (1&i6) ^ (1&i7) ^ (0&i8) = o7
(0&i0) ^ (0&i1) ^ (0&i2) ^ (0&i3) ^ (0&i4) ^ (1&i5) ^ (0&i6) ^ (0&i7) ^ (1&i8) = o8

In matrix form:

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

Additional limitations:

  • The prime diagonal is always 1
  • I am interested if there is a solution or not, more then the solution itself

How can I, algorithmically find inputs i0 -i8 such that outputs o0 – o8 are 1? What I really want to find is if there is such a solution or not.

I need an algorithm which is scalable to larger networks, at least up to 100 inputs/outputs.

  • 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-12T08:58:34+00:00Added an answer on May 12, 2026 at 8:58 am

    With XOR (rather than OR), it seems at first glance that some form of Gauss–Jordan elimination can at least simplify the problem. Adapting the pseudocode from the Wikipedia article on reduced row echelon form, we get:

    function ToReducedRowEchelonForm(Matrix M) is
        // 'lead' is the column index in a row of the leading 1
        lead := 0
        rowCount := the number of rows in M
        columnCount := the number of columns in M
        for 0 ≤ r < rowCount do
            if columnCount ≤ lead then
                stop
            end if
            i = r
            // Find row with lead point
            while M[i, lead] = 0 do
                i = i + 1
                if rowCount = i then
                // no pivot in this column, move to next
                    i = r
                    lead = lead + 1
                    if columnCount = lead then
                        stop
                    end if
                end if
            end while
            Swap rows i and r
            for 0 ≤ i < rowCount do
                if i ≠ r do
                    Set row i to row i XOR row r
                end if
            end for
            lead = lead + 1
        end for
    end function
    

    This converts the sample to:

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

    From there, you could adapt an integer partitioning algorithm to generate the possible inputs for a row, taking in to account the partitions for previous rows. Generating a partition is a great candidate for memoization.

    Still need to do a timing analysis to see if the above is worthwhile.

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

Sidebar

Ask A Question

Stats

  • Questions 209k
  • Answers 209k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I have figured it.If you create a strong typed view,you… May 12, 2026 at 9:40 pm
  • Editorial Team
    Editorial Team added an answer That's because 2 doesn't have a multiplicative inverse mod 26:… May 12, 2026 at 9:40 pm
  • Editorial Team
    Editorial Team added an answer I got 1 solution : [[array componentsJoinedByString:@","] writeToFile:@"components.csv" atomically:YES encoding:NSUTF8StringEncoding… May 12, 2026 at 9:40 pm

Related Questions

How do you use a binarywriter to write the correct MS SQL native format
So I am trying to do a bulk insert with SSIS and continually get:
How can I write XML data into the Windows Event Log? I have noticed
I want to write a python script that populates a database with some information.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.