Saddle Point of a Matrix | MyCareerwise

文章推薦指數: 80 %
投票人數:10人

A saddle point of a matrix is an element of that matrix which is the minimum element of that row and a maximum element of that column. So, a saddle point is ... CREATEOWNLIBRARY SignUp Matrix MatrixAddition MatrixSubtraction MatrixMultiplication MatrixDeterminant TransposeofaMatrix CheckingofSquareMatrix CheckingdifferenttypesofMatrices NullMatrix InterchangingRowandColumninaMatrix InterchangingtheDiagonalofaMatrix MatrixMultiplicationRecursive FrequencyofOddandEveninaMatrix UpperTriangularMatrixChecking LowerTriangularMatrixChecking FindingUpperTriangularMatrix FindingLowerTriangularMatrix SortingRowandColumnofaMatrix FindTraceandNormalofaMatrix SaddlePointofaMatrix SymmetricMatrix SkewSymmetricMatrix ColumnsSortinAscendingOrderofaMatrix SpiralMatrix SaddlePointofaMatrix BacktoProgramming Description Asaddlepoint ofamatrixisanelementofthatmatrixwhichistheminimumelementofthatrowandamaximumelementofthatcolumn.So,asaddlepoint isapointwheretheminimumelementoftherowandthemaximumelementofthecolumnisthesame. Forexample:Letthematrixbe  Step1:Inthismatrixtheminimumelementofthefirstrowis1,but,inthatcolumn,themaximumelementis7.Therefore,1isnotthesaddlepoint.  Step2:Inthismatrixtheminimumelementofthesecondrowis4,but,inthatcolumn,themaximumelementis7.Therefore,4isnotthesaddlepoint.  Step3:Inthismatrix,theminimumelementofthethirdrow is7,andinthatcolumn,themaximumelementisalso7.Therefore,7isthesaddlepoint. Algorithm INPUT:Amatrix OUTPUT:Thesaddlepointofthematrix PROCESS: Step1:[Takingtheinputs] Readm,n[thenumberofrowsandcolumnsofthematrix] [Takingtheelements] Fori=0tom-1repeat Forj=0ton-1repeat Reada[i][j] [Endof‘for’loop] [Endof‘for’loop] Step2:[Findingthe‘SaddlePoint’] Fori=0ton-1repeat [findtheminimumelementofrowwithitscolumnindex] Setrow_mina[i][j]then Setrow_mina[i][j])-----O(c1)           {row_min=a[i][j];               ci=j;          }           }  //checkingtheminimumelementisthemaximumelementofthecolumnornot         for(k=0;k



請為這篇文章評分?