0% found this document useful (0 votes)
18 views

Lecture 1.1 Introduction of Algorithm

Uploaded by

Shanto
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Lecture 1.1 Introduction of Algorithm

Uploaded by

Shanto
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Lecture Title: Introduction & Preliminary

Discussions on Algorithms
Course Code: CSC 2211 Course Title: Algorithms

Dept. of Computer Science


Faculty of Science and Technology

Lecture No: 01 Week No: 01 Semester: Spring 22-23


Lecturer: Pritam Khan Boni, [email protected]
Lecture Outline

1. Vision, Mission, Goal, Objective


2. Definitions
3. Computational Problems, Analysis, Design, and
importance of Algorithms
4. Space & Time Complexity as parameters of performance
for Algorithms including Asymptotic notations and
5. Preliminary data structure review
Vision & Mission of AIUB
VISION
AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB) envisions
promoting professionals and excellent leadership catering to the technological progress
and development needs of the country.

MISSION
AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB) is committed to
provide quality and excellent computer-based academic programs responsive to the
emerging challenges of the time. It is dedicated to nurture and produce competent
world class professional imbued with strong sense of ethical values ready to face the
competitive world of arts, business, science, social science and technology.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Goals of AIUB
• Sustain development and progress of the university
• Continue to upgrade educational services and facilities responsive of the
demands for change and needs of the society
• Inculcate professional culture among management, faculty and personnel in the
attainment of the institution's vision, mission and goals
• Enhance research consciousness in discovering new dimensions for curriculum
development and enrichment
• Implement meaningful and relevant community outreach programs reflective of
the available resources and expertise of the university
• Establish strong networking of programs, sharing of resources and expertise
with local and international educational institutions and organizations
• Accelerate the participation of alumni, students and professionals in the
implementation of educational programs and development of projects designed
to expand and improve global academic standards
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Vision & Mission of Computer Science
Department
VISION
Provides leadership in the pursuit of quality and excellent computer education
and produce highly skilled and globally competitive IT professionals.

MISSION
Committed to educate students to think analytically and communicate
effectively; train them to acquire technological, industry and research-oriented
accepted skills; keep them abreast of the new trends and progress in the world
of information communication technology; and inculcate in them the value of
professional ethics.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Goals of Computer Science Department
• Enrich the computer education curriculum to suit the needs of the
industry- wide standards for both domestic and international
markets
• Equip the faculty and staff with professional, modern technological
and research skills
• Upgrade continuously computer hardware's, facilities and
instructional materials to cope with the challenges of the information
technology age
• Initiate and conduct relevant research, software development and
outreach services.
• Establish linkage with industry and other IT-based
organizations/institutions for sharing of resources and expertise, and
better job opportunities for students
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Course Objectives
• The objective of this course is to teach how we can compare
algorithms, the complexity analysis of time and space, effective
data structure for solving difficult problems and implementation
of different algorithms with the practical examples.

• The purpose of the course is


 a) to raise your level of sophistication in thinking about the design and
analysis of algorithms;
 b) learn some of the classic algorithms and recent improvements;
 c) exercise your creativity in designing algorithms.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Course Prerequisites
• Programming
 Data types, operations
 Conditional statements
 Loops
 Procedures and functions
 C/ C++/ Java
• Discrete Mathematics (proof theorems)
• Data Structures (array, structure, pointer, file, etc...)
• Computer lab (edit, compile, execute, debug)
• If you lack of any of the above please refine yourselves.

AIUB::CSC2211::Algorithm Introduction8
Importance of the course
• This course is a continuation of the courses Programming
Language 1 & 2, and Data Structure.
• Algorithm is required for all areas of computer science –
especially for developing problem solving ability.
• This course will give the basic for the understanding of the
courses –Theory of Computation, Artificial Intelligence, etc.
• This course will give the basic for the understanding of the
concepts – Design and Analysis of Algorithm.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Course Contents
• RAM model, Basic notation
• Recurrences & Master Method
• Dynamic Programming
• Greedy strategy
• Graphs Algorithms
• Greedy Graph Algorithm
• Shortest Path Algorithms
• Basic idea of NP – Completeness
• Basic idea of Elementary Geometric Methods & Review
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Resources & References
• Introduction to Algorithms, Third Edition, Thomas H.
Cormen, Charle E. Leiserson, Ronald L. Rivest, Clifford
Stein (CLRS).
• Fundamental of Computer Algorithms, Ellis Horowitz, Sartaj
Sahni, Sanguthevar Rajasekaran (HSR)
• Helpful link for Problem Solving :
http://acm.uva.es/problemset/
• Lectures and Laboratory works will be provided online at the
course website weekly.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
AIUB::CSC2211::Algorithm Introduction12
Course Evaluation
Midterm Quiz 20
Laboratory Performance/Assignment/Exam 30
Class Attendance/Performance 10
Midterm Written Exam 40
Midterm Total 100 40%
Final term Quiz 20
Laboratory Performance/Assignment/Exam 30
Class Attendance/Performance 10
Final term Written Exam 40
Final Term Total 100 60%
Grand Total Final Grade of the Course 100

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Classroom Policies
• Must be present inside the class in due time.
• Class Break: I would prefer to start the class in due time and leave the class in
10/15 minutes early for theory/Laboratory class respectively, instead of giving a
break.
• Every class will start with a question-answer session about the last lecture. So
students must be prepared with the contents and exercises from the last lecture.
• Students are suggested to ask questions during or after the lecture.
• Additional/bonus marks may be given to any good performances during the class.
• Late in Class:
 Late during quiz/presentation are not given additional time.
 Students who are regularly late might have additional deduction of marks.
 A late student will be allowed to enter the class. Don’t ask permission to enter the class, just
get in slowly and silently. Same policy implies if a student wants to go out of the class for
emergency reasons.
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Course Policies
• Attendance
• Laboratory Policies
• Makeup Evaluation (quiz, assignment, etc.)
• Grading Policies
• Dropping a Course

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Attendance
• At least 70% presence is required by the student. Absent classes
must be defended by the student through application and proper
documentation to the course teacher.
• Single absences or absences within 25% range will be judged by the
course teacher.
• Long absences/irregular presence/absences out of 25% range must
go through application procedures via department Head (+ probation
office, if student is in probation) to attend the following classes.
• Acceptance of an application for absence only gives permission to
attend the following classes. This might still result in deduction of
marks (for attendance) which will be judged by the course teacher.
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Laboratory Policies
 LABORATORY CLASSES:
♦ First 0.5 – 1 hour will be spent explaining the problems/task/experiment to be performed.
♦ Next 1 – 1.5 hour(s) will be spent by the students to complete the experiment.
♦ Next 0.5 – 1 hour will be spent in checking, marking, and discussing the solution.
♦ Students are allowed to discuss with each other (unless instructed not to) in solving problems.
♦ But the checking (executing/viva) & marking will be with individual students only.
 LABORATORY EXAM:
