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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:02:58+00:00 2026-06-17T17:02:58+00:00

Given an N x M matrix having only positive integer values, we have to

  • 0
Given an N x M matrix having only positive integer values, we have to nullify the matrix 
i.e make all entries 0.
We are given two operations
1) multiply each element of any one column at a time by 2.
2) Subtract 1 from all elements of any one row at a time

Find the minimum number of operations required to nullify the matrix.

i thought of doing something related to LCM but could not reach to a solution

  • 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-17T17:03:00+00:00Added an answer on June 17, 2026 at 5:03 pm

    Let’s first solve for 1 row first and we can extend it to all rows. Let’s take a random example:

    6 11 5 13
    

    The goal is to make all elements as 1. First we make 5 (smallest element) as 1. For this we need to subtract 4 (i.e subtract 1 four times). The resultant array is:

    2 7 1 9
    

    Now we multiply 1 with 2 and subtract all row elements by 1:

    1 6 1 8
    

    Next, we multiply 2 1’s by 2 and subtract all row elements by 1:

    1 5 1 7
    

    Continuing in this manner, we get to 1 1 1 1. Now we subtract 1 to get 0 0 0 0.

    Next, we get to other rows and do the same like above. The row we nullified above are all zeroes so multiplication by 2 when manipulating other rows doesn’t change the already nullified rows.

    The question of finding the minimum number of operations would also depend on the row sequence we select. I think that would be to select a row whose maximum is minimum (among other rows) first. I need to verify this.

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

Sidebar

Related Questions

given an n*m matrix with the possible values of 1, 2 and null: .
Given an n-dimensional matrix of values: what is the most efficient way of retrieving
Given graph, how could i represent it using adj matrix?. I have read lots
I have a string of style transform given in the following way : matrix(0.312321,
I'm having a weird result with Matlab's trapz function. I have two variables, zptest
I'm trying to solve the problem of having a co-occurence matrix. I have a
I've created a function (name it MyFunction) which, given a matrix A, outputs two
Given a matrix M and smaller matrices with different possible values, I seek to
Given an arbitrary 4x4 transformation matrix, how do I find out the center of
I have got a matrix which gives me a 2-dimensional discrete distribution (N²->R) 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.