Like Tree1Likes
  • 1 Post By theoobe

Help with getting a minimized SQUARE matrix with list of positions

This is a discussion on Help with getting a minimized SQUARE matrix with list of positions within the C# Programming forums, part of the General Programming Boards category; Hi, I got a square matrix (0 1 2 3) [0, 20, 47, 35] [20, 0, 30, 34] [47, 30, ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Location
    Singapore
    Posts
    24

    Help with getting a minimized SQUARE matrix with list of positions

    Hi,

    I got a square matrix (0 1 2 3)
    [0, 20, 47, 35]
    [20, 0, 30, 34]
    [47, 30, 0, 12]
    [35, 34, 12, 0]

    i got a list of positions (0 1 3)

    How am i suppose to minimize this matrix to
    [0, 47, 35]
    [20, 0, 34]
    [35, 34, 0]

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,171
    Sounds like a homework question. We're not in the business of handing out answers. Where's your attempt? Try it and tell us where you're stuck and we'll help you with specifics.
    If you understand what you're doing, you're not learning anything.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Location
    england
    Posts
    209
    i got a list of positions (0 1 3)
    The first horizontal line of the minimized answer doesn't tally with 0 1 3. It's 0 2 3. The second and third lines are 0 1 3 as expected. Do you see what I mean?

    [0, 20, 35]
    [20, 0, 34]
    [35, 34, 0]

    Shouldn't this be the objective?
    quzah likes this.

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    129
    As others always mention about these type of questions, no-one will give you the answer. But if you've paid attention to your classes you should notice pretty quickly there is a repetition involved.
    He who asks is a fool for five minutes, but he who does not ask remains a fool forever.

    The fool wonders, the wise man asks. - Benjamin Disraeli

    There are no foolish questions and no man becomes a fool until he has stopped asking questions. Charles Steinmetz

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Storing matrix positions and using them in a struct?
    By litzkrieg in forum C Programming
    Replies: 2
    Last Post: 08-29-2011, 04:08 PM
  2. square root of a matrix
    By kwzeet in forum C Programming
    Replies: 2
    Last Post: 07-07-2011, 01:26 AM
  3. A square matrix with complex numbers
    By bchudomelka in forum C Programming
    Replies: 5
    Last Post: 05-28-2010, 07:35 PM
  4. line-square and circle-square intersections
    By tomast in forum Game Programming
    Replies: 1
    Last Post: 11-16-2008, 08:12 AM
  5. square matrix
    By sal817 in forum C Programming
    Replies: 1
    Last Post: 04-08-2006, 12:09 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21