Friday, October 4, 2024

Demystifying the Shortest Path Algorithm with Example

Demystifying the Shortest Path Algorithm with Examples

Saturday 05 October 2024

Consider the complete network in Fig. 1, to find the shortest path from A to H using the Dijkstra algorithm [1]. A simple inspection reveals the optimal path ABEFGH with cost 10. However, implementing the algorithm through a computer program deserves some attention. 

Figure 1 

The procedure excerpt from [2]. 

Step1. A is marked. The nodes connected directly to A are labeled with (cost, from node). All other nodes in the network are labeled with (infinity, dash). B is marked for the next step due to lower cost than C, Fig. 2.

Figure 2

Step2. The nodes connected directly to B are relabeled with (cost, from node). E is marked for the next step due to lower cost than C and D, Fig. 3.

Figure 3
Step3. The nodes connected directly to E are relabeled with (cost, from node). F is marked for the next step due to lower cost than C and D. 

Step4. The modes connected directly to F are relabeled with (cost, from node). G is marked.

Step5. Figure 4 shows the optimal path from A to H: ABEFGH.

Figure 4

There are a lot of posts on the net. A good one is [3]. The Python code was modified for the above example and results are shown in Fig. 5. 

Figure 5

References: 

[1] Dijkstra (1959), [2] CN 6th Tanenbaum, [3] www.dougmahugh.com/dijkstra

Appendix: Output 

Reading the input file ...

('A', 'B', 2.0)

('A', 'C', 6.0)

('B', 'D', 7.0)

('B', 'E', 2.0)

('C', 'E', 1.0)

('C', 'G', 4.0)

('D', 'F', 3.0)

('D', 'H', 3.0)

('E', 'F', 2.0)

('F', 'G', 2.0)

('G', 'H', 2.0)

Building Adjacency List ...

{'C': {('E', 1.0), ('G', 4.0)}, 'F': {('G', 2.0)}, 'G': {('H', 2.0)},

'A': {('C', 6.0), ('B', 2.0)}, 'H': set(), 'E': {('F', 2.0)},

'B': {('D', 7.0), ('E', 2.0)}, 'D': {('F', 3.0), ('H', 3.0)}}

Unvisited Nodes ...

{'C', 'F', 'G', 'A', 'H', 'E', 'B', 'D'}

Distance from Start Node

{'C': inf, 'F': inf, 'G': inf, 'A': 0, 'H': inf, 'E': inf, 'B': inf, 'D': inf}

Current node =  A

Unvisited nodes =  {'C', 'F', 'G', 'H', 'E', 'B', 'D'}

neighbor =  C  distance =  6.0

New path =  6.0

neighbor =  B  distance =  2.0

New path =  2.0

Current node =  B

Unvisited nodes =  {'C', 'F', 'G', 'H', 'E', 'D'}

neighbor =  D  distance =  7.0

New path =  9.0

neighbor =  E  distance =  2.0

New path =  4.0

Current node =  E

Unvisited nodes =  {'C', 'F', 'G', 'H', 'D'}

neighbor =  F  distance =  2.0

New path =  6.0

Current node =  C

Unvisited nodes =  {'F', 'G', 'H', 'D'}

neighbor =  E  distance =  1.0

neighbor =  G  distance =  4.0

New path =  10.0

Current node =  F

Unvisited nodes =  {'G', 'H', 'D'}

neighbor =  G  distance =  2.0

New path =  8.0

Current node =  G

Unvisited nodes =  {'H', 'D'}

neighbor =  H  distance =  2.0

New path =  10.0

Current node =  D

Unvisited nodes =  {'H'}

neighbor =  F  distance =  3.0

neighbor =  H  distance =  3.0

Current node =  H

Unvisited nodes =  set()

graph definition file: simple_graph3.txt

      start/end nodes: A -> H

        shortest path: ['A', 'B', 'E', 'F', 'G', 'H']

       total distance: 10


Wednesday, September 4, 2024

FYDP First Evaluation Presentation by Students of BE BME 2021

Tuesday 03 September 2024

The first evaluation presentations were delivered by the students for five final year design projects at FEST conference room after Zuhr prayer, 2pm.

1. Noninvasive Cardiac Activity Analyzer by Team Aqsa, Supervisor: Dr. Tariq

2. Noninvasive Brain Activity (Depression) Analyzer by Team Atisam, Supervisor: Dr. Tariq

3. Design the Circuit for Single Lead ECG and PPG to Calculate Pulse Transient Time by Team Anees, Supervisor: Dr. Faris

4. Detection of Retina Deformation in Diabetes Mellitus through Machine Learning by Using Jetson Nano by Team Fakiha, Supervisor: Dr. Faris

5. Multi-Class Skin Disease Detecton by using U Net and CNN in Deep Learning by Team Ramsha, Supervisor: Dr. Faris



Thursday, August 29, 2024

Publication of Book: The Fundamentals of Biomedical Image Processing and its Impact on Cancer Research

Wednesday 07 August 2024 

The book includes topics on image processing basics for the biomedical image and segmentation techniques applied on MR images with a detailed overview of brain anatomy from a functional point of view. The establishment of tumour boards across the region was discussed from the multidisciplinary team platform. The book was published on Wednesday 7th August 2024 as a joint effort of co-authors Dr. Jawwad Sami Ur Rahman from Riphah International University, Prof. Dr. Tariq Javid from Hamdard University, and Prof. Dr. Ahmed Nadeem Abbasi from Aga Khan University Hospital. 




Saturday, August 24, 2024

Object-Oriented Programming (OOP) Rubrics

Saturday 24 August 2024 

This generic rubric (Fig. 1) is developed to assess the work of student groups solving problems using the object-oriented programming (OOP) paradigm. The generic rubric is used to construct the rubric for developing the clean program code using OOP concepts (Fig. 2) and the rubric for problem analysis and solution design with OOP (Fig. 3). The other rubrics include rubric final performance (Fig. 4) and rubric for theory teacher viva (Fig. 5). 


Figure 1 Generic


Figure 2 Clean code


Figure 3 Problem analysis and solution design


Figure 4 Final performance


Figure 5 Theory teacher viva










Sunday, August 11, 2024

PPG Processed Data

Sunday 11 August 2024

The data array is processed photoplethysmography (PPG) data.

11   6  48  62  21  13   5   7   5  44
14   8   5   2   2  51  13  11   6   0
 5  62  23  13   5   2  10  49  12   6
 5   0  40  46  14   9   0   3  52  31
13   5   4   0  67  28  13   9   5   8
83  40  29  11  10  16  96  57  38  17
10   9 100  65  43  21  11  11  75  84
35  26  14   5  11  90  41  32  13  10
 5  84  35  15   9   4   6  59  14  14
 2   4  81  45  22   8   2  44  76  27


Above 100 samples were acquired at 1 ms. No time correction.

By: 
Engr. Prof. Dr. Tariq Javid, Chair BME, FEST, HU, PK
As of 11 August 2024

Sunday, July 21, 2024

PEC Visited HU FEST for Re-Accreditation of BE BME Program

Friday 19 July 2024 - Saturday 20 July 2024

The PEC team visited Faculty of Engineering Sciences & Technology, Hamdard University (HU FEST) on July 19-20, 2024 for re-accreditation of the BE BME program of studies. The team was received by the Dean FEST, Chair BME, and Program In-Charge BME at the HU VC conference room. The visit was completed as per the agreed scheduled. It was a wonderful experience and learning with the PEC team and FEST colleagues and BAH offices. 


Engr. Prof. Dr. Muhammad Kamran, VC MUSUET receiving memorial from Engr. Prof. Dr. Muhammad Aamer Saleem, Dean FEST, HU (right).








(From left): Engr. Prof. Dr. Muhammad Asif, SSUET; Engr. Prof. Dr. Zia Mohy-Ud-Din, Air University Islamabad; Engr. Prof. Dr. Mohsin Islam Tiwana, NUST Islamabad; Engr. Dr. Muhammad Faisal Khan, HU FEST; Engr. Prof. Dr. Tariq Javid, HU FEST.   






Tuesday, June 25, 2024

OBE Training Sessions for BME Faculty

03 May 2024

FDP Activity: OBE Training for BME Faculty

Venue: Classroom BME-1 (D)                                                                      

Dated: 3rd May 2024

Reported by: Engr. Muhammad Mansoor Mughal

Attendees: 

Engr. Prof. Dr. Tariq Javid, Chair BME, Engr. Dr. Muhammad Faris, Assistant Professor & Program In-Charge BME, Mrs. Sadia Ali, Assistant Professor BME, Engr. Muhammad Mansoor Mughal, Senior Lecturer BME, Engr. Umme Farwa, PEC OJT BME 

Introduction

The training session on Outcome Based Education (OBE) was held on 3rd May 2024 aimed to equip participants with a comprehensive understanding of modern educational methodologies focused on enhancing student learning outcomes. The session was designed to review key components of the OBE and their practical implementation strategies within the educational framework.

Training – 1

Speaker: Engr. Dr. Muhammad Faris, Assistant Professor & Program In-Charge BME

Training Title: Important Components of Outcome Based Education

Summary: Engr. Dr. Muhammad Faris briefed the participants about his experience related to the OBE in terms of an educational theory and practice, emphasized on the fundamental components of OBE system in accordance with the framework outlined by the Pakistan Engineering Council (PEC). He highlighted the importance of clearly defined course learning outcomes (CLOs), student-centered approach, and use of appropriate assessment methods to ensure meeting the educational effectiveness and relevance for today's dynamic industry and service environments.

Training – 2

Speaker: Engr. Prof. Dr. Tariq Javid, Chairman BME

Training Title: CEP, CEA, Open-ended Labs, Case-based, and Problem-based Learning

Summary: Engr. Prof. Dr. Tariq Javid facilitated the participants about the various insights on methodologies essential for implementing the OBE system of instructions. These include Complex Engineering Problems (CEP), Complex Engineering Activities (CEA), and enhanced methods of learning, such as open-ended labs, case-based learning, and problem-based learning. He illustrated how these approaches foster critical thinking, collaboration, problem-solution, and practical applications of knowledge among engineering students, thereby enhancing their overall learning experience.

Training – 3

Speaker: Engr. Prof. Dr. Tariq Javid, Chairman BME

Training Title: Rubrics

Summary: Engr. Prof. Dr. Tariq Javid elaborated on the use of rubrics as an effective assessment tools to ensure the learning objectives accessed appropriately. He discussed how rubrics help in setting clear evaluation criteria, promoting fairness, transparency, and consistency in assessing student performance; especially for the case of psychomotor and affective domains. He emphasized the role of rubrics in providing constructive feedback to students, facilitating their growth and development in line with educational goals. The training session included a number of example rubrics.

Key Insights and Learnings

The sessions provided several key insights in understanding the importance of aligning curriculum objectives with measurable learning outcomes; recognizing the role of appropriate assessment tools and feedback mechanisms in improving student engagement, learning, and achievement; and exploring innovative teaching methodologies in OBE system to enhance student-centered learning experiences.

Participants gained a fresh perspective on integrating these insights into their teaching practices and overcome various challenges such as initial resistance to adopt the OBE system of education and towards faculty development in implementing OBE effectively.

Action Points

Based on the training sessions, the following action points were identified:

·         Use PEC OBE framework for aligning course objectives with measurable learning outcomes.

·         Implement CEP and CEA to enhance student learning.

·    Integrate open-ended labs, case-based, and problem-based learning paradigms to promote active learning for problem-solution based on critical thinking.

Conclusion

In conclusion, the OBE training sessions were instrumental in advancing faculty understanding and readiness to improve their efforts in implementing Outcome Based Education within their theory courses and laboratory works. The insights gained and identified actions will guide participants in fostering a more learner-centered and outcomes-driven educational environment.

Next Steps

Moving forward, we plan to:

·         Conduct more trainings for faculty members on OBE principles and methodologies.

·         Promote use of appropriate assessment tools and teaching methods to evaluate learning.

·         Review and refine OBE implementation.