Thread: Finding a sub-matrix in a bigger matrix

  1. #1
    Registered User
    Join Date
    Oct 2012
    Tehran, Iran, Iran

    Question Finding a sub-matrix in a bigger matrix

    the input data are row and column of a main and a sub matrix. then the program has to say "yes" if the sub-matrix is found in the main one. I have no idea about the algorithm. I mean, the method to find a sub-matrix in a bigger matrix. I'm really confused by that.

    plz help. tnx.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Hmm... are you familiar with the various algorithms for finding a substring within a string? You could draw some inspiration from well known solutions to that problem (and after all, a string can be seen to be a row (or column) vector of characters).
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. reading a matrix and printing out the matrix
    By Lina_inverse in forum C Programming
    Replies: 9
    Last Post: 10-23-2012, 04:09 PM
  2. adjacency matrix and sparse matrix
    By dpp in forum C Programming
    Replies: 3
    Last Post: 07-11-2010, 10:26 AM
  3. Need help in Matrix Addition & finding Inverse of a Matrix
    By ssatyan.129 in forum C Programming
    Replies: 6
    Last Post: 05-15-2009, 02:48 PM
  4. Finding Eigenvalues and Eigenvectors of a matrix
    By Zeeshan in forum C++ Programming
    Replies: 3
    Last Post: 06-13-2008, 02:50 AM
  5. Matrix: Reloaded + Enter The Matrix (the game)
    By LuckY in forum A Brief History of
    Replies: 10
    Last Post: 04-18-2003, 12:35 AM