📚 Programming Tutorial

Design and Analysis of Algorithms

The word algorithm comes from the name of a Persian, Abu Ja'far Muhammad ibn Musa al-Khwarizmi, dubbed the father of algebra (al-jabr). An algorithm is a series of step-by-step instructions that aim to solve a particular problem.

DAA Tutorial Index

50 Topics

📘 Basics

📘

Introduction

Learn the origin of the word algorithm, its definition, characteristics and design strategies.

🧩

What is an Algorithm

Understand what an algorithm is and how step-by-step instructions solve a problem.

📊 Performance Analysis

💾

Space Complexity

Learn instruction space, data space and how the space requirement of an algorithm is calculated.

⏱️

Time Complexity

Learn how the running time of an algorithm is estimated.

📈 Asymptotic Notations

🔺

Big 'oh'(O)

Learn the upper bound (worst case) notation used to describe growth of an algorithm.

🎯

Big Theta(Θ)

Learn the tight bound notation that bounds a function from above and below.

📉

Little 'oh'(o)

Understand little o notation and learn how to represent a strict asymptotic upper bound for an algorithm’s growth rate with suitable examples.

📈

Little Omega(ω)

Understand little omega notation and learn how to represent a strict asymptotic lower bound for an algorithm’s growth rate with suitable examples.

📊 Solving Recurrence Relations

📝

Substitution Method

Understand how to solve recurrence relations using the substitution method by guessing a solution and proving it through mathematical induction.

🌳

Recursion Tree Method

Learn how to represent recurrence relations as recursion trees, calculate the cost at each level, and determine the total time complexity.

📐

Master’s Theorem

Learn how to solve divide-and-conquer recurrence relations using Master’s Theorem by comparing the functions f(n) and n raised to log base b of a.

✂️ Divide-and-Conquer

✂️

Introduction

Learn the divide-and-conquer strategy of splitting a problem into smaller subproblems.

🔍

Binary Search

Search for an element efficiently in a sorted array by repeatedly dividing the search interval into two halves.

⚡

Quick Sort

Learn how Quick Sort uses a pivot element to partition an array and recursively sort smaller subarrays.

🔀

Merge Sort

Learn how Merge Sort divides an array into smaller subarrays, sorts them recursively, and merges them into a sorted array.

🧮

Strassen’s Matrix Multiplication

Learn how Strassen’s algorithm multiplies two matrices efficiently by reducing the number of recursive multiplications.

🔗 Disjoint Sets

⚙️

Disjoint Set Operations

Understand the basic operations performed on disjoint sets, including creating sets, finding representatives, and combining sets.

🔍

Union and Find Algorithms

Learn how the Union and Find algorithms identify set representatives and merge two disjoint sets efficiently.

📋

Priority Queue

Understand how a priority queue stores elements based on priority and supports efficient insertion and deletion operations.

🌳

Heaps

Learn the structure of binary heaps, including min-heaps, max-heaps, heap properties, insertion, and deletion operations.

🔃

Heapsort

Learn how the Heapsort algorithm uses a binary heap to sort elements efficiently in ascending or descending order.

⚙️ Greedy Method

⚙️

General Method of Greedy Method

Understand the general approach of greedy algorithms, including candidate selection, feasibility checking, objective functions, and solution construction.

⏰

Job Sequencing with Deadlines

Learn how to schedule jobs with deadlines and profits to maximize the total profit by selecting and arranging jobs efficiently.

🎒

Knapsack Problem

Learn how to maximize the total profit by selecting items with given weights and values without exceeding the knapsack capacity using the greedy approach.

🌳

Minimum Cost Spanning Trees

Learn how to construct a spanning tree with minimum total edge weight using Prim’s and Kruskal’s algorithms.

🛣️

Single Source Shortest Path Problem

Learn how to find the shortest paths from a single source vertex to all other vertices in a weighted graph using Dijkstra’s algorithm.

🧠 Dynamic Programming

⚙️

General Method of Dynamic Programming

Understand the general approach of dynamic programming using optimal substructure, overlapping subproblems, recurrence relations, and tabulation.

🌳

Optimal Binary Search Tree

Learn how to construct a binary search tree with minimum expected search cost using the probabilities of successful and unsuccessful searches.

🎒

0/1 Knapsack Problem

Learn how to select items with given weights and profits to maximize total profit without exceeding the knapsack capacity using dynamic programming.

🛣️

All Pairs Shortest Path Problem

Learn how to find the shortest paths between every pair of vertices in a weighted graph using the Floyd-Warshall algorithm.

🚗

Traveling Salesperson Problem

Learn how to find the minimum-cost tour that visits every city exactly once and returns to the starting city using dynamic programming.

🛡️

Reliability Design

Understand how dynamic programming helps design highly reliable systems by selecting components and configurations to maximize overall system reliability within a given budget.

🔍 Basic Traversal and Search Techniques

🌲

Techniques for Binary Trees

Learn binary tree traversal techniques including preorder, inorder, postorder, and level order traversal with suitable examples.

🕸️

Techniques for Graphs

Understand graph traversal techniques including Breadth First Search (BFS) and Depth First Search (DFS) to explore vertices and edges.

🔗

Connected Components

Learn how to identify maximal connected subgraphs in an undirected graph using graph traversal techniques.

🧩

Biconnected Components

Understand biconnected components in an undirected graph and identify subgraphs that remain connected even after removing any single vertex.

↩️ Backtracking

🧩

General Method of Backtracking

Learn the general backtracking approach using state-space trees, promising functions, and systematic solution exploration.

♟️

N-Queens Problem

Learn how to place N queens on an N × N chessboard so that no two queens attack each other using backtracking.

🎯

Sum of Subsets Problem

Learn how to find subsets of a given set whose elements add up to a specified target sum using backtracking.

🎨

Graph Coloring

Understand how to assign colors to the vertices of a graph so that no two adjacent vertices have the same color.

🔄

Hamiltonian Cycles

Learn how to find a cycle in a graph that visits every vertex exactly once and returns to the starting vertex using backtracking.

🌳 Branch and Bound

⚙️

General Method of Branch and Bound

Understand the general approach of Branch and Bound, including state-space trees, branching, bounding functions, and selecting promising nodes.

🚗

Traveling Salesperson Problem

Learn how to solve the Traveling Salesperson Problem using Branch and Bound by finding the minimum-cost tour and eliminating costly paths.

🎒

0/1 Knapsack using LC Branch and Bound

Understand how the Least Cost (LC) Branch and Bound method solves the 0/1 Knapsack problem using upper bounds and a priority queue to find the optimal solution.

📦

0/1 Knapsack using FIFO Branch and Bound

Learn how the FIFO Branch and Bound method solves the 0/1 Knapsack problem by exploring live nodes in first-in-first-out order and pruning non-promising nodes.

🧠 NP-Hard and NP-Complete

🧠

Basic concepts

Explore the basic concepts of computational complexity and understand the differences between P, NP, NP-Hard, and NP-Complete problems.

🔀

Non-Deterministic Algorithms

Learn the concept of non-deterministic algorithms and understand how they guess and verify solutions to computational problems.

📚

NP-Hard and NP-Complete Classes

Understand the characteristics of NP-Hard and NP-Complete problem classes, their relationships, polynomial-time reductions, and important examples.

📖

Cook’s Theorem

Learn Cook’s theorem and understand why the Boolean Satisfiability Problem (SAT) is the first NP-Complete problem.

🔍

No topics found
Try another search term.