Professional Documents
Culture Documents
Brute Force Algorithm: it goes through all possible choices until a solution is found.
Sorting Algorithm: to arrange elements of an array/list in a specific order
Searching Algorithm: to retrieve information stored within particular data structure, or calculated in
the search space of a problem domain
Search space of an algorithm
A search space is the set or domain through which an algorithm searches.
Searching space of an algorithm Search space represents a set of possible solutions, which a system may
have.
Propositional logic
Proposition: Simplest statements also called atomic formula
Propositional logic (PL) is the simplest form of logic where all the statements are made by
propositions. A proposition is a declarative statement which is either true or false. It is a
technique of knowledge representation in logical and mathematical form.
Space Factor − The space is calculated or measured by counting the maximum memory space
required by the algorithm.
Big Omega (Ω), works for lower bound best case / order at least
Big Theta (Θ), works for average bound average case / order exactly
BFS stands for Breadth First DFS stands for Depth First Search.
Search.
BFS works om the concept of FIFO . DFS works on the concept of LIFO
BFS does not use the backtracking DFS uses backtracking to traverse all
concept. the unvisited nodes.
It is not suitable for the decision It is suitable for the decision tree.
tree because it requires exploring Based on the decision, it explores all
all the neighboring nodes first. the paths. When the goal is found, it
stops its traversal.
Dynamic programming
Dynamic Programming is mainly an optimization over plain recursion. Wherever we see a recursive
solution that has repeated calls for same inputs, we can optimize it using Dynamic Programming. The
idea is to simply store the results of subproblems, so that we do not have to re-compute them when
needed later.
Mathematical Induction
It is a mathematical technique which is used to prove a statement, a formula or a theorem is true for
every natural number.
• Suppose for k
Knapsack Problem
Items are given with weights
We have to fit the most valuable items according to the value of sack
Stack
Stack is a linear data structure that follows a particular order in which the operations are performed.
The order is LIFO (Last in First Out).
Yes graphs can be converted into trees by using minimum spanning tree approach i.e. prim’s algorithm
and kruskal’s algorithm
prim’s algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted
undirected graph.
Kruskal's algorithm is a minimum spanning tree algorithm that takes a graph as input and finds
the subset of the edges of that graph.
Undirected graph
Undirected graphs have edges that do not have a direction. The edges indicate a two way relationship,
in that each edge can be traversed in both directions.
Directed graph
Directed graph have edges with direction which indicate one-way relationship, in that each edge can be
traverse in either one direction.
Compression technique
Huffman codes are a widely used and very effective technique for compressing data – Savings of 20% to
90% are typical, depending on the characteristics of the data being compressed.
• Huffman‟s algorithm uses table of frequencies of occurrence of characters to build up an optimal way
of representing each character as a binary string.
• Objective in Huffman coding is to develop a code that represents given text as compactly as possible
A Binary Search Tree (BST) is a tree in which all the nodes follow the below-mentioned
properties − The value of the key of the left sub-tree is less than the value of its parent (root)
node's key.
dynamic programming
compression technique
Asympotatic notation