Skip to content

This repository contains Python implementations of two optimization algorithms: Branch and Bound and Exhaustive Search. Both algorithms address the same optimization problem, allowing for a direct comparison of their effectiveness.

Notifications You must be signed in to change notification settings

dlzams/exhaustiveSearch-BnB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Program Comparison: Branch and Bound vs. Exhaustive Search

This repository contains three Python files implementing two optimization algorithms: Branch and Bound and Exhaustive Search. Additionally, there is a text file used for input.

Files Overview

  1. BnB.py:

    • Contains the implementation of the Branch and Bound algorithm.
  2. ExhaustiveSearch.py:

    • Includes the code for the Exhaustive Search algorithm, solving the same problem as in BnB.py.
  3. Compared-BnB-ES.py:

    • Combines the Exhaustive Search and Branch and Bound programs for direct comparison. This file allows you to observe and analyze the running time and cost differences between the two algorithms.
  4. input.txt:

    • A text file used for input. Save it in the same directory as the program files if you choose to use it for input.

Usage Instructions

  1. Choose Input Method:

    • When running the programs, you can either use the input data from the provided text file (input.txt) or input the data manually.
  2. Save Input Data (if using input.txt):

    • Save input.txt in the same directory as the program files.
  3. Program Files:

    • BnB.py: Execute this file to run the Branch and Bound algorithm.
    • ExhaustiveSearch.py: Run this file for the Exhaustive Search algorithm.
    • Compared-BnB-ES.py: Use this file to compare the performance of both algorithms.
  4. Comparison Results:

    • The Compared-BnB-ES.py file displays a direct comparison between running times and costs for both algorithms. Analyze the results to understand the efficiency of each approach.

About

This repository contains Python implementations of two optimization algorithms: Branch and Bound and Exhaustive Search. Both algorithms address the same optimization problem, allowing for a direct comparison of their effectiveness.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages