Algorithms in C Plus Plus

From codeuu,source code

Jump to: navigation, search
Archer

A smart decompressor. Uses an interesting algorithm which involves some heuristics. May be improved in the future for more performance.

A.I Program Chatterbot Eliza v2.0 (c plus plus eliza)

I HAVE POSTED THIS CODE TO SOME OTHER WEBSITES (CODEPROJECT.COM AND OTHERS) AND I HAVE RECEIVE SOME VERY GOOD FEEDBACKS ABOUT IT. I KNOW THAT THIS CHATBOT IS FAIRLY SMART, SO DONT FORGET TO VOTE FOR ME!

An Advanced TicTacToe game using *MiniMax Algorithm*

This is a complete Tictactoe game, it includes many functionalities, you can play games

A Queue of guessing my traits with simple animation

Apply the queue concept

Animation and OOP

demonstrates the use of object oriented programming. a full description of the purpose is in the read me file

A REPORT ON BLOCK CIPHERS

This document is a literature survey about block ciphers, especially based on Feistel Network, presented in form of a report. The report concentrates on providing a starting point for designing strong, secure, and efficient cryptosystems. Various design issues and algorithms have been described in the report. Description about various forms of cryptanalysis has also been provided. Report explains the key players of design of block ciphers in detail. The report will provide as a excellent reference material for anyone who wants to design a Feistel network based block cipher.

Array 2D

It is a great code for beginners to learn from. It accepts a 2D array and displays it. It calculates the sum of each row, each column and each diagonal and displays them. It calculates the sum of diagonal elements and non-diagonal elements and displays them. It also calculates the sum of all elements above and below right diagonal, and of those above and below left diagonal, separately, and displays them.

arithmetic expression parser

The code includes a portable tokenizer like the StreamTokenizer in Java. It parses and interprets an arithmetic expression expressed in a flexible C-like syntax.

Algorithms & Data Structures Sorting and Searching

Here you have a number of sorting and searching algorithms. They include

Array Sorting

This package contains a sort header file I developed with 4 types of sorts: bubble, insertion, quick, and selection. The header also uses templates so that you can implement the sorting of several types.

Menu Driven Sorting and Searching Algorithms

Allows the user to test various sorting and searching algorithms

Algorithms and Data Structures Linked Lists and Trees

Algorithms and Data Structures - Linked Lists & Trees. Here you have examples of linked lists, stacks, queues and binary search trees. oop

A Fraction Calculator

This is just a simple Calculator that allows someone to +,-,*,/ fractions. Was a class lab thought it might actually be useful to someone.

Another Bubble Sort with cmd Line args

The program accepts the names of an input and an output file from the command line. Reads strings from the input file into a two dimensional array: char input[20][40]. Uses bubble sort and strcmp to sort the strings in ascending order and writes the sorted array to the output file.

a Binary Search Example

The program accepts the name of an input file from the command line. Then it reads strings from the input file into a dynamically allocated array of pointers to char. Prompts the user for a string to search for. After that it searches the array using binary search. If found, reports the row (counting from 1) in which the target was found. If not found, reports "Not Found"

A 2D game engine for C plus plus and an example : Aero Blasters

<> </b>

A Doubly Linked List C plus plus Class

A general-purpose doubly-linked list C++ class.

A Priority Queue C plus plus Class

A Priority Queue C++ implementation.

A Shortest Path C plus plus Class

A C++ Class implementing a shortest-path algorithm on a rectangular grid where grid elements can be marked impassable and the algorithm must quickly find the shortest path from point A to point B. Uses a priority queue class. This is typically used in game software to allow the AI to move a unit from one map location to another.

add with out using plus sign

this is a small trick to add 2 numbers with out using the add signe + using XOR and & operaters.

A Bottom Up Parser Example !

It is an example of a bottom-up parser, using an algorithm I came up with. My bottom-up parser was completely hand-written, without any code generation. It's algoritm is centered around a finite-state machine code as a tree structure with several nodes and edges. The grammar is generated at runtime.

A program called 3DPlot

This program demonstrates my implementation of the floating horizon

A Faster Way to "MOD" and how to grab a digit from an Integer

This program is to show how to get the last digit of an integer type without using

CPU scheduling algorithms

simulate the scheduling of a CPU, calculate waiting time & average, turnaround time,etc...

Artificial Intelligence Pathfinder

This is pathfinder artificial intelligence program in which the PI Robot solves any closed maze that is it finds it way through mazes.It uses my 4 way block algorithm to solve 2d puzzles.It can be used in games, as a base to develop much more complex intelligence and robotics.Please credit and vote for me.

Advanced Encryption Standard

Implement the advanced encryption standard (AES) in C. Includes certification test from FIPS.

All sorting techniques

Perform all sorting techniques, including bubble sort, selection sort, insertion sort, heapsort, merge sort and quicksort. The program employs an array list as the data storage.

A primitive version of the "Game of Life"

An implementation of the Game of Life algorith, I wrote many years ago. The whole display is rather primitive, as the algorithm just draws to the screen without using a window...

Archimedes spiral

Archimedes spiral

Algebric expresion evaluator

This programe evaluates an algebric expresion.It uses binary tree algorithms,classes and other data structures...it is a good exercise for data types(it uses STL classes)

ANSI Base64

This is a little project I embarked on a couple of weeks ago, to write a base64 encoding algorythm in pure ANSI C, with no platform specific code at all. It consists of a single source file and a simple header. There is no documentation included as it is very self explanitory.

ANSI Base64 Encoding

This is a little project I embarked on a couple of weeks ago, to write a base64 encoding algorythm in pure ANSI C, with no platform specific code at all. It consists of a single source file and a simple header. There is no documentation included as it is self explanitory.

