CSEN 703 Analysis and Design of Algorithms

## Announcements

### Midterm material...

Lectures 1 to 5 including their practice assignment. Midterm has 5 questions. Asymptotics (8/80), Analysis using Summations (12/80), Amortized Analysis (20/80), Randomized Analysis (20/80), Recurrence Analysis (20/80) Copy of midterm aid sheet is avilable here: https://drive.google.com/open?id=12olM_NTJQS9RD-lx5SrUQXMa2elojNb6

### A2 & A3

We will allow you to submit A2 with A3 without penalty.

### Visitor issue...

Some of you implemented visitor in the vertex or edge and are using it as part the library logic. That's an incorrect usage. There is no relation between visitor and the visited flag described in lecture. To clarify: the TA will implement visitor interface and will pass to your code some object which implements visitor interface and you are just required to call visit on every edge and every vertex the first time you process that node. You can still have the visited flag and the logic of processing the vertices and edges in any way you like but do not confuse that with the purpose of the visitor interface. The main purpose of visit interface is to give the grader a way to check which vertices/edges you are processing or not processing and in which order you did that in each traversal type. As an example, public void dfs(String strStartVertexUniqueID, Visitor visitor) throws GraphException { /// your code... visitor.visit( currentVertex ); //// more code... visitor.visit( currentEdge ); }

### A2 & A3 2nd update!

changes are: - methods signature changed to use String instead of StringBuffer - insertVertex amended to take X and Y (used in closestPair) - coding of test case 1 had a typo in the unique id of edges with cost 5 (you can assume that each vertex and each edge will have a unique id). - one more test case added.

postponed to Sat Dec. 1st 11:50PM.

### A2 & A3 posted!

check materials section

with test cases.

### Session reminder

This is a reminder of tomorrow morning session: Ahmad Elsageer, a GUC graduate and an ACMer, who currently works in the research dept. at swvl.com will be giving a number of sessions related to algorithm design. These sessions are organized by GUC for CSEN703 students. The goal is to enhance your skill in problem solving and algorithm design. The first session will be held on Wednesday Nov. 21st first slot in H15 and will focus on divide and conquer algorithms. You are highly encouraged to attend and participate. I cannot over stress how important your master of these design techniques is. Whether you go for a secure job with an established company in the field, or create your own startup, you need to be know how to design an algorithm using either of: divide and conquer, greedy or dynamic programming!

## Course Meetings

### Office Hours

• On Tuesday 5th slot , for Amal Yassien
• On Wednesday 3rd slot , for Esraa