0% found this document useful (0 votes)
14 views16 pages

BCSE204L DAA W2024 Handout

Handout
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views16 pages

BCSE204L DAA W2024 Handout

Handout
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

BCSE204 L & P- Design and Analysis

of Algorithms
Winter - 2024
(03-01-2024 to 03-05-2024)

1 Objectives of the course


1. To provide a mathematical foundation for analyzing and proving the effi-
ciency of an algorithm.
2. To focus on the design of algorithms in various domains of computer en-
gineering.

3. To provide familiarity with main thrusts of work in algorithms sufficient


to give some context for formulating and seeking known solutions to an
algorithmic problem.

1.1 Expected Course Outcomes


1. Ability to use mathematical tools to analyze and derive the running time
of algorithms and prove the correctness.
2. Explain and apply the major algorithm design paradigms.

3. Explain the major graph algorithms and their analysis.


4. Explain the major String Matching algorithms and their analysis.
5. Explain the major Computational Geometry algorithms and their analysis.
6. Provide algorithmic solutions to real-world problem from various domains.

7. Explain the hardness of real world problems with respect to algorithmic


efficiency and learning to cope with it.

1
2

1.2 Teaching strategy


– Design of Algorithm (Design-Illustration-Pseudocode)
– Understand the Problem
– Develop an Unambiguous logic to solve the problem
– Illustarte the logic with small inputs
– Developing the Pseudocode (just a documentation of the process il-
lustrated)
– Comparing the two different algortihms (for the same problem) and
conducting experiments (writing codes) to justify the efficient algo-
rithm.
– Analysis of Algorithm
– Proof of Correctness of Algortihm
– Computing the Running time T (n) of the Algorithm
– Computing the Asymptotic growth of T (n) with the help of five met-
rics : Θ, O, o, Ω, ω.
– Relevant information on the efficicency of the algorithm (in discus-
sion), with the other algorithms for the same problem.

– Implementation of Algorithm (A) through Programs that reflect the design


strategy and the analysis of the respective algorithm (Lab Sessions).
– Implementation of the Algorithm with a code
– Justification (analytical or graphical) of the asymptotic growth of
T (n) (discussed in the theory) by conducting the experiments (writ-
ing codes )
– Programs to implement the following modified Algorithms
* Modify the inputs of the Algorithm A
* Modify the process of the Algorithm A
* Modify the output of the Algortihm A
3

2 Course Plan - Theory & Lab


S.No Title Objective Lab
(of Lec- (of Lecture)
ture)
Lec 1 General Introduction Motivation- Teach-
ing,Learning
Assessment meth-
ods
Lec 2 Introduction to Algorithm- On the importance
(Design & Analysis) of Design and Anal-
ysis

Lec 3 Insertion Sort Design -


Illustration- Pseu-
docode

Lab Programs for a Problem using


Session STL- with a stress on ‘Container’
1 and ’Iterators’

Lec 4 Insertion sort -Correctness Correctness of In-


sertion Sort

Lec5 Insertion Sort- T (n) and Asymp- To introduce


totic growth the notations:
θ, O, 0, Ω, ω with
reference to Inser-
tion sort

Lec 6 Sorting Problem (Merge-Sort) C-I-P


Divide-Conquer-
Combine)
Lab Implementation Insertion Sort-
Session with experiments on the analysis
2 and the efficiency

Lec 7 Merge Sort Analysis


4

S.No Title Objective Lab


(of Lec- (of Lecture)
ture)
Lab Implementaion of Merge sort Al-
Session gorithms with experiments on
3 the analysis and the effciency

Lec 08 Rod cutting Problem Design(C-I-P)

Lec 09 Rod cutting problem Analysis

Lec 10 Matrix Multiplication Problem Design(C-I-P)

Lab Implementation of Rod cutting


Session Problem with experiments on the
4 analysis and theefficiency

Lec 11 Matrix Multiplication Problem Analysis

Lec 12 Matrix-Chain Multiplication Design(C-I-P)


Problem
Dynamic Program-
ming
Lec 13 Matrix-Chain Multiplication Analyis
Problem

Lab Periodic Assessment Test 1


Session (PAT1)
5
5

S.No Title Objective Lab


(of Lec- (of Lecture)
ture)
Lec 14 Matrix-Chain Multiplication Analysis
Problem

Lec 15 Longest Common Subsequence Design(C-I-P)


Problem
Dynamic Program-
ming
Lab Implementation of matrix-chain
Session multiplication algorithm with ex-
6 periments on analysis and effi-
ciency

Lec 16 Longest Common Subsequence Analysis


Problem

Lec 17 Longest Common Subsequence Analysis


Problem

Lec 18 Data Compression Problem Design(C-I-P)


(Huffman Algorithm )
Greedy Strategy
Lab Implementation of Longest
Session Common Subsequence Algo-
7 rithm with experiments on the
analysis and the efficiency

Lec 19 Data Compression Problem Analysis


(Huffman Algorithm )

Lec 20 Data Compression Problem Analysis


(Huffman Algorithm )

Lec 21 N-Queen’s Problem Design(C-I-P)


Back-tracking
strategy
Lab Implementation of N-Queen’s
Session Problem with experiments on the
8 analysis and the efficiency

Lec 22 N-Queen’s Problem Analysis

Lec 23 Travelling Sales Person Problem Design (C-I-P)


Brute-force Strat-
egy
6

S.No Title Objective Lab


(of Lec- (of Lecture)
ture)
Lec 24 String matching Problem Design & Analysis
(Naive-Algorithm)
String matching Problem Design(C-I-P)
(Robin-Karp Algorithm)
Lab Implementation of Huffman Al-
Session gorithm with experiments on the
9 analysis and the efficiency

Lec 25 String Matching Problem Anaysis


(Robin-Karp Algorithm)

Lec 26 Two segments Intersection Prob- Design(C-I-P)


lem

Lec 27 Two segments Intersection Prob- Analysis


lem

Lab Implementation of Robin-Karp


Session Algorithm & Graham Scan algo-
10 rithm with experiments on the
analysis and the efficiency

Lec 28 Pair of Segments Intersection Design(C-I-P)


Problem
Pair of Segments Intersection Analysis
Problem
Lec 29 Convex hull Problem(Graham- Design(C-I-P)
Scan Algorithm)

Lec 30 Convex hull Problem(Graham- Analysis


Scan Algorithm)

Lab Periodic Assessment Test 2


Session (PAT2)
11

Lec 31 Single-pair Shortest Path Prob- Design & Analysis


lem (Bellman-Ford Algorithm)
7

S.No Title Objective Lab


(of Lec- (of Lecture)
ture)
Lec 32 All-pair Shortest Path Problem Design & Analysis
(Floyd-Warshall Algorithm)

Lec 33 Maximum-flow Network Prob- Design


lem (Ford-Fulkerson Algorithm)

Lec 34 Maximum-flow Network Prob- Analysis


lem (Ford-Fulkerson Algorithm)

Lec 35 Maximum-flow Network Prob- Analysis


lem (Ford-Fulkerson Algorithm)

Lec 36 Complexity Class of Problems Explanation of the


(P, NP, NP-C) classes with illus-
tration

Lab Implementation of Graham-Scan


Session Algorithm with experiments on
12 analysis and efficiency
Maximum-flow Network Prob- Design
lem (Ford-Fulkerson Algorithm)
Lec 37 Proving a problem to be of NP Demonstration
class

Lec 38 Proving a problem to be of NP- Reducibility


complete class (Clique Problem )

Lec 39 Proving a problem to be of


NP-complete class (Subset-sum
Problem )
8

S.No Title Objective Lab


(of Lec- (of Lecture)
ture)
Lab Revision and Buffer session
Session
13

Lec 40 Set-cover Problem Approximation Al-


gorithm (Design &
Analysis)

Lec 41 Vertex-cover Problem Approximation Al-


gorithm (Design &
Analysis)

Lec 42 Global minimum-cut Problem Randomization Al-


gorithm (Design
& Analysis)
Lab Periodic Assessment Test 3
Session (PAT3)
13

Lec 43 Global minimum-cut prob-


lemRandomization Algorithm
(Analysis)
13/04/23
Lec 44 Revision and buffer session

Lec 45 Revision and buffer session

Lab Final Assessment Test


Session
14

Lec 46 Revision and buffer session

C-I-P: Concept-Illustration-Pseudocode

3 Resources for the course


– Every Lecture will be supported by the Presentation Slides, Lecture Notes
and recording of the lecture.- Uploaded in MS Teams.
– Text books
9

– Thomas H. Cormen, C.E. Leiserson, R L.Rivest and C. Stein, Intro-


duction to Algorithms , Third edition, MIT Press, 2009.
– Jon Kleinberg, ÉvaTardos ,Algorithm Design, Pearson education,
2014
– Ravindra K. Ahuja, Thomas L. Magnanti, and James B. Orlin, “Net-
work Flows: Theory, Algorithms, and Applications”, Pearson Edu-
cation, 2014.
– Avenues for Interaction with the teacher and for doubt clearance
– Oral doubt clearance in MS Team.
– chat-box of MS Team
– WhatsApp group
– Phone/Mail

4 Teaching-Learning-Assessments
4.1 Teaching
Teaching shall be based on the on a two pronged approach : Design &
Analysis.
Life-cycle of Design &Analysis of an Algorithm:
– Design component- (Problem-to-Pseudocode:P2P approach)
* Consider the Problem
* Understand the Problem
* Develop a logic to solve the problem
* Illustrate with the logic developed
* Write the Pseudocode
– Analysis component will cover
* Correctness of Algorithm
* Running time of the Algorithm
* Asymptotic growth of the running time with θ, O, o, Ω, ω.
* Efficiency of the algorithm
Facilitations for Learning:
For every Problem discussed, learners shall be provided with
– Slides/Lecture notes
– Contents from the text book
– Useful authentic web links
– Practice Problem Sheets
10

4.2 Learning - Theory & lab


For every concept/model, Learners are expected to :
– Listen the lecture sincerely
– Read the relevant content in the text book
– Get all the doubts cleared.
– Observe the execution of the algorithms through the programs in the
lab
– Implement the models yourself in the lab
– Solve the Practice Problem Sheets and the problems listed in the
exercises of the text book.
– Solve the Lab Practice Sheets by conducting different experiments.

4.3 Assessmets
4.3.1 Theory Component

– Theory - Continuous Assessment Marks (CAM) 60 Marks


* Quiz (10 marks)
· Quiz will be on the basic design strategies : Divide-Conquer-
Combine, Dynamic Programming, Greedy approach, Back-
tracking, Brute-force methodology.
· Questions shall be from a pool of questions with shuffling.
· Quiz shall have 30 questions for a duration of 30 minutes
· Quiz will have a weight of 10.
· Quiz will be conducted on April 17, 2024, wednesday in Moo-
dle and the quiz will be available from 12 noon to 2 pm.
* Practice Problem Sheet Submission (PPS-submission
& PPS-quiz)- 10 marks.
· The course will discuss the topics : Basic design strategies(Divide-
Conquer-Combine, Dynamic programming, Greedy approach,
Backtracking, Brute-force approach), domain specific algo-
rithms(string matching algorithms, Computational Geome-
try algoithms, Graph algorithms, Network flow algorithms)
and the complexity class of problems.
· After the discussion on each of the topics above, a Practice
Problem Sheet on the topics will be circulated.
· Problems in PPS will serve the purpose of model questions
for CAT.
· Learners have to solve the problems of PPS and submit the
solution of the PPS.
11

· Learners have to document the solution for ANY THREE


problems in PPS in a HAND-WRITTEN mode a nd submit
the pdf (scanned copy of the hand-written document) in MS
Team. This component is called PPS-Submission. For each
PPS, there will be a PPS-Submission.
· There will be a total of TEN Practice Problem Sheets.
· PPS will have two components : PPS-submission and PPS-
quiz.
· Like we have PPS-submission for each PPS, we will have
PPS-quiz like PPS1-quiz, PPS2-quiz, PPS3-quiz ,...., PPS10-
quiz
· Each PPS-quiz will have five questions for a duration of five
minutes and will be conducted in MS-team
· PPS-quiz will have multiple choice questions, based on the
respective PPS, like PPS1-quiz will be based on PPS1, PPS2-
quiz will be based on PPS2 and so on.
· The first PPS-quiz will be conducted on the day PAT1 is
conducted for the lab. This first quiz will cover all the PPS
sheets covered till that date, in the theory class.
· The second PPS-quiz will be conducted on the day PAT2
is conducted for the lab, and will cover all the PPS sheets
covered from the first PPS quiz till that date, in the theory
class.
· The third PPS-quiz (PPS2-quiz ) will be conducted on the
day PAT3 is conducted for the lab, and will cover all the
PPS sheets covered from the second PPS quiz till that date,
in the theory class.
· All the PPS-quizzes will have a weight of 4%
· Weight for all the TEN PPS-Submissions will be 6%.
· Total weight for all the PPS (PPS-submissions and the PPS-
quizzes) will be 10%
* Oral Presentation- 10 marks.
· Students shall learn an Algorithm , which is not in the syl-
labus.
· Students shall present that Algorithm (both design and Anal-
ysis) for 20 minutes with question & answer session for 10
minutes
· Every Presentation should have the three components : Prob-
lem behind the Algorithm, Algorithm and an Illustration on
the functionality of the Algorithm
· Presentation shall be through MS Teams and will be from
8th April 2024 - 3rd May 2024
· Students are requested to upload their slides for presentation
in moodle before their date of presentation
12

Table 1: Summary of the assessments of theory component and their weights


S.no Item weight per item Total weight
1 Quiz 10 marks 10 Marks
2 Ten PPS Submissions 01 mark 10 Marks
3 Oral Presentation 10 marks 10 Marks
4 Two Continuous Assessment Tests 15 Marks 30 Marks
5 Final Assessment Test 40 marks 40 Marks

* Continuous Assessment Tests - 30 marks


· Syllabus for CAT1 - Portions completed till 14 lectures (The-
ory)
· Syllabus for CAT 2- Portions completed from the 15th lecture
till 28th lecture (Theory)
· CAT1 and CAT2 will be a written examination for a maxi-
mum of 50 marks with 5 questions (each question carries 10
marks) and the duration of CATs will be 90 minutes
· Each CAT will have a weight of 15%.
– Final Asessment Test (40 Marks)
* Final Assessment Test (Theory), as per the slot will be conducted
from 06th May 2024.
* FAT will have eight questions (Four questions will carry 15 marks
each and Four questions will carry 10 marks each). There will
not be any choice.
* Weight for FAT (Theory) will be 40%

4.3.2 Lab Component

There will be a total of 16 lab sessions. One lab session will be used for in-
troduction to STL, three lab sessions for Periodic Assessment Test(PAT),
One lab session for FAT. So, there will be a total of eleven learning lab
sessions.
– Lab - Continuous Assessment Marks - 60 Marks
– In-lab Practice Problems
* Every lab session will be an interactive session.
* In each lab session, three or four problems will be discussd. For
those problems, transformation of pseudocode into a code will
be explained, demonstrated and executed in the lab
* All the learners are expected to execute the demonstrated code,
themselves.
* After every lab session, a list of problems (Lab Practice Sheet )
shall be circulated . .
13

Table 2: Summary of the assessments of lab. component and their weights


S.no Item weight per item Total weight
1. Lab Practice Sheets (LPS) 3 marks 30 marks
(Best 10)
2 Three Periodic Assessment Tests (PAT) 10 marks 30 marks
3 Final Assessment Test(FAT) 40 marks 40 marks

– Lab Practice Sheet (LPS) Submission- 30 marks


* After every lab session, three or four problems of Lab Problem
Sheet (LPS) will be uploaded in VPROPEL.
* Students are supposed to submit the solution in the VPROPEL
and the graph of the code shall be submitted in MS-team
* LPS will start from the second lab session and will continue till
the the twelfth lab session. So, there shall eleven Lab Problem
Sheets
* Every LPS will have ten problems.
* Every LPS should be submitted before the commencement of the
next lab session.
* Of the marks obtained in eleven LPSs, marks scored in the best
ten LPS will be counted for 30 marks under LPS.
* Weight for each LPS is 3%. Hence, total marks for LPS will 30%
– Periodic Assessment Tests(PAT)-30 marks
* There will be three Periodic Assessment Tests after the comple-
tion of every four lab sessions.
* PAT1 will be on the models covered in the first four lab sessions,
PAT2 will be on the models covered from sixth to tenth lab
sessions and PAT3 will be on the models covered from 11th to
14th lab sessions
* Every PAT will be for a duration of 60 minutes and for a maxi-
mum of 50 marks.
* PAT will be an open-book test.
* Weight for each PAT will be 10 marks