Animated solution to the N queen problem

This code gives an animated solution to the N-queen problem, only that due to a large chess board i have been able to accomodate only a maximum of 7 queens..

Huffman coder/decoder

The Huffman coder/decoder is a set of classes classes with general C++ code. Currently, it can only be used on C "FILE" streams.

A N Queens Problem

To solve N Queens Problem

Algorithm for Pi

Teaches the baisic loops and operations like sqrt

Arithmetic Expression Evaluator

This is a simple arithmetic expression evaluator,it handles operation such as addition, substraction, multiplication and division,the modulus operator,the power function and parentheses are also handled.

Algebra Solver

Solves Algebraic Equations with the Determinant method. Introduces linear algebra which is very helpful in computers

A VSM Classifiers Package

Defines a simple vector space model classifier interface and two derived examples - a rule based classifier and a case based classifier.

Artificial Intelligence Chatterbot Eliza v1.4

The implementation of the program has been improved, the repetitions made by the program

BitReader

Allows the reading of bits from a given byte provider.

Base64

base64 encoder,decoder.

Base Convertion

realize a binarie, octal, decimal an hexadecimal cpnvertion.

Basic Genetic Algorithm

This code and accompanying explanation is designed to be an introduction to basic genetic algorithms. It uses the roulette wheel method to optimize the function x^2 using six digit binary strings. The accompanying document goes through the algorithm and the code step-by-step.

BCD counter

BCD counter & the 4 bits of clock pulses

Base64 encoding/decoding DLL, complete with sample EXE!

Base64 is a public encoding/decoding algorithm. It is used in many ways, for example in authorization and E-mail attachments. Let's say you want to enter a site that requests a user name and password (I'm talking about that dialog thing that you get in your browser). You type in "MyUserName" and "MyPassword". At this point the browser first concatenates the strings with a colon between them: "MyUserName:MyPassword". Then it encodes the resulting string with Base64. The result is "TXlVc2VyTmFtZTpNeVBhc3N3b3Jk". This is what is sent to the web-server (this is the process in a non-secure protocol like http - in a secure protocol like https, the process is a bit different). Another use is in E-mail attachments. When you attach a non-text file (such as a JPG file) to your E-mail message, your E-mail client first encodes this file in Base64, and only then sends it to the SMTP server. When you retrieve the E-mail message from the POP server, you receive the encoded file and your E-mail client decodes it to get the original file back.

Boyer Moore String searching

Demonstrates Boyer Moore string searching algorithm

Basic Fraction Mathematical Operations

Shows how to overload basic operators like +,-,/,*,<,>, and ==. It even overloads >> and <<. So that cout<<Fraction; is possible.

BUBBLE SORT programs

BUBBLE SORT program

Banco

Este codigo realiza una simulaci?n de cuenta bancaria en donde se introduce el nombre y da distintas opciones para realizar operaciones bancarias.

Binary search algorithm

This is a binary search algorithm that first sorts the array and then searches by jumping on the middle element , as linear search of arrays is quite slow with large arrays

BWT Compression

Compression using Burrows Wheeler Transform.

bellman.cpp

Find the single source shortest path using Bellman Ford algorithm.

banker's algorithm

This is banker's algorithm used by the operating system to determine the safe sequence in a system.Your have to input two matrices and the processes along with there instances of each resource required . the programm will then tell u the sequence in which resource must be allocated to different processes so the system remains in a safe state. This is deadlock avoidance

base64

base64 enables you to encode/decode data streams in the base64 alphabet (this mechanism is used to attach content to email messages)

BINARY , DECIMAL, HEXADECIMAL, BASE X , CALCULATOR

A simple BINARY , DECIMAL, HEXADECIMAL, BASE X , <<<<<<CALCULATOR>>>>..this code demostrates how to do all this operations with a simple few lines of code...NOTE: that it is not a complete calculator..it only demostrates the way it is done :)...but you can make it complete with yust a few modifications...i have found a lot of code in PSc but none of it works the way it has to..so here you have a few lines of free and working code :)

BruteForce Engine

Finds every possible combination of ASCII

BorlandCProgs

Miscellaneous BorlandC Programs and Algorithms

Binary Search Trees

This is a small demo which explains and demonstrates how to use the binary search tree data structure. Binary trees are extremely efficient at inserting and traversing ordered data, with only order log n complexity for insertion and traversal. Please leave any comments or questions you have.

BigInt C plus plus class for computation with arbitrary large integers

To enable computation with arbitrary large integers. Test run log file is at http://groups-beta.google.com/group/log-files/msg/c0cea141d6f67a57

Bin plus Bin=Bin , Dec

Bin + Bin = Bin , Dec

BlowFish Encryption/Decryption

This is a simple Blowfish encryption/decryption class implemented in C++ (MFC)

Bresenham Circle

This code implements Bresenham algorithm

Download Calculator (Updated)

-- UPDATED --

CIRCLE.ZIP

This is the algorithm of drawing a circle using the line command. Usefull for Novice/Beginners to show how mathematical functions/modules can be written if not available in built-in libraries.

CRC16/CRC32 Checksum (Blazing Fast CRC32 File Checksum)

This will compute CRC16 and CRC32 checksums for any file, string, or byte array! There is also both the static and dynamic methods for computing them too. The CRC32 checksum is blazing fast and possibly one of the fastest on PSC. (You can see in the screenshot a 100 meg file took but a few seconds) The CRC16 is not highly optimized as I am not going to use it. I just wrote this for the CRC32 checksum and added CRC16 just for giggles. This is going to be used in a commercial product so enjoy. The code is pretty straight forward so it is not heavily commented. The test project is in VB. Please leave feedback and vote for me if you like this.