♦ Laboratory exams are scheduled in the week before the major exams during the normal laboratory
hours.
♦ Generally students are given one/more problems to be solved of which at least one part is solved using
computers.
♦ One hour is given to the students to solve the problem. And half hour to submit and viva. Generally 20
students in the first 2 hours and the other 20 students in the rest 2 hours.
♦ Students may be given choices to select the problem. At most 3 selection can be given to a student with
0, 2, and 4 marks deduction as a penalty for each selection respectively.
♦ Only in case of unavoidable circumstances, the laboratory exams may be taken in the off days or week
after the major exams.
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Makeup Evaluation
• There will be no makeup quiz as long as a student have appeared in 2 quizzes.
• Makeup for missing evaluations like quizzes/assignment submission
date/presentation date/viva date/etc., must go through valid application procedure
with supporting document within the deadline of the actual evaluation date.
• Makeup for missing Midterm/Final term must go through Set B form along with the
supporting document within the 1st working day after exam week. The set B exam
is generally scheduled from the 2nd working day after the exam week. Must get
signature and exam date from the course teacher and get it approved by the
department Head (monetary penalty might be imposed).
• Students unable to attend the set B exam may apply for set C exam within the
same time limit as set B. Such applications must be supported by very strong
reason and documentation, as they are generally rejected.
• The course teacher will be the judge of accepting/rejecting the request for makeup.
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Grading Policies
• All the evaluation categories & marks will be uploaded to the VUES within one
week of the evaluation process except the attendance & performance, which will
be uploaded along with the major (mid/final term) written exam marks.
• Letter grades ‘A+’ through ‘F’ is counted as grades. Other grades ‘I’ and ‘UW’ are
considered as temporary grades which are counted/calculated as ‘F’ grade in the
CGPA. These grades must/will be converted to the actual grades, i.e. ‘A+’ through
‘F’.
• ‘I: INCOMPLETE’ is given to students who have missed at most 30% of evaluation
categories (quiz/assignment/etc.). Students must contact the course teacher for
makeup, through valid application procedures immediately after grade release.
• ‘UW: UNOFFICIAL WITHDRAW’ is given when the missing evaluation categories
are too high (more than 30%) to makeup. A student getting ‘UW’ has no option but
to drop the course immediately after grade release
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Grading Policies…
• Once a student’s gets ‘I’ or ‘UW’ and unable to fulfill the requirements
with the course teacher for makeup, must drop the course within
officially mentioned time period from the registration department.
• Students in probation or falls into the probation due to ‘I’/’UW’ grade
are not allowed to drop the course.
• Unable to do so will result in the automatic conversion of the grades
‘I’/’UW’ to ‘F’ grade after the 4th week of the following semester.
• Any problem with the mark/grade must be consulted with the course
teacher within one week of the release of grades.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Dropping a Course
• Must fill up the drop form and get it signed by the course teacher, write an
application to the vice chancellor and get it signed by the department Head,
and finally submit the form & application to the registration department.
• The course teacher must write down the grades (if any) obtained in midterm,
final, and grand total on the drop form.
• No drop is accepted during the following periods:
 One week before midterm exam – grade release date of midterm exam.
 One week before final term exam – grade release date of final grade.
• Student with ‘F’ grades in midterm, final term, or grand total cannot drop.
• Probation student are not allowed to drop any course.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Contacts
• Contact information (email, office phone extension, office
location, consulting hours, etc.) of the course teacher must be
stored by the students.
• It is mandatory to contact/notify (preferably consulting
hour/email) the course teacher for/of any problems/difficulties at
the earliest possible. Late notification might not be considered.
• Update & correct your email address & phone number at VUES,
as the teacher will contact/notify you of anything regarding the
course through these information in VUES.

AIUB::CSC2211::Algorithm Lecture01-Introduction 
Finally
• For any problems that could not be solved/understood during the lecture, students are advised to
contact during the consultation hours and solve the problem.

• For any missing evaluation (quiz, assignment, etc.), classes, deadlines, etc. must
contact/inform/notify the teacher immediately after missing in the consulting hour, via email, or in
unavoidable circumstances – through the guardian or friend.

• Probation students must meet the course teacher once a week. So schedule your time with the
teacher.

• Any kind of dishonesty, plagiarism, misbehavior, misconduct, etc. will not be tolerated. Might result in
deduction of marks, ‘F’ grade, or reported to the AIUB Disciplinary Committee for drastic punishment.

• Always check/visit the AIUB home page for notices, rules & regulations of academic/university
policies and important announcement for deadlines (Course drop, Exam permit, Exam Schedule,
etc.).
AIUB::CSC2211::Algorithm Lecture01-Introduction 
Welcome to the
course
Algorithms
AIUB::CSC2211::Algorithm Lecture01-Introduction 
??????

What will we do/learn in


this course?

