Algorithms

Algorithms

C Program to solve Knapsack Problem using Greedy Algorithm

C Program to solve Knapsack Problem using Greedy Algorithm : Below you can find how to implement knapsack problem using greedy method. What actually Problem Says ? Given a set of items, each with a weight and a value. Determine the number of each item to include in a collection so that the total weight is less than a given limit and...

C Program of Multilayer Perceptron Net using Backpropagation

C Program of Multilayer Perceptron Net using Backpropagation : A multilayer perceptron (MLP) is a feedforward artificial neural network model that maps sets of input data onto a set of appropriate output. An MLP consists of multiple layers of nodes in a directed graph, with each layer fully connected to the next one. Except for the input nodes, each...

C Program of Huffman coding using Greedy Algorithm Approach

C Program of Huffman coding using Greedy Algorithm Approach : This code is not written by me. I found a great article on Geeks for Geeks and thought it worth sharing. Still if you have any doubts ask me in form of comments. Basic of Huffman Coding : Huffman coding is a lossless data compression algorithm. The idea is to...

C program to Find Minimum Spanning tree KRUSKAL’s Algorithm

C program to Find Minimum Spanning tree KRUSKAL's Algorithm : Kruskal's algorithm is a greedy algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is...

C program to find Minimum Spanning tree PRIM’s Algorithm

C program to find Minimum Spanning tree PRIM's Algorithm : Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a connected weighted undirected graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. General apporach...

C program to implement Cyclic Redundancy Check CRC

C program to implement Cyclic Redundancy Check CRC : A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents; on retrieval the...