Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 13th, 2005, 07:02 PM
poutchi1 poutchi1 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 1 poutchi1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 56 sec
Reputation Power: 0
JAVA_Problem

Hi all, my knowledge of java language isnt great, so would appricviete it if any of you could help me out with this problem as soon as possible .

im trying to propose an application java multi process (threads) implementing the algorithm of the calculation of the "standard line" of a matrix A and B. This standard line called Z and its defined by : z=?C? or C=A*B;
A=(a ik)//ik are the indices of matrix A. B = (B kj)// kj are the indices of the matrix B. C = (C ij)// ij are the indices of the matrix C.
ij = ?a (ik) * B (kj)// K of 1 A p.
D (i) = ??C (ij) ? J of 1 A m.
Z = max (D (I))// I of 1 A N.
N, m, p, A, B should be read

I have been given this methode that im trying to use , but i am still not sure how to impliment it ( so, will need help with that):

steps are:
To calculate "Z" of a matrix C how its:
1- C is calculated from the product of A and B
2- make the sum of each line of the matrix C and put it in tables named D.
3- from there take the maximum of this table and the max of D it is standard Z of the matrix

B the indication to be added in relation to the java language

1 in the program will use 3 threads that we call: T1, T2, T3.
** the first thread T1 will carry out the product of both matrix A and B.
** the second thread T2 makes the sum of the lines of the matrix C.
** the third thread T3 will do the maximum of tables D.

2 if the matrix C result of product A and B has a dimension of (n*m) and for precise parallelism we will make of the first thread (n*m) other thread each will deal with the product of only one element of the matrix C.

i.e. if have a matrix C of (4*4) we will have 16 threads created of the first thread T1, the 16 thrads each will make the product of only one element of the matrix C.

3-Entering matrix A and B will not be done using the interface in javas but its the console which will deal with entering them
i.e. it is the computer which gives the values of the two matrices in a random way by using the methods randome
"for(int I = 0; I < N; i++ for(int J = 0; J < m; j++)

A[i][j ] = Math.random(); initialization of matrix A.
for(int I = 0; I < N; i++)
For(int j=0;j<m;j++)

B[i][j ] = Math.random(); initialization of the matrix B "and the dimensions used will be " int N = A.length; "for the lines and int m = A[0].length;for the columns.

we enter them and use for example "system.in.readln(n)" and "system.in.readln(m)".

4- after having implemented the methods run() and start() of the three thread we add the key word (synchroniserd) for the 3 threads since thread T2 cannot work except if it has the elements from the first thread T1 and similarly for the third thread T3.

NOTES:
- do not use the method stop() for the 3 threads notices
- matriecs A and B are created and of same dimension.(n*m) .

Sorry for such a long problem, but really need help . THANKS IN ADVANCE

Reply With Quote
  #2  
Old January 11th, 2007, 12:19 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 473 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 19 m 14 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
is this a java or javascript problem?

javascript is mainly for web-design yet java is mainly for applications, there are applets for java that can be inserted in html via a <applet> tag, but if this is java, i will alert the other admins to move this thread to the java section, there you may get a better responce..

colton22
__________________


Hang Out, Listen To Music, Have Fun, and Customize Your Experiance All In One Place! - Colton22's World - This is My World

Reply With Quote
  #3  
Old January 19th, 2007, 02:52 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Thread's been moved... it's definitely Java.
It sounds too math-y for me.

Had poutchi1 posted code, I might have been able to offer suggestions.
Comments on this post
colton22 agrees: code always helps!
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > JAVA_Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT