DAA Unit-2: Fundamental Algorithmic Strategies
DAA Unit-2: Fundamental Algorithmic Strategies
Here, each child node is a partial solution and part of the solution set. Before constructing
the rooted decision tree, we set an upper and lower bound for a given problem based on the
optimal solution. At each level, we need to make a decision about which node to include in
the solution set. At each level, we explore the node with the best bound. In this way, we can
find the best and optimal solution fast.
Now it is crucial to find a good upper and lower bound in such cases. We can find an upper
bound by using any local optimization method or by picking any point in the search space.
On the other hand, we can obtain a lower bound from convex relaxation or duality.
In general, we want to partition the solution set into smaller subsets of solution. Then we
construct a rooted decision tree, and finally, we choose the best possible subset (node) at
each level to find the best possible solution set.
When Branch and Bound Is a Good Choice?
We already mentioned some problems where a branch and bound can be an efficient choice
over the other algorithms. In this section, we’ll list all such cases where a branch and bound
algorithm is a good choice.
If the given problem is a discrete optimization problem, a branch and bound is a good
choice. Discrete optimization is a subsection of optimization where the variables in the
problem should belong to the discrete set. Examples of such problems are 0-1 Integer
Programming or Network Flow problem.
Branch and bound work efficiently on the combinatory optimization problems. Given
an objective function for an optimization problem, combinatory optimization is a process to
find the maxima or minima for the objective function. The domain of the objective function
should be discrete and large. Boolean Satisfiability, Integer Linear Programming are
examples of the combinatory optimization problems.
Advantages:
In a branch and bound algorithm, we don’t explore all the nodes in the tree. That’s why the
time complexity of the branch and bound algorithm is less when compared with other
algorithms.
If the problem is not large and if we can do the branching in a reasonable amount of time, it
finds an optimal solution for a given problem.
The branch and bound algorithm find a minimal path to reach the optimal solution for a given
problem. It doesn’t repeat nodes while exploring the tree.
Disadvantages:
The branch and bound algorithm are time-consuming. Depending on the size of the
given problem, the number of nodes in the tree can be too large in the worst case.
Also, parallelization is extremely difficult in the branch and bound algorithm.
Bin Packing Explained
The fundamental aim of bin packing is to pack a collection of objects into well defined
regions called bins, so that they do not overlap. In the real world, the critical issue is
to make efficient use of time and/or space. A bin for example, need not necessarily
be a container, but could represent a space in time or a surface area.
The One-Dimensional Bin Packing Problem:
Mathematically, the one-dimensionalbin packing problem can be described as
follows:
Given a bin capacity C>0 and a list of objects {p1, p2,...., pn}, what is the smallest number of
bins needed to accommodate all of the objects? ( Each pi has size si, such that 0<=si<=C.
i.e. none of the objects too big to fit in a bin)
Four easily recognisable one-dimensional bin packing problems are detailed below:
A material such as piping or cable is supplied in quantities of a standard length C.
The demands for pieces of the material are for varying lengths that do not exceed C.
The idea is to use the least number of standard lengths of the material in producing a
given set of required pieces. Hence minimising the wastage.
Advertisments of arbitrary lengths, must be assigned to commersial break time slots
on television. Each break must last no longer than three minutes.
Removal lorries with set weight limits are to be packed with furniture. The aim is to
use as few lorries as possible to pack all the items, without exceeding the maximum
weight in any lorry.
A set of tasks with known, arbitrary execution times, need to be executed on some
identical processors by a given deadline. The problem is to schedule all of the tasks
onto the least number of machines so that the deadline is met.
In the last example, it is time that is the critical resource. It is a scheduling problem; the
processors are the bins, the deadline is the common bin capacity, and the individual
execution times of the tasks are the objects (pi) in the list.
The Two-Dimensional Bin Packing Problem:
This problem is concerned with packing different sized objects (most commonly
rectangles) into fixed sized, two-dimensional bins, using as few of the bins as
possible. Applications of this type of problem are often found in stock cutting
examples, where quantities of material such as glass or metal, are produced in
standard sized, rectangular sheets. Demands for pieces of the material are for
rectangles of arbitrary sizes, no bigger than the sheet itself. The problem is to use the
minimum number of standard sized sheets in accommodating a given list of required
pieces.
A variation on the two-dimensional bin packing problem is the strip packing problem
and this is the area that I shall be concentrating on most.
Heuristic :
The need for Heuristic Evaluation :
Heuristic Evaluation is the process of thorough evaluation/assessment where the experts in a
particular domain, used to measure the usability of the user interface. Usability can be defined as how
easily a specific user can use a particular design or say interface without facing any problem. In
general, we can say the Heuristic Evaluation is performed to detect the issues in the design of a
product. It also identifies the ways to resolve those issues present in design and meet the user
expectations.
Heuristic Evaluation is an in-depth usability test that is performed by the experts. As it is also well
known to everyone that better usability, higher the number of users will interact with the product.
Jakob Nielsen and Rolf Molich are web usability pioneers who published the article in 1990, which
contains a set of heuristics. A heuristic can be defined as the fast and practical way to approach a
problem and make effective decisions to solve those problems. Experts use the heuristics approach to
systematically evaluate the user experience (UX) design.
When to conduct Heuristic Evaluation :
There is no such rule when to perform the Heuristics Evaluation, but it can be performed at any stage
of the design process. Most of the time the heuristic evaluation is performed after the paper
prototyping and usability test. As Heuristics Evaluation helps to optimize the design of the user-
interface it becomes very important to be performed to evaluate the final design.
How to conduct Heuristic Evaluation :
Define the Scope of Evaluation –
Mentioning the budget and deadline becomes very important at the time of evaluation. One should
also define the different parameters where they want to conduct the usability test.
Know the End-User –
As we know, different groups of people have different expectations from a product. So it becomes
very important to know the end-user and their interest.
Choose your Set of Heuristics –
Without a proper heuristic, the Heuristics Evaluation will produce unreliable and useless results if all
the evaluators are not going to use the same guidelines.
Setting-up an Evaluation System and Identifying Issues –
Decide the different categories in which a problem should be categories like a critical issue, minor
issue, etc. Evaluators must follow the guidelines of system evaluation.
Analyze and Summarize the Results –
It becomes very necessary to analyze the issue present in the design of user interface and solve those
issues before the deadline.
Advantages :
Reveals many hidden usability problems.
It helps to determine the overall user experience.
Heuristics evaluation can be combined with usability testing.
Better Heuristics Evaluation helps to engage more users.
It is cheaper and faster than conducting full-blown usability testing.
Disadvantages :
Sometimes it is a bit hard for even experts to figure out some problems.
It becomes hard to find experts to conduct the Heuristics Evaluation.
We will need few expert evaluators, so that it will become easier for us to stick with
usability testing.
Flaws in design will affect the engagement of users in the product.
Heuristics testing depends on the expertise level of only a few experts.