– Final Assessment Test for LAB- 40 Marks


– Final Assessment Tests (FATs) shall be conducted in the week 22
April- 26 April 2024, during the lab session.
– FAT will be for a duration of 100 minutes and for a maximum of 50
marks
– FAT will be an Open-book type of examination.
14

4.4 Rubrics
4.4.1 Rubrics for PPS submission
Item Total Marks x
Logic(technique) 20% of x marks
Pseudocode 30% of x marks
Illustration 30% of x marks
Time-complexity 20% of x marks

4.4.2 Rubrics for the Oral Presentation


Item Marks
Preparation of the content 10 Marks
(Design and Analysis)
Presentation of the content 10 Marks
Answering the questions 10 Marks
(minimum five questions)

4.4.3 Rubrics for LPS


Item Total Marks x
Pseudocode (logic) 50% of x marks
Code 30% of x marks
Analysis 20% of x marks

4.4.4 Rubrics for problems of PAT/FAT


Rubrics of PAT/FAT shall be communicated after the PAT/FAT

5 Date & Deadlines for the submissions/Assessments


5.1 Deadline for Laboratory submissions
LPS problems shall be uploaded in VPROPEL immediately in the evening of
the lab session. Seven full days will be available for the submission. If the LPS
is uploaded on a tuesday evening, deadline for that LPS will be 11.59 pm of the
following tuesday.

5.2 Deadline for PPS submissions


– Practice Problem sheets on each topic will be uploaded in MSTEAM after
the completion of the discussion on the respective topics.
– For every PPS submission, students should submit the solution for a min-
imum of THREE problems of their choice, chosen from the respective
PPS.
15

– A week’s time will be available for every PPS from the date of upload of
that PPS in MSTEAM.
– Every PPS submission will have the solutionw written in hand, scanned
and uploaded in PDF.

– Every solution will have all the components of design (understanding of


the problem, logic, illustration, Pseudocode) and the analysis (Proof of
correctness, Running time, time-complexity)

5.3 Deadline for submission of oral presentation slides


– Deadline for submission of presentation slides is the day before their oral
presentation.
– Students can start giving the presentation from 8th April 2024
– Deadline for giving the presentation is 03-05-2024

5.4 Dates of Assessments (both theory & Lab)


Item Date Marks Weight
PAT1(Lab) In the week 5 Feb -9 Feb 50 10%
CAT1(theory) In the week 12 Feb– 16 Feb 50 15%
PAT2(Lab) In the week 25 March - 29 March 50 10%
CAT2(theory) In the week, 01 April - 05 April 50 15%
Quiz 17 -04-2024, 12 noon- 2pm 30 10%
PAT3(Lab) In the week 15 April - 19 April 50 10%
FAT(Lab) In the week 22 April -26 April 50 40%
Remark 1 Mode of submission of different components of lab, shall be inti-
mated there and then.

6 Code of Academic Integrity


Academic integrity means acting with the values of honesty, trust, fairness, re-
spect and responsibility in learning, teaching and research. It is important for
students to act in an honest way, be responsible for their actions, and show
fairness in every part of their work. To promote academic integrity among the
students, first page of every submission (PPS/LPS/slides of oral presentation)
should have the following code of academic Integrity. By having the code of
academic integrity before the commencement of the submission , student con-
firms that the submissions are prepared by adhering to the code of academic
integirty in full letter and sprit.
Code of Academic Integrity

I affirm that
16

– This code is my own original code and is not a borrowed code,


either from other students or from assignments for other courses.
– I have not given or received any unauthorized help on this as-
signment.

– This submission is free from


– Plagiarism
– Fabrication of facts
– Unauthorized assistance
– Collusion

– This submission gives proper credit to sources and references,


acknowledges the contributions and ideas of others relevant to
this academic work.
– This submission was prepared by me fully adhering to the rules
that govern this assignment regarding resource material, elec-
tronic aids, copying, collaborating with others, or engaging in
any other behavior that subverts the purpose of the assignment
and the directions of the teacher.

7 Contact details of the teachers and the teach-


ing Assistants
– Name of the Teacher, email-id, phone number
– Name of the Teaching Assistant, email-id, phone number

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy