answersLogoWhite

0

  1. Matrix-Addition(a,b)
  2. 1 for i =1 to rows [a]
  3. 2 for j =1 to columns[a]
  4. 3 Input a[i,j];
  5. 4 Input b[i,j];
  6. 5 C[i, j] = A[i, j] + B[i, j];
  7. 6 Display C[i,j];
User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

Write an algorithm for multiplication of two matrix using pointers?

To multiply two matrices using pointers in C, first ensure that the number of columns in the first matrix matches the number of rows in the second matrix. Then, allocate memory for the resultant matrix. Use nested loops: the outer loop iterates over the rows of the first matrix, the middle loop iterates over the columns of the second matrix, and the innermost loop calculates the dot product of the corresponding row and column, storing the result using pointer arithmetic. Finally, return or print the resultant matrix.


Algorithm for transpose of matrix?

transpose(Matrix mat,int rows, int cols ){ //construction step Matrix tmat; for(int i=0;i<rows;i++){ for(int j=0;j<cols;j++){ tmat[j][i] = mat[i][j]; } } }


Write a c program for matrix addition using function?

#include<


What is the algorithm to generate transpose of given matrix?

To generate the transpose of a given matrix, you can swap its rows and columns. For a matrix ( A ) with dimensions ( m \times n ), the transpose ( A^T ) will have dimensions ( n \times m ). Specifically, the element at position ( (i, j) ) in matrix ( A ) becomes the element at position ( (j, i) ) in matrix ( A^T ). This can be achieved using a nested loop that iterates through the original matrix and assigns values to the transposed matrix accordingly.


What is the difference between matrix multiplication and Johnson method?

Matrix multiplication is a mathematical operation that combines two matrices to produce a third matrix, following specific rules for element-wise multiplication and summation. In contrast, the Johnson method is a specific algorithm used in operations research, particularly for solving the two-machine flow shop scheduling problem, which minimizes the makespan of jobs processed on two machines. While matrix multiplication is a general mathematical concept applicable in various fields, the Johnson method is tailored for optimizing scheduling tasks.

Related Questions

What is the time complexity of the Strassen algorithm for matrix multiplication?

The time complexity of the Strassen algorithm for matrix multiplication is O(n2.81).


C Matrix addition program?

How we can addition Two Matrix plz send coding in C language mahesh dhanotiya astah_mahesh@rediff.com how i can built a square matrix in c,


What is a fast-transpose algorithm for sparse matrices?

A fast-transpose is a computer algorithm that quickly transposes a sparse matrix using a relatively small amount of memory. Using arrays normally to record a sparse matrix uses up a lot of memory since many of the matrix's values are zero. In addition, using the normal transpose algorithm to transpose this matrix will take O(cols*elements) amount of time. The fast-transpose algorithm only uses a little memory to record the matrix and takes only O(cols+elements) amount of time, which is efficient considering the number of elements equals cols*rows.


What is the algorithm to find the longest increasing path in a matrix?

The algorithm to find the longest increasing path in a matrix is called the Longest Increasing Path in a Matrix (LIP) algorithm. It involves using dynamic programming to recursively search for the longest increasing path starting from each cell in the matrix. The algorithm keeps track of the length of the longest increasing path found so far and updates it as it explores different paths.


Are matrix addition and matrix multiplication commutative?

Matrix addition is commutative if the elements in the matrices are themselves commutative.Matrix multiplication is not commutative.


How can the RANSAC algorithm be utilized to estimate a homography matrix for robustly matching corresponding points in two images?

The RANSAC algorithm can be used to estimate a homography matrix by iteratively selecting random sets of corresponding points in two images and calculating the homography matrix for each set. The set with the most inliers (points that fit well with the estimated homography) is then chosen as the best estimate. This helps in robustly matching corresponding points between the two images.


What is the worst case analysis for matrix multiplication algorithm?

n^3


If properties of matrix addition let A B C D the m n matrix then 1 A plus B B plus A?

Yes. Matrix addition is commutative.


Write a program using iostreams to take as input two multi-dimensional arrays and print their sum as output Matrix Addition in Matrix format?

http://www.assignmentsclub.com/


What property states that the order of two numbers in an addition or multiplication problem can be changing the result of the problem?

That is non-commutativity. Matrix multiplication is non-commutative although addition still is.


What is the definition of standard algorithm?

The definition of "standard algorithm" is that it is a mathematical method used to solve problems such as addition, substraction, division, and multiplication.


What are math terms that start with an a?

Algebra Algebraic Algorithm Algorithms Addition Average