Calc Ivo

This code is a calculator pojected in C plataform using many funtions with best algorithms. Enjoy!

BinWorks II.DLL

This is a DLL to be used with VB. It is the C companion to the VB BinWorks II program posted there on Jan. 1, 2001. Does BYTE, INT & LONG to bin, hex etc. Mostly shows C programmers how to write DLLs and for VB programmers they can check that I didn't build in any VIRUS code. The accompanying VB code can be found in the psc-VB section.

Caesar Cipher (the shift cipher)

Encrypt/decrypt text file with Caesar Cipher

CPU scheduling algorithms

simulate the scheduling of a CPU, calculate waiting time & average, turnaround time,etc...

word counter

This will extract words from a file and keep track

C plus plus Examples

My CPP Examples

ceasar encryption/decryption

ceasar cipher encryptionand decryption

Find G.P.A

Find the G.P.A. of student. This code uses and array that user creates the size of and returns the GPA. This can be an example of how to create a array without telling the compiler the size at compile time. It also uses pointers, if statements, and for loops.

Create ShortCut with com

this code illustrate how to create a file shortcut with com interfaces.

Binary Search

Demonstrates binary search with either

CONVOLUTION

THIS PROGRAM IS TO FIND THE CONVOLUTION X[N]*H[N] OF TWO SEQENCES X[N] AND H[N] TO FIND THE CONVOLUTION RESULT Y[N] AND TO PLOT THE THREE SIGNALS,X[N],H[N] & Y[N] WHICH IS A VERY IMPORTANT APPLICATION IN DIGITAL SIGNAL PROCESSING

Cryptography Caesar

The classical cipher cryptography type is transposition ciphers, which systematically replace letters or groups of letters

Cohen Sutherland Line Clipping

Uses Clipping Windows to Clip Visible Portions of Lines...Very Basic (but brilliant) CG Algorithm...

Simple RLE Compression (Super Fast!)

This compression is based on the RLE compression basis. It compressed a file of mine that was about 660,000 bytes to 440,000 bytes in about .201 second. and decompressed it in .102 second! Thats a 30% reduction in size in a fraction of a second! enjoy!

crazymouse

random move your mouse

Cputs Center

This centers text and prints in using cputs, so you can change the font color in Turbo C++ or Borland C++.

A Graphical Sorting Program

This program graphically explains basic sorting algorithms. Included is the bubble sort, the insertion sort, the selection sort, the shell sort, and the quick sort. There is a delay option so that the sorting can be slowed down to see what the computer is doing as well as a pause option so that you can pause the sorting on the screen by simply clicking the graph.

WAVE PACK

IT SHOWS AN EXPANTION WAVE

CORD PACK

IT SHOWS DIFERENT KIND OF ROPES

Chess: 8 queens solution using a stack

Goal

Count characters

This little program will gather all entered characters and determine how many numeric characters there are, alpha characters and special punctuation chars, including spaces!

Concatenate two char arrays

A strcat() clone function, concatenates two char arrays and auto. delimits both strings with a space!! If you hate the strcat() function in the string.h, get this!

Calculator using the switch statement

This program is a simple calculator for simple arithmetic, it uses a switch statement, check it out!

Crazy X

This program is dumb but kinda amusing, it's an X that is printed in random places... sorry, I was bored.

Cheesy OpenGL Mandelbrot Set

To show one possible rendering of the mandelbrot set in openGL. The mandelbrot set is rendered with varying precision and a slight rotation. i kept the precision down so it wouldn't be too processor intensive. hope you enjoy.

Compression tool

This is a command-line compression and extraction tool using an Huffman algorithme. The source code also includes heap and bit stream management functions.

C/C plus plus Program Perfometer; .zip (Version 2.6.1 1.17)

Web page : http://alexvn.freeservers.com/s1/perfometer.html

Computing very long Fibonacci numbers

Computing very long numbers, including Fibonacci ones (for instance, Fibonacci[5,000,000])

BINARY , DECIMAL, HEXADECIMAL, BASE X , CALCULATOR

A simple BINARY , DECIMAL, HEXADECIMAL, BASE X , <<<<<<CALCULATOR>>>>..this code demostrates how to do all this operations with a simple few lines of code...NOTE: that it is not a complete calculator..it only demostrates the way it is done :)...but you can make it complete with yust a few modifications...i have found a lot of code in PSc but none of it works the way it has to..so here you have a few lines of free and working code :)

Chess Recourse

A Chess Tool Is Moving On A Board That You Can Change His Sizes Until He Reaches A Number Of Steps That You Said Would Be Enough. When He Come To This Step, He Prints His Course, And Try To Find The Next course. The Chess Tool Can Be Selected From All Chess Tools Exist.

MP3 Decoder/Playback Source

This code demonstrates how MPEG-Layer 3 (MP3) files are read by programs like WinAmp and Windows Media Player. Note this code uses no Windows API calls, DLLs, or OCXs. This is the *RAW*, *VERY UNREFINED* CODE for reading and playing MP3s. It contains no examples, but is based on FreeAmp, so if you want an example, FreeAmp is as close as you're going to come. I do plan on creating an example sometime later on, but for now, here's the code that everyone's wanted. =) I can't take credit for this code, though. The ORIGINAL MP3 decoding algorithms were written by the Fraunhaufer Institute. Oh yeah, while I'm at it, vote for me! =)

C plus plus Simulator Turing Machine with faults, failures and recovery
Calculate CRC32

Implementation of the CRC32 algorithm which is also used in PKZip, Winzip, Ethernet, FDDI and many others. This unit is compatible with these applications, because it uses the same popular 32 bit polynomial 0x04C11DB7.

