ALGORITHMIC THINKING WITH PYTHON

Module 4

syllabus 

COMPUTATIONAL APPROACHES TO PROBLEM- SOLVING(Introductory diagrammatic/algorithmic explanations only. Analysis not required) :-

Brute-force Approach - Example: Padlock, Password guessing 

Divide-and-conquer Approach - Example: The Merge Sort Algorithm - Advantages of Divide and Conquer Approach - Disadvantages of Divide and Conquer Approach 

Dynamic Programming Approach - Example: Fibonacci series - Recursion vs Dynamic Programming 

Greedy Algorithm Approach - Example: Given an array of positive integers each indicating the completion time for a task, find the maximum number of tasks that can be completed in the limited amount of time that you have. - Motivations for the Greedy Approach - Characteristics of the Greedy Algorithm - Greedy Algorithms vs Dynamic

Programming Randomized Approach

Example 1: A company selling jeans gives a coupon for each pair of jeans. There are n different coupons. Collecting n different coupons would give you free jeans. How many jeans do you expect to buy before getting a free one? 

Example 2: n people go to a party and drop off their hats to a hat-checkperson. When the party is over, a different hat-check person is on duty and returns the n hats randomly back to each person. What is the expected number of people who get back their hats? 

-Motivations for the Randomized Approach

Question Bank with Answers

Video Lectures

Computational approaches to problem solving | Brute-force Approach | ATP - Module 4 | Lecture 20

Topics covered

00:00 - Intro

04:00 - Brute-force approach

07:30 - Example: Padlock combination problem

Computational approaches to problem solving | divide and conquer | ATP - Module 4 | Lecture 21

Topics covered

00:00 - Intro

03:48 - The merge sort algorithm

06:05 - Advantages & disadvantages

Computational approaches to problem solving | Dynamic programming | ATP - Module 4 | Lecture 22

Topics covered

00:00 - Intro to dynamic programming approach

04:27 - example - Fibonacci series

07:14 - Recursion vs Dynamic programming

Computational approaches to problem solving | Greedy algorithm | ATP - Module 4 | Lecture 23

Topics covered

00:00 - Intro to Greedy algorithm

02:52 - Characteristics of Greedy algorithm

03:54 - Motivation for greedy algorithm

05:32 - Greedy algorithm vs Dynamic programming

06:52 - example -  task completion 

Computational approaches to problem solving | Randomized algorithm | ATP - Module 4 | Lecture 24

Topics covered

00:00 - Intro to Randomized algorithm

02:38 - Motivation for randomized approach

05:08 - Example 1 - jeans with coupon

11:49 -  Example 2 -  Hat distribution