Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Welcome To 
Our Presentation 
Course: 
CSE 221/222 Summer 2014 
1
Course Teacher: 
Nasrin Hakim Mithila 
Lecturer 
Dept. of Computer Science and Engineering(CSE) 
Faculty of Science & Info...
Our Group Name: Silent Hunter 
Members: 
 1. Syed Ahmed Zaki (ID:131-15-2169) 
 2. Md. Sazzad Hossain (ID:131-15-2368) 
...
Our Topic 
Project No. 1 in the project list 
Question: 
There are n SMTP servers connected by network cables. Each 
of th...
Input 
Input 
The first line of input gives the number of cases, N. N test 
cases follow. Each one starts with a line cont...
Output 
Output 
For each test case, output the line "Case #x:" followed 
by the number of milliseconds required to send a ...
In console method representation 
Sample Input Sample Output 
3 
2 1 0 1 
0 1 100 
3 3 2 0 
0 1 100 
0 2 200 
1 2 50 
2 0 ...
Input: 
Graphical Representation 
N // N = Test Case Number 
n m S T 
int int w 
//n =SMTP servers on the network (2<=n<20...
Graphical Representation 
Case #1: 
1 0 
w=100 
m 
S T 
w=100 
Case #2: 0 1 
S 
m T 
2 
Case # 3: unreachable 
Output: 
0 ...
Algorithm 
As from the input description we have found that we 
have to iterate through all vertex but in minimum 
shortes...
Dijkstra Algorithm 
11
Eclipse View 
Code: 
12
UVA Submission 
13
Future Plan 
We have a plan to make it more frequently and user 
friendly. 
And will make available this code for open sou...
Bug/Error/Limitations 
 We have to use here delimiter “[]+” in Java’s built in 
input/output system in BufferedReader 
th...
Implementing and focusing on the code was our main 
objective and we tried our best. 
Thank you Mam for staying with us. 
...
Upcoming SlideShare
Loading in …5
×

Algorithm Presentation

613 views

Published on

Algorithm Presentation

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Algorithm Presentation

  1. 1. Welcome To Our Presentation Course: CSE 221/222 Summer 2014 1
  2. 2. Course Teacher: Nasrin Hakim Mithila Lecturer Dept. of Computer Science and Engineering(CSE) Faculty of Science & Information Technology (FSIT) Daffodil International University 2
  3. 3. Our Group Name: Silent Hunter Members:  1. Syed Ahmed Zaki (ID:131-15-2169)  2. Md. Sazzad Hossain (ID:131-15-2368) 3
  4. 4. Our Topic Project No. 1 in the project list Question: There are n SMTP servers connected by network cables. Each of the m cables connects two computers and has a certain latency measured in milliseconds required to send an email message. What is the shortest time required to send a message from server S to server T along a sequence of cables? Assume that there is no delay incurred at any of the servers. 4
  5. 5. Input Input The first line of input gives the number of cases, N. N test cases follow. Each one starts with a line containing n (2<=n<20000), m (0<=m<50000), S (0<=S<n) and T (0<=T<n). S!=T. The next m lines will each contain 3 integers: 2 different servers (in the range [0, n-1]) that are connected by a bidirectional cable and the latency, w, along this cable (0<=w<=10000). 5
  6. 6. Output Output For each test case, output the line "Case #x:" followed by the number of milliseconds required to send a message from S to T. Print "unreachable" if there is no route from S to T. 6
  7. 7. In console method representation Sample Input Sample Output 3 2 1 0 1 0 1 100 3 3 2 0 0 1 100 0 2 200 1 2 50 2 0 0 1 Case #1: 100 Case #2: 150 Case #3: unreachable 7
  8. 8. Input: Graphical Representation N // N = Test Case Number n m S T int int w //n =SMTP servers on the network (2<=n<20000), m=cables connects two computers(0<=m<50000), S=Source server (0<=S<n) , T=Target Server (0<=T<n) (where S!=T) //int=integer value, int=integer value, w=latency/weight of the bidirectional cable 8
  9. 9. Graphical Representation Case #1: 1 0 w=100 m S T w=100 Case #2: 0 1 S m T 2 Case # 3: unreachable Output: 0 0 1 S 0 T 9
  10. 10. Algorithm As from the input description we have found that we have to iterate through all vertex but in minimum shortest path from one source.So that We have used Dijkstra algorithm here.As Dijkstra algorithm is single source shortest path algorithm. 10
  11. 11. Dijkstra Algorithm 11
  12. 12. Eclipse View Code: 12
  13. 13. UVA Submission 13
  14. 14. Future Plan We have a plan to make it more frequently and user friendly. And will make available this code for open source community. 14
  15. 15. Bug/Error/Limitations  We have to use here delimiter “[]+” in Java’s built in input/output system in BufferedReader throwsException() function to avoid unexpected integer or string error. We will fix this bug in future version . 15
  16. 16. Implementing and focusing on the code was our main objective and we tried our best. Thank you Mam for staying with us. Thank you all. Conclusion 16

×