# C Programming Examples on Numerical Problems & Algorithms

## 1. C Programming examples on “Solving Linear Equations”

Coppersmith-Winograd algorithm is used to to solve the multiplication of two square matrices. Coppersmith Freivald’s algorithm is to check if the 3rd matrix is the result of multiplication of the given two matrices. Gauss jordan elimination is an algorithm for solving systems of linear equations. Gauss seidel method is an iterative method used to solve a linear system of equations. This section contains C programs on solving mathematical equations, computing matrix inverse and matrix decomposition and implementation of various algorithms like coppersmith winograd algorithm, coppersmith freivald’s algorithm, gauss jordan elimination and gauss seidel method.

## 2. C Programming examples on “Bandwidth Reduction”

RCM Algorithm is used for Reducing the Bandwidth of a Sparse Matrix, This section contains C programs to perform optimization of the length of a wire in case of electric circuits, implementation of rcm algorithms and various bandwidth reductions on graphs.

C Program to Implement RCM Algorithm C Program to Optimize Wire Length in Electrical Circuit C Program to Perform Bandwidth Reduction on Graphs |

## 3. C Programming examples on “Matrix Multiplication”

Strassen Multiplication algorithm is used to compute product of two matrices. The C programs in this section Performs on matrix multiplication and operations like performing complex numbers multiplication, computing the path between the two nodes of a graph, dynamic programming and checking for a sparse matrix and implementation of strassen algorithm.

## 4. C Programming examples on “Determinants and Permanents”

This section contains C programs on Determinants and Permanents like check whether the given matrix is invertible or not and evaluating matrix determinant.

C Program to Check if a Matrix is Invertible C Program to Compute Determinant of a Matrix |

## 5. C Programming examples on “Constrainted and UnConstrained Optimization”

The C programs in this section to find the minimum and maximum value of any algebraic expressions and also computes local optima by implementing the steepest descent and conjugate method.

C Program to Find Minimum Value of any Algebraic Expression C Program to Find Maximum Value of any Algebraic Expression C Program to Implement Steepest Descent Method and Compute Local Optima C Program to Implement Conjugate Method and Compute Local Optima |

## 6. C Programming examples on “Linear Programming”

This section contains C programs to find the maximum value of an expression and optimising solutions for different applications using linear programming concept.

C Program to Find Maximum Value of an Expression and Given 3 Inequalities C Program to Optimize Solution for Employer Applicant Mark Problem Using Linear Programming |

## 7. C Programming examples on “Random Number Generation”

Fisher-Yates algorithm is used to randomly permute given input. Middle Square method is a method of generating ‘pseudorandom’ numbers. This section contains C programs on genrating passwords with specified length and range, generating random numbers and random hexadecimal bytes, generate random numbers using probability distribution function, middle square and carry methods, implementing rand and srand functions.

## 8. C Programming examples on “Factoring and Primality Testing”

This section contains C programs to generate prime numbers using sieev wheel, sieve of eratosthenes, sieve of atkin, sieve of sundaram and rabin-miller primalty test. It also contains programs on computing GCD, LCM and factorization of numbers. The other programs implement recursive and extended euclid algorithm, stein GCD, fermat factorization and pollard rho algorithms.

## 9. C Programming examples on “Arbitrary-Precision Arithmetic”

The C programs in this section deals with the implementation of booth, karatsuba and schonhage-strassen algorithms for multiplication. The other programs performs operations like addition, multiplication using bitwise operators and signed numbers.

C Program to Perform Addition Operation Using Bitwise Operators C Program to Implement Booth’s Multiplication Algorithm for Multiplication of 2 signed Numbers C Program to Implement the Schonhage-Strassen Algorithm for Multiplication of Two Numbers C Program to Perform Arithmetic Operations on Numbers of Size Greater than that of Int Without Using any Data Type of Size Greater than Int |

## 10. C Programming examples on “Knapsack Problem”

Knapsack problem is a problem in combinatorial optimization: Given a set of items, each with a mass and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. This section contains C programs on various knapsack problems like 0-1 knapsack, fractional knapsack, bin packing and dynamic programming.

C Program to Solve the 0-1 Knapsack Problem C Program to Solve the Fractional Knapsack Problem C Program to Perform Partition of an Integer in All Possible Ways C Program to Fill Given n Numbers into a Given N Number and Ensure that Minimum is Left from N C Program to Implement the Bin Packing Algorithm C Program to Solve Knapsack Problem Using Dynamic Programming C Program to Calculate Maximum Payoff by ReOrdering Two Given Sets |

## 11. C Programming examples on “Discrete Fourier Transform”

This section contains programs on computing DFT coefficients, naive approach and fast fourier transform methods. It also performs Complex 2D Array and implementation of bin packing algorithm.

C Program to Implement the Bin Packing Algorithm C Program to Solve Knapsack Problem Using Dynamic Programming C Program to Compute Discrete Fourier Transform Using the Fast Fourier Transform Approach C Perform to a 2D FFT Inplace Given a Complex 2D Array |

**Here’s the list of 1000 C Algorithms, Problems & Programming Examples.**