AIUB::CSC2211::Algorithm Introduction25
The Goals of this Course
• To think algorithmically
• To understand and learn the idea behind algorithm design
techniques
• To get to know a toolbox of classical algorithms.
• To reason (in a precise and formal way) about the efficiency
and the correctness of algorithms.

AIUB::CSC2211::Algorithm Introduction26
I would request all of you to...
• Be simple and precise in understanding the problem
• Solve the problem first on the paper and then keyed in on the
computer.
• During lectures:
 Interaction is welcome; ask questions.
 Additional explanations and examples if desired.
 Speed up/slow down the progress.

AIUB::CSC2211::Algorithm Introduction27
??????

What is
Algorithm?
AIUB::CSC2211::Algorithm Introduction28
Informally
takes some value produces some
or set of values Algorithm: any well-defined value or set of
computational procedure values, as
as input output

• An algorithm is thus a sequence of computational steps that transform the input into
the output.
• Solving a given problem:
 Data structure: Organization of data to solve the problem at hand.
 Algorithm: Outline, the essence of a computational procedure, step-by-step instructions.
 Program: Implementation of an algorithm in some programming language.

AIUB::CSC2211::Algorithm Introduction29
Kinds of Problem to be solved
• Sorting and Searching are the basic and most common computational problem.
• Clever algorithms are employed for the Internet
 to manage large volume of data transfer.
 Finding good routes on which the data will travel.
 Search engine to quickly find requested pages.
 Etc…

• Numerical algorithms and number theory are employed in electronic commerce


to keep and secure information such as credit card numbers, passwords, and bank
statements.

AIUB::CSC2211::Algorithm Introduction30
Kinds of Problem to be solved
• Allocating scarce resources in the most beneficial way.
 An oil company may wish to know where to place its wells in order to maximize its expected profit.
 A candidate may want to determine where to spend money buying campaign advertising in order to
maximize the chances of winning at election.
 An airline may wish to assign crews to flight in the least expensive way possible, making sure that
each flight is covered and that government policy regarding crew policies are met.
 Etc…

AIUB::CSC2211::Algorithm Introduction31
Algorithmic problem
Specification of
Specification of Algorithm
output as a
input function of input

• Finite number of input instances satisfying the specification.


For example:
 A sorted, non-decreasing sequence of natural numbers. The sequence is of non-
zero, finite length:
♦ 1, 20, 908, 909, 100000, 1000000000.
♦ 3.

AIUB::CSC2211::Algorithmc Introduction32
Algorithmic Solution
Input instance, Output related to
adhering to the the input as
Algorithm
specification required

• Algorithm describes actions on the input instance.


• There may be many correct algorithms for the same algorithmic
problem.

AIUB::CSC2211::Algorithm Introduction33
Definition of an Algorithm
• An algorithm is a sequence of unambiguous instructions for
solving a problem, i.e., for obtaining a required output for any
legitimate input in a finite amount of time.
• Properties:
 Precision  Efficiency
 Determinism  Correctness
 Finiteness  Generality

AIUB::CSC2211::Algorithm Introduction34
Overall Picture
Using a computer to help solve Data Structure and Algorithm Design
Goals
problems. Correctness Efficiency
• Precisely specify the problem.
• Designing programs
 Architecture  data structure
Implementation Goals
 Technique  algorithms Adaptability Reusability
• Writing programs
• Verifying (testing) programs

Robustness

AIUB::CSC2211::Algorithm Introduction35
How to Develop an Algorithm?
• Precisely define the problem.
 Precisely specify the input and output.
 Consider all cases.
• Come up with a simple plan to solve the problem at hand.
 The plan is language independent.
 The precise problem specification influences the plan.
• Turn the plan into an implementation
 The problem representation (data structure) influences the implementation.

AIUB::CSC2211::Algorithm Introduction36
??????
Suppose computers were infinitely fast
and computer memory was free. Would
you have any reason to study
algorithms?

AIUB::CSC2211::Algorithm Introduction37

You might also like