Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Array+dynamic programming
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
fabiocaravieri




PostPosted: Sun May 08, 2011 2:55 pm   Post subject: Array+dynamic programming

I work for a school, could someone help me ....
Suppose you are given an mX n bitmap, represented by an array M[1..m, 1.. n] whose entries are all 0 or 1. A solid block is a subarray of the form M[i .. i', j .. j'] in which every bit is equal to 1.
Describe and analyze an efficient algorithm to find a solid block in M with maximum area.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon May 09, 2011 10:37 am   Post subject: RE:Array+dynamic programming

So what's the question?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
fabiocaravieri




PostPosted: Mon May 09, 2011 11:01 am   Post subject: Re: RE:Array+dynamic programming

Tony @ Mon May 09, 2011 10:37 am wrote:
So what's the question?


I'm having difficulty producing a sub array with a larger amount of 1. If you can give any tips, I appreciate
Tony




PostPosted: Mon May 09, 2011 11:18 am   Post subject: RE:Array+dynamic programming

So your base case is a 1x1 subarray with a total of one bit. That should be fairly easy to recognize. Start with that.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
A.J




PostPosted: Mon May 09, 2011 12:07 pm   Post subject: RE:Array+dynamic programming

@fabiocaravieri - Are you getting these questions from an Algorithms course? Or are you asking us questions you encountered on some book/website?

If it is the former, I understand that you might need help with the concept of DP. However, if it is the latter, I HIGHLY recommend you attempting these problems on your own prior to asking for help, as when it comes to algorithmic programming, experience plays a huge part (especially with DP problems).
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: