Hi i am a newbie learning java.. Well i am currently practicing from the book " A Concise and Practical introduction to programming algorithms in java".. So far now i have covered the basics upto arrays.. I have not yet reached object, strings classes and so on.. the problem i am stuck with is from the chapter on arrays on these 2 problems
A d-dimensional symmetric matrix M is such that Mi,j = Mj,i for all
1 ≤ i, j ≤ d. That is, matrix M equals its transpose matrix: MT = M.
Consider storing only the elements Mi,j with d ≥ i ≥ j ≥ 1 into a ragged
array: double   symMatrix=new double [d];. Write the array
allocation instructions that create a 1D array of length i for each row of
the symMatrix. Provides a static function that allows one to multiply two
such symmetric matrices stored in “triangular” bi-dimensional ragged
Consider that an image with grey level ranging in [0, 255] has been
created and stored in the regular bi-dimensional data-structure byte
  img;. How do we retrieve the image dimensions (width and
height) from this array? Give a procedure that calculates the histogram
distribution of the image. (Hint: Do not forget to perform the histogram
normalization so that the cumulative distribution of grey colors sums up
I dont want any code for these as i want to try and code it myself.. I just dont understand the problems.. Can anyone explain it to me as to what the problems are all about???
About the histogram do i need to display the width as 0 and height as 255 using a function prototype say like DisplayDimensions(byte img)???.. I dont think the problem is that simple
I really dont get how do i normalize the histogram and with what data?? And what is histogram distribution??..
+1; focus either on Java, or algorithms. If you're learning Java, an algorithms book isn't the best place to start.
Even if you're familiar with other programming languages, a book focusing on algorithms isn't necessarily going to teach you how to think in Java.
Joined: Sep 29, 2009
Yup i am familiar with that.. I know the basics of java and i am just trying to improve my problem solving capacity.. I am using the book to help me think in a way to solve problems!!!.. I just want to be able to solve problems.. So can you please help me with what the problem states???
In the ragged matrix problem.. Do i need to create two matrices say a and b and write a function to multiply these two matrices??? get the reason why they given the conditions of matrix transpose??
In the histogram problem i do not know with what data do i calculate the histogram distribution and what is meant by normalization?? And how do i get the values of gray color?? I don't think i can do that with the given 9 and 255
But if I tell you what the problem states you're not really solving the problem, are you--*I* am!
I'd recommend either breaking it down piece-by-piece, or starting with something easier. I'm not really prepared to explain linear algebra etc. in the Java forum ;)
Joined: Sep 29, 2009
hey i know linear algebra, calculus even matrix transformations like scaling rotation and all stuffs... All i asked was what the problem states you need not explain to me what i should do in the problem.. Just tell me what the problem says?? I think i am asking for too much. Thanks anyways for all your help..
subject: Ragged matrix and histogram image problem