Results 1 to 3 of 3
  1. #1
    osenna66 is offline Member
    Join Date
    Jul 2011
    Posts
    18
    Rep Power
    0

    Default Determinant of matrix

    The determinant of a matrix can be cal- culated by taking performing the following for every entry in the 0th row of a matrix.

    (a) If the matrix has only 1 row and 1 column, then the determinant is just whatever that 1 entry is.

    (b) Otherwise, for a number in the ith column (starting from zero) and 0th row, cross off (temporarily) the entire ith column and 0th row.

    (c) The resulting matrix has 1 fewer row and 1 fewer column after crossing them off. Take the determinant of this matrix and multiply the result by the value in the ith column and 0th row.

    (d) If i is odd, multiply the result by negative 1. (e) Sum up all such results.

    USING RECURSION write a method to calculate the determinant of a matrix.

    The header should look something like this:
    public static int calculateDeterminant(int[][] m)

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

    Default

    Hi osenna, welcome to the forum.

    I'm sure you don't expect anyone here to do your homework for you! (for this or the other 3 posts) But to get started and provide some help we need to know what the problem is: not the assignment you were given, but the problem you have doing that assignment.

    Do you understand the assignment? If not, what questions do you have about it?

    Have you written code to attempt to do what the assignment asks? If you have and there are compiler messages that you can't understand, post the code and the entire compiler message(s).

    Does your program compile sucessfully but do something weird at runtime? (throw an exception, or give a result that you know is incorrect). If so, post the code and say what the actual behaviour at runtime is, and what you were expecting to happen.

    -----

    I guess this observation and these questions apply to your other posts, although I haven't read them in any detail.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Let's close all of the homework dump threads and start over. Osenna, I invite you to repost any questions that you have, but please show your work and ask a specific question. Repeatedly posting homework or interview dumps can result in your being banned.
    Last edited by Fubarable; 07-03-2011 at 06:00 AM.

Similar Threads

  1. Help with dox matrix printer
    By Albert in forum Advanced Java
    Replies: 7
    Last Post: 09-06-2011, 09:50 AM
  2. Transposing a matrix
    By atomant in forum New To Java
    Replies: 11
    Last Post: 12-05-2010, 09:10 AM
  3. reading Matrix
    By metrokid in forum New To Java
    Replies: 1
    Last Post: 12-04-2010, 01:48 PM
  4. help in matrix
    By Engineer in forum New To Java
    Replies: 7
    Last Post: 10-06-2010, 02:26 PM
  5. Help with matrix
    By susan in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •