0% found this document useful (0 votes)
0 views17 pages

Applied Algorithm III

The document provides an overview of combinatorial algorithms and graph theory, emphasizing their significance in computer science applications such as AI, optimization, and cryptography. It covers key concepts like permutations, combinations, set partitions, and integer partitions, along with algorithms for generating these structures. Additionally, it discusses complexity classes, combinatorial optimization techniques, and real-world applications in logistics, telecommunications, and robotics.
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)
0 views17 pages

Applied Algorithm III

The document provides an overview of combinatorial algorithms and graph theory, emphasizing their significance in computer science applications such as AI, optimization, and cryptography. It covers key concepts like permutations, combinations, set partitions, and integer partitions, along with algorithms for generating these structures. Additionally, it discusses complexity classes, combinatorial optimization techniques, and real-world applications in logistics, telecommunications, and robotics.
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/ 17

EC9600: Applied Algorithm

Combinatorial Algorithms &


Graph Theory
Department of Computer Engineering
Faculty of Engineering
University of Jaffna

Mr Nishankar S
BSc Eng (Hons)
Combinatorial Algorithms
What are Combinatorial Algorithms?

● Algorithms that solve problems involving discrete structures.


● Focus on arrangement, selection, and optimization of elements.

Importance in Computer Science

● Relevant in AI, optimization, networks, cryptography, etc.

Combinatorial Structures Overview

● Key Concepts:
○ Permutations: Ordered arrangements of a set.
○ Combinations: Selections of items without regard to order.
○ Set Partitions: Dividing a set into non-empty subsets.
○ Integer Partitions: Expressing an integer as the sum of positive integers.
○ Trees: Hierarchical structures often represented as graphs.
Generating All instances of Permutations

● Definition:
○ Permutation of n items is any reordering of those items.
● Algorithm Example:
○ Recursive or iterative algorithms for generating all permutations (Heap's Algorithm).
● Example:
○ Permutations of {A, B, C}: ABC, ACB, BAC, BCA, CAB, CBA.
Generating Combinations

● Definition:
○ A combination is a selection of k elements from a set of n elements.
● Algorithm Example:
○ Backtracking or recursive algorithms to generate combinations.
● Example:
○ Combinations of size 2 from {A, B, C}: AB, AC, BC.
Set Partition

● Definition:
○ A set partition divides a set into non-empty, disjoint subsets.
● Algorithm Example:
○ Bell’s number computation for counting partitions.
○ Recursive partitioning algorithm.
● Example:
○ Partitions of {A, B, C}: {{A}, {B, C}}, {{A, B}, {C}}, {{A, C}, {B}}.
Integer Partition
Definition:

● An integer partition is a way to write an integer nnn as a sum of positive integers.

Algorithm Example:

● Recursive and iterative algorithms for generating integer partitions.

Example:

● Partitions of 4: 4, 3+1, 2+2, 2+1+1, 1+1+1+1.


Combinatorial Explosion
Definition

● Rapid growth in possible solutions as problem size increases.

Examples

● Permutations: n!
● Combinations: 2^n

Challenges

● Brute-force solutions become infeasible.


Complexity Classes Overview
Complexity Classes

● P: Solvable in polynomial time.


● NP: Verifiable in polynomial time.
● NP-hard: As hard as any problem in NP.
● NP-complete: Both NP-hard and in NP.

Why It Matters

● Many combinatorial problems fall under NP-hard or NP-complete.


Combinatorial Optimization
Definition

● Finding the best solution from a finite set of solutions.

Techniques

● Dynamic Programming, Backtracking,Branch and bound, cutting planes, linear programming.

Applications

● Scheduling, network design, resource allocation.


Trees & Graph
Definitions:

● Graph:
○ A graph is a set of vertices (nodes) connected by edges (links). Graphs can represent various relationships, networks, or
structures.
○ Types of Graphs: Directed, Undirected, Weighted, Unweighted.
● Tree:
○ A tree is a special type of graph that is acyclic and connected. It has a hierarchical structure, with one root node and all
other nodes branching out.
○ Key Property: There is exactly one path between any two nodes in a tree.
Graph Algorithms in Combinatorial Context
Common Problems

● Shortest paths, maximum flow, minimum spanning tree.

Algorithms

● Dijkstra’s algorithm, Ford-Fulkerson for maximum flow.

Example Problem

● Explain max flow with an illustration of a flow network.


Shortest Path
Dijkstra's Algorithm:

● Type: Greedy algorithm


● Graph Type: Works on both directed and undirected graphs with non-negative weights.
● Complexity: O((V+E)logV) using priority queue.
● Use Case: GPS systems for finding the shortest route between two locations.
Real-World Applications
Telecommunications

● Network design and frequency assignment.

Bioinformatics

● DNA sequence alignment and genome assembly.

Cryptography

● Secure key generation and combinatorial designs.

Logistics

● Vehicle routing and delivery scheduling.

Finance

● Portfolio optimization and risk management.


Challenges and Advanced Techniques
Challenges

● Scalability due to combinatorial explosion.


● Complex constraints in real-world scenarios.

Advanced Techniques

● Heuristics: Genetic algorithms, simulated annealing.


● Metaheuristics for approximate solutions.
Combinatorial Algorithm in AI
Application: AI Planning and Games

● Minimax algorithm in game theory.


● A* search for pathfinding.

Discussion

● How combinatorial techniques improve efficiency.


TSP in real world
1. Logistics and Transportation

● Vehicle Routing Problem (VRP):


○ In logistics, the TSP is essential for optimizing routes for delivery trucks. A company wants to minimize the distance or time taken by a fleet of
vehicles to deliver goods to various locations while considering constraints like vehicle capacity and delivery time windows.
○ Example: Companies like FedEx and UPS use TSP and its variants to plan delivery routes for packages. Efficient routing saves time, fuel, and
labor costs.

2. Manufacturing

● Printed Circuit Board (PCB) Manufacturing:


○ In the manufacturing of PCBs, machines need to drill holes in specific locations on the board. The goal is to minimize the distance traveled by the
drilling head between holes.

3. Robotics

● Path Planning for Automated Robots:


○ Robots in warehouses (like those used by Amazon or Alibaba) need to travel between storage racks to pick up items for customer orders. The
TSP helps determine the most efficient path for the robot to pick up all the necessary items.
○ Example: In Amazon’s fulfillment centers, robots navigate to collect products from various shelves to complete orders. Solving the TSP for the
shortest path leads to faster order processing and reduced energy consumption.
How would you approach solving a large-scale TSP?
Assignment:

Do the Travelling Salesman Problem using different algorithms like

Dynamic programming, Genetic Algorithm and compare their performance respect


to input size.

Input
Output

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