maya

general library graphics,strings,sockets,math,matrix,vectors,file

CCITT Cyclic Redundancy Codes (CRC)

Calculate CCITT cyclic redundancy codes (CRC)without clobbering the processor's data cache. Both 16 and 32 bit codes are provided.

Basic Graphics Algorithms

Basic Graphics Algorithms

circular doubly linked list

Circular Doubly Linklist :-

convert to binary ,octal ,hexadecimal

convert decimal to binary ,... it is very simple code. if you have a time and like it vot it please!!!

cpu scheduling round robin technique

CPU Scheduling algorithm. It uses round robin technique to assign the processor to various processes currently runnig.

CPU Scheduling Simulator

Simulates the two CPU-scheduling algorithms used by operating systems, namely Priority scheduling and Multilevel Queue.

Custom getopt function

The purpose of this code is offer a mechanism for programmers to allow them to make efficient use of switches in a command driven application and to extract the arguments for each switch eg appname.exe -t bling -r haha -g

CPU Round Robin Scheduler Algorithm

This program simulates the round robin Algorithm of operating system To know how the process works, you must know the concept of round robin scheduler Algorithm in operating system.

cryptographically secure random numbers

This code generates either one number, or a sequence of numbers, based on a crytographically secure seed value. It depends on a call to CryptGenRandom. See the code for details...

conversion from strring to int and int to string

THe program contains 2 simple functions:

Cpu scheduling Round Robin

Different Cpu Scheduling algorithms graphical representation

Calculate Pi to 10000 digits

Calculate Pi to 10000 digits

C plus plus Simulator Post Machine (Version 1.2)

The C++-program simulates a Nondeterministic Multitape Post Machine (PM). PM is defined by set of setup files. The simulator works as ordinary (deterministic) Post Machine as well.

NewPrimes

New version! A minor speed optimization.

PerfectNum

PerfectNum finds perfect numbers. It's actually answering a question in Ask A Pro. I hope this teaches someone something useful.

PerfectNum2

This is a newer version of my old one (PerfectNum). This one is much faster. I wrote this to answer a question in Ask A Pro. Please vote on my programs (either good or bad). Also, be sure to check out my other programs.

NumPrimes

Use an argument to specify how many primes to find. NumPrimes will find that number of primes starting at 2. This is an answer to an Ask A Pro question. If the compiled EXE doesn't work, lower the SIZE definition.

cpu algorithm

preemptive priority, non preemptive, round robin

phzero

This a a search called the Binary Seacrh. It is extremely fast and straight to the point. Works on strings and numbers.

Mass Calculator

This code implements colors in DOS console mode and calculates a mass equation (physics).

My Win32 App #9 Fibonacci Analysis

This program will calculate the nth Fibonacci number,

Drop ngonar d'Character with a simple animation
Drop ngonar d'Character with a simple animation

knowing the usage of getch function and a little animation

deadlock banker's safety algorithm

avoid any deadlock state in resources allocation

Dos Shell

This program likes as Dos Shell of Microsoft.

day of week teller

Enter a valid date and this program will tell which day of the week the inputed date is/was

Draw Box

This program will draw a box on the console screen in accordance with a user specified width and height.

DeCSS Source

DeCSS Source code. Code that decrypts the CSS encryption algorithm found on DVDs.

Dijkstra short path

The program calculates the shortest distance from a beginning point for all other points of a 2D array

decimal square roots

Implement the MARCHANT calculator method of extracting DECIMAL square roots

Drawing triangle with 02 FOR LOOP

Drawing triangle

dijkstras algorithm

Find the single source shortest path using dijkstras algorithm

depth first search

This code written for a directed graph. it search the given graph and prints the edges which are after dfs search selected.

Drawing Pyramid

The Programme take values form the user and draw a pyramid of that height

Decimal to Binary conversion

Reasonably good algorithm to convert a number from decimal to binary system of numbers. Can accept numbers upto 35 million. Hope the comments are sufficient.

Huffman coder/decoder

The Huffman coder/decoder is a set of classes classes with general C++ code. Currently, it can only be used on C "FILE" streams.

DES Algorithm

//======================================================================================

Database Query Join Algorithms

database algorithms for query joins, implementation of algorithms such as nested loop joins, hash joins and sort-merge joins in c programming language.

DATA DIRECTED REPORT DESIGN

This program is used to demonstrate proper data-directed design for generating reports of any kind.

Warnock Subdivision Algorithm

This algorithm will recursively subdivide the rendering area, until said area contains only a single object, or it reaches a predefined minimum, at which point it will perform a z-sort, and only draw the pixel(s), closest to the display plane. This algorithm renders with zero overdraw, regardless of scene complexity. It can also be extended to divide to the subpixel level, which will give an antialiased effect.

Element Comparision

Here's a program with which you can see the element comparision very perfectly. so enjoy my code & must vote for it.

EncryptS

Encrypting Files by Sequence Encryption

eight queens extended to n queens

Takes the N value from the user and solves the NxN queens problem.

Eight Queens solution with a Linked Stack

This solves the same problems as my last submission, Can you place 8 queens on a chess board such that none of them will attack each other? The only difference with this version is that it uses a Linked Stack instead of an array based Stack.

Encoding decode

This program read a file once original.txt was called and he encodes it to a binary format.

Encrypt and Decrypt

It encrypts/decrypts strings and files using one of either two methods (which the user specifies): XOR or add 2.

Evaluating Bisection Method

This program reads a given equation and finds the root for the equation using bisection methid.

Sudoku Solver.

Six stage sudoku solver. Runs five stages of heuristics, if that doesn't work it falls back on brute force. It's cracked every puzzle I've thrown at it, so I'm pretty sure it will solve anything.

Expression Parser(Scanner) compiler construction

the puurpoise of this program is to parse expressions from an input file and display token type and value in an output file

Elementary logic development examples

Questions from past ICPSC competitions are solved, and the logic behind each is explained to provide an introduction to simple logic, and programming skills.

Even and Odd num calc. v2

this is a fairly simple code that determines whether the integer you

Ford Fulkerson method, Edmonds Karp implementation

UsingFord-Fulkerson method, implemented Edmonds-Karp algorithm to solve the maximum flow in the weighted network. This is 1st part of my term project in my Algorithm class. This also the 1st program I coded by C++, so there may here some redundancies and errors in my source code, please show them to me if you find any.

Ford Fulkerson method, Edmonds Karp algorithm

This code implement Edmonds-Karp algorithm (an improvement of Ford-Fulkerson method) using C++. I coded this on Microsoft VC++ v60. This is my first program written in C++, so it may contain some error or redundancy. Please inform me if you find any.

FCFS

Calculate the first come first serve process

File Simulation

simulate a simple file system using the best fit, worst fit and first fit methods.

Floyd's Cycle Detection (The Tortoise and Hare Algorithm)

The Algorithm is an efficient way determing if a Linked list contains a loop...the source code is commented...for more info read the wikipedia page...

Faster searches using indexes

It allows faster binary and linear search using the basic indexing. cades file has been included. it allows you to compare the time taken by each type of search

fractals with Newton Raphson

It creates the fractal of a complex polynomial (the fractal is created with the Newton-Raphson algorithm) There is a help file included that you will find a bit more enlightning!

Fuzzy Cognitive Map

This code will evaluate a FCM and help to solve real world problems.

File I/O

This program will open a file in read ("r") mode and will provide a pause for every 10 lines, so the reader can be able to read it.

Flexible Vector and Matrix

Flexible Vector and Matrix Classes enable to use vectors and matrixes with arbitrary bounds.

Fibanocci and N Fibanocci

Please vote:This code generates both fibanocci and non fibanocci sequences upto user specified limit and writes the output onto text file.

Fibonacci Numbers(simple)

Understanding the use for equations and being able to use alternative ways around arrays.

Figure to Word

converts number to word

Floyd Warshall algorithm

This is a Graph algorithm. Very famous and effective algorith for finding all pairs shortest path. This is one kind of dynamic programming approach. There are several problems in ACM problem sets based on this algorithm.

Find & Replace Text

Find and replace string in a html file (unicode version).

CRC16/CRC32 Checksum (Blazing Fast CRC32 File Checksum)

This will compute CRC16 and CRC32 checksums for any file, string, or byte array! There is also both the static and dynamic methods for computing them too. The CRC32 checksum is blazing fast and possibly one of the fastest on PSC. (You can see in the screenshot a 100 meg file took but a few seconds) The CRC16 is not highly optimized as I am not going to use it. I just wrote this for the CRC32 checksum and added CRC16 just for giggles. This is going to be used in a commercial product so enjoy. The code is pretty straight forward so it is not heavily commented. The test project is in VB. Please leave feedback and vote for me if you like this.

Fast 8 puzzle

This is the fastest 8-puzzle solver algorithm I have seen, with resolution times of under a second. Its speed is due to the fact that the visited states are saved as bits. It has not been exaustively tested but so far, all the solutions have been correct. E-mail me any questions or comments, and rate my code if you think it deserves it.

Genetic Algorithm Library with Java GUI

The Genetic Algorithm Library is used for function optimization i.e.to find minimum or maximum value of

Genetic Algorithm Library With JAVA GUI

Genetic algorithm library is used for function optimization i.e to find global minimum or global maximum value of a function.The JAVA GUI is very user friendly,linux compatible and unique.

Garbage Collection and Compaction Techniques

Almost every programming system offers the programmer some functionality to dynamically allocate storage in amounts not for-seen at coding time. Except in the rare cases when those objects are used and needed for the whole running time of the program, eventually the storage used by them must be freed and given back to some management facility-otherwise your program would continue to grow, eating up tons of unused storage space. If manual memory management (for example, malloc and free in C) is used, it forces the programmer to keep track of which memory is still required, and he is responsible for freeing it. This destroys the good software engineering principle that programs should be developed in small independent components. If we are using automatic memory management, it frees the programmer from these concerns, making it easier for us to code in the language of our problem, rather than the tedious details of the implementation. Automatic memory management is often called, as GARBAGE COLLECTION. Automatic memory management is a service, either as a part of the language or as an extension that automatically recycles memory that a program would not otherwise, use again. Automatic memory managers (often known as garbage collectors) usually do their job by recycling blocks that are unreachable from the program variables. Download the complete article ...

GETIMAGE

LA UTILIZACION DE FUNCIONES BASICAS DE EL MODO GRAFICO

Gamasort, an improved Radix Sort Exchange Algorithm
  • This is a Radix Sort Exchange routine which will work only on
Generic Container in C

This module implements a generic 'container' in C. The container can contain either pointers or actual data of any size and type, including structures. Using this method, you no longer have to write a separate bit of code for every data type you want to store.

Good Ex of Binary Search

This is an example of Binary Search. Very heavily documented. It allows you to enter in the number that you want to search for and also a number you know that was not in the array.

General Tree

This program demonstrates the creation of trees in C++. I've included a GUI to display the tree structure. You will need the correct BGI (Borland Graphics Interface) to run it.

Game Trees and minimax method (minima maxima)

This article explains how game trees work, and the use of minimax method for deciding the best move.

Lexical Analyzer

UPDATED...

Graphical Representation of Tower of Hanoi

Grphically Represents how Tower of Hanoi actually works.

Lexical Analyzer

UPDATED...

Greedy Tour

Compute a greedy tour of a Euclidean graph, which is often used to initialize iterative optimization routines (e.g. 2-opt) for geometric traveling salesman problems.

Huffman coder/decoder

The Huffman coder/decoder is a set of classes classes with general C++ code. Currently, it can only be used on C "FILE" streams.

Hierarchy Species

ilustrate an hierarchy species...

HOW TO USE POINTER v1.00

This "file" will introduce pointer's to new programmer's...

Huffman Algorthm example

This code is a sample realization of Huffman algorithm. It includes code for algorithm itself and two sample programms, compressor and decompressor. It can be used for file compression/decompression, but max compression ratio of Huffman alg-m is only 8:1, which is much worse than for example WinZip

Hide a file in a bitmap's bits!

This app will take any file and bind itself into a Windows Bitmap (24 bit bitmaps preferred) This method is called "Steganography" This will also extract the file back out of it. And no, this isnt just tacking the file to the end of the file. It's actually alot more complicated than that. Oh yeah, and the bitmap wont change it's quality... good way to hide things from other people :)

huffman compression/decompression

demonstrates huffman compression/decompression

Huffman Coding

Compressing and Decompressing files with

HMathematica v 1.0.0.3

This is a mathematical library that I coded about two months ago. I think it's a powerfull tool for those who need real strong and fast algorithms for complex math computation.

Huffman Tree Encoder

Huffman Tree Encoder is an implementation of the HUffman algorithm.I wrote a simplified version of the Algorithm for this program. The Algorithm is also available with the program.The program can generate codes for the symbols entered as well as display the tree for them. An included illustrative example explains this process.View the included HTML file for Algorithm,Program and the Example.

Hash Table in C

A hash table that stores key/pointer pairs. The table can handle either numbers or strings as keys, you specify which type it is when you create it.

Huffman Trees for Data Compression

Data Compression is a one of the most renowned branches of the Computer Science. Over the years, a lot of research has been done in this field to compress data into numerous ways and many standards have been developed. Data Compression can be defined as reducing the amount of storage space required to store given amount of data. Data compression comes with lots of advantages, it saves storage space, bandwidth, cost and TIME required to transmit data from one place to another. In this article we will throw light on Huffman Coding for data compression.

Heap Sort

This code will sort an integer array using Heap Sort algorithm.

inverse

This is a step by step method to find the inverse of matrix of order 3.

Image file manupilation via recursion

The program takes an image file (ASCII) as input, displays it on the screen then asks for user to input the coordinates of point and a color to change the color of the image. Very neat example with sample image file included. A good demonstration of using recursive functions. Enjoy!

Introduction to classes in C plus plus

This tutorial will provide new comers to c++ a good understanding of class construction, important lines are commented!

ip2bin

This code will take a whole ip address

I hate AVL Tree

Implementation of AVL Tree which spent much of

Inheritance of CBox

Inheritance and Polymorphism Exercise

infix to postfix with list

infix expresion chang to postfix

Insertion Alogrithm for beginners in C

This code is a demostration of insertion of a Node in linked-list and printing the new list .

Kurscal PRoblem

find out the codes for kruscal's algorithm.

kural tabanl?

fuzzy

kruskal,prims,nqueens,graph coloring,singlesource shortest path,djikstras,etc

algorithms

khayyam triangle

you must run th program or see the code to find out what it is.It is a famous algorithm and very cool ...

K entry Node Search

Search for the minimum or maximum k-entry node in a weighted graph.

K means clustering

A simple C function for k-means clustering of data points in Euclidean space.

KNN Classifier Routine

A K Nearest Neighbours Classifier for the Vector Space Model

LANDo Code Encr

LANDo Code lets the user create his own code(own set of rules) for the letters of the alphabet and writes in a file("lando.ap") the encrypted text.For a future decryptor i added another file that keeps a letter by letter account of the code("landocode.ap")

Lexical Analyzer

UPDATED...

LOOP INVARIANT

Loop invariants are very important in algo desin and code verification. This document explains about the Loop invariants at a beginner-intermediate level, that is other than the basic definations, provides with some formal formulation too.

Lexical Analyzer for C Lang.

Hello Programmers!!

Linear and Binary search( Compare times)

Compares the time taken by the searches to search in an 8000 size array. can reuse the code in any program.

LZ data compression/decompression

Demonstrates LZ compression decompression

Linear Arryas merging

MERGE TWO LINEAR ARRAYS

Simple Reverse Polish Notation (Postfix) Calculator using STL

This program demonstrates using ADTs in the Standard Template Library (STL) to create an infix to postfix or Reverse Polish Notation (in honor of its developer Jan Lukasiewicz) calculator. This happened to be one of my first GUI programs developed in BC++ builder but it also includes a console project using the same functions in VC++. I've also tested the portability of the code in g++.

Lines Counter

Have you ever wanted to count the lines of your code in C or C++ without the commentaries and blank lines,well with this program you can do it.

Link List operations

I was looking for a link list code here on PSC for my sis and couldnt find anything good. So made one myself. Posting here to help people like my sis. Its a Turbo C code.

logical expressions evaluator

evaluates logical expressions using a binary expression tree. Interface is for 4 variables only, but library is for n variables.

Library 2

This is a global book search in a library database. This code is upgraded. The previous code is Library (in coding standars). This is (L 2) a very good global search algorithm.

LCS

A function that computes the longest common sub-sequence of two strings

Mandelbrot set using MPI/LAM and rendering using xlib

This program calculate Mandelbrot set on parallely using MPI/LAM.It also render the set using xlib.It required gcc compiler and MPI to run and to compile, you need xlib development files.

Mandelbrot set rendering using xlib

This programm calculate the famouse Mandelbrot set and render it using xlib.(Compiled version included: As any *nix based OS have X11 or X server this program will run on any *nix platform )

Make or delete con folder in windows

Make or remove a con folder

Multi Sort1

Merge Sort, Insertion Sort, Radix Sort, Heap Sort, Bucket Sort, Quick Sort and Counting Sort.

Multi Sort2

Bubble Sort, BiDirectional Bubble Sort, Bitonic Sort.

Multi Fibonacci

There are 3 Types of Fibonacci Calculations Implemented.

Main's arguments using File I/O

This example introduces beginners on using main's parameters argc and *argv[] using File I/O! Excellent for learning how to use main's parameters and learn file i/o at the same time!

MULTIPLY TWO MATRICES

/* PROGRAM TO COMPUTE PRODUCT OF TWO MATRICES */

Magic Squares algorithm using an apmatrix

Shows basic usage of the apmatrix class and one algorithm to complete a magic square.

maxminIMacros

More examples in the spirit of Fazle Arefin's "swap magic" written as inline macros. The examples calculate the maximum, the minimum or the value of the (i,j)'th entry of a

maxminIMagic

Some magical functions to calculate the maximum, and minimum, the values of a unit matrix in the spirit of Fazle Arefin's "magic swap".

magicSuare.cpp

to print odd magicSuare

Matrix Encryption Algorithm

Encrypts and decrypts data using two c++ programs and a batch program

MathHead Expression Parser

MathHead parses a simple mathematical expression, using order of operations, with a simple algorithm. BTW, rock the vote!

MP3 Calculator 1.1

By accepting entries for Bitrate, Sampling Rate, and Time Length, the calculator can estimate the filesize of MP3s and also the number of frames per file. All of the entries are in Menu form for easy use

Months to Years conversion

It converts any amount of months, even some in billions, to years. It even tells you how many years along with months if it doesn't convert equally. It also tells you the fraction of a year if the months are less than 12. I also included a Macintosh version, so both Windows and Macintosh people are happy. Enjoy!

mobile network simulator

In a mobile ad-hoc nerwork, there are several mobile stations with wirless transceivers with a limitted range of transmission. When two

Menu Driven Sorting and Searching Algorithms

Allows the user to test various sorting and searching algorithms

My Magic Squares

A couple of days ago, a guy named John Michael Tomakin wrote a program to create Magic Squares, you know, one of those old math games...Well, I downloaded his program and found it a little too complicated, so I told him that and made a simpler version of it, with a bonus, you can see 2 different algorithms: One that creates squares matching rows and columns and another that matches rows, columns and diagonals. I hope it is useful for somebody -> This is just a little code experiment, so don't need to vote for it...

many algo

[ 1] |> Bubble Sort

maya

general library graphics,strings,sockets,math,matrix,vectors,file

My Computer Graphic Algorithm 1

For a student who looking for Code example

matrixmath

does matrix add and mul of two user defined sqare matrices

Number of Paths

This program determines the number of ways of goint from grid 1x1 to nxn in a chess board style board containing nxn number of grids

neuron gates

Implemnts AND and OR gates using a neuron. Neuron is the basic unit of neural networks that are a active part of todays Artificial networks. This is simply the stucture of a simple neuron.

network algorithm

this code fild quctly wat betwean node

NFA to DFA Subset Algorithm

This 'C' code converts NFA (Non-deterministic finite Automation) to (DFA)Deterministic Finite Automation by Subset algorithm. NFA constructed from regular expression by Thomson's algorithm. (used to make Compiler or Interpreter). It is not complex code and shows Structs, Dynamic memory allocation, pointers and etc. (Compile it under C++ compiler)

netcmdx

it is a multithreaded version of netcmd

New, very fast and strong RNG (Random Number Generator) 32 bits

New RNG (Random Number Generator)

n ary Huffman Template Algorithm (Version 3.0)

Web page : http://alexvn.freeservers.com/s1/huffman_template_algorithm.html

Non Fibanocci Generator

This code generates and writes output to an external file of a non fibanocci series upto user entered value. Fun and easy for beginners too.

Numerical Analysis Techniques

This is numerical analysis code from one of my university assignments. It finds the roots of two different mathematical equations using the following methods: newton's method, the secant method, bisection method and the modified method of false position.

n points curve

This is bezier curve for n-points. The formula i have used here was developed by Mr. asif baig. You just click of various points on the screen and then press enter . The programm would draw a curve

N Queen Solutions

Graphical Animation to N-Queen Problem.

Numbers to words converter

This is a flawless program that converts your integer input to words >> Input:17848 Output: Seventeen Thousand Eight Hundred forty Eight, and the code has great comments

Number tree

Generates a number tree

Network Socket Programming

Name : Network Socket Programming in C/C++ on Unix

Calc Ivo

This code is a calculator pojected in C plataform using many funtions with best algorithms. Enjoy!

Artificial Intelligence Chatterbot Eliza v1.4

The implementation of the program has been improved, the repetitions made by the program

number triangle

shows atrianlge

Number System

Covert decimal to binary, octal, hexadecimal or binary, octal, hexadecimal to binary.

Nearest Neighbour Tour

Compute a nearest-neighbour tour of a weighted graph, which is often used to initialize iterative optimization routines for traveling salesman problems.

Neural Networks..

A basic back propagation algorithm written in C++. It is written using Classes hence can be extended to be used in your applications too...

Open Addressing Linear Hashing Scheme

This program implements the open addressing linear hashing scheme which allows to map (and store) values associated with a certain key into a table. If collisions occur, the algorithm looks for the next slot and so on until an empty one is found. The hash formula is: hash = (key + (N/3 + 1)*i) modulo N, where N is the table size.

Operators Overloading

Understand the operators overloading in c++

ODE Solver

Ode solver: Originally written to solve the Schr?dinger Equation this class is dynamic enough to solve almost any ode. See www.adampetrus.com for an example how to use the code

Overflow

Shows how to crash programs using the buffer overflow

Parallel Implementation Of Seives Algo With Improvements

It calculates prime numbers upto at least 10000000000 using a parallel imlementation of seives algo. The parallel implementation drastically reduces the calculation time.

pitagoras

implements the pitagoras numbers until max

Processor scheduling simulator

This programs is a simulator for processor scheduling.

Primes!

Find all prime values up to whatever number you specify! Can be very easily changed to Vanilla C code instead of c++.

Print the bigger and smaller of 3 integers

This code will print the larger and smaller of three integers (or numbers if you change the int to float) using nested if statements.

PRECONDITIONS & POSTCONDITIONS

This article will explain you the preconditions and postcondition and thence the condition approach in desgning your program . These also help in veryfying the integrity of your programs.

PostFix Calculator with Class Stack Implementation

Calculate the answer to a PostFix expression. Uses OOP to implement a stack to store the numbers and then remove the numbers off of the stack (class stack) Enjoy!

Simple Calculator Using Recursive Decent Parsing

This is almost the same as my Reverse Polish calculator submission but this time uses a different technique called recursive decent parsing. You can use this to make a comparison of the two methods. This program is at home in vc++, c++ builder, and g++.

piHex

Calculate hexidecimal values of pi digits

My Win32 App #9 Fibonacci Analysis

This program will calculate the nth Fibonacci number,

power of numbers

simple function to calculate the power of any number

prim's algorithm

to findout the minimum spanning tree.

Program Showing Histograms

This program randomly generates values and stores them in a 10 element array and thereafter prints the element and value within aswell as the histogram for the element value!.By re-running this program numerous times differentvalues will be automatically generated!

Postfix Calculator, Reverse Polish Notation

postfix calc

ParseDirectory

Recursive search through all sub directories from the root directory specified for files with specified extension. Use the function processfile(sFileName) as a hook for your parsing code.

pageReplacement Algorithm LRU.c

CPU Page Replacement algorithm Least Recently use(LRU). It uses how the pages are swap from Main memory to secondry memory.

PageReplacementAlgorithm LRU.c

In this Program I am showing how page frames are going to be handle in the RAM and Harddisk. And how pages are going to swap Harddisk to RAM. RAM have Less space than Harddisk but it is more faster than harddisk.

Prime

Checks if the entered number is a prime

paranthesis check

Basically chks the parantheis, chks whether all the open curly brackets r closed or not, if not then it prints out an invalid string message :)

PERT table simulation

Accept initial values from user and complete the PERT table

Primer

This console program is a relatively simple demonstration of an efficient way to see whether a number is a prime number or not.

Particle Atraction OpenGL

Particle atraction with OpelGL

poker

Cardgame consits of 52 card ,randomly shuffling and give five card to two poker. Determine each poker contain a pair , tow pairs , three kind (e.g three jacks ) or four kind (e.g four queens).And flush, straight , or straight flush

Prime Number Generator.

Generates prime numbers using Eratosthenes's algorithm. Total rewrite. This version adds command line options, is slightly faster, halves the memory footprint, and fixes an error where (25) was occasionally listed as a prime.

Permuter

This program displays all of the permutations of a string.

Reverse Stack Recursively

Reverse Stack recursively i.e., from LIFO to FIFO recursively.

RSA

RSA key generation, enjoy and remember me in your prayers

RPN Calculator

To calculate the postfix expressions

Rijndael Encryption Algorithm

The Rijndael Encryption algorithm has been recently recognized as an AES (Advanced Encryption Standard). It was recently (April 2001) released in Visual Basic. The source code here is for Micro$oft Visual C++ 6.0 for developing and testing. Have fun with it! More information can be found at: http://csrc.nist.gov/encryption/aes/rijndael/ --or at -- http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm (the second URL explains the specs and test vectors in C, etc.

RungeKutta02

This program uses the Runge-Kutta method to solve a second order differential equation and plot the results.

Reverse The digits without using functions

This program uses simple programming techniques

My Win32 App #9 Fibonacci Analysis

This program will calculate the nth Fibonacci number,

reverse of number

reverse of number

Root

VERRY VERRY FUN PROGRAM FOR WHOM LOVE MATH .This program is Root funtion with out using <math.h> only <stdio.h> and <stdlib.h>.

Reverses num. input

this program prompts the user to input any integer of any size desired

Shortest Path

if you want to find out the shortest path then please go for this code. it will really help you out & don't foget to vote for me. Thanks.

Simple Magic Square Generator in MFC

Generates Basic Magic Squares when Given a Sum.

Software Shaders

Software rendering algorithms, implements: point, wireframe, Lambert, Gouraud, Phong/Blinn Lighting models, texture mapping, tangent space Normal/Bump mapping, colored lighting, includes several meshes, textures, and normal maps, uses a proprietary mesh format, but will load wavefront.obj meshes as well..

Sudoku Easy/Medium Solver (not brute force).

A small project aiming to prove a theory that grids can be solved using only the "possible value" method, whereby the numbers are filled in according the condition that that position has only one possible value, in filling this in, possible values matching this number on the same x and y axis, and "block" are removed, thus allowing space for more single possible value positions. This cycle is repeated until the grid is complete.

Snake Ngonar D'Nguler the simple one

animation and queue implementations