bankers algorithm implementation in c++

  • Apriori Algorithm in C code

    Can anyone send me the Apriori Algorithm implementation in C and a dataset so that I can able execute and learn. Your help is greately appreciated.

  • banker's algorithm implementation

    we are given the assignment to implement the banker's algorithm in c. this implementation must run in the linux terminal and program must be utilized the os in the time of execution. this means that it must capable on real-time execution with the os. i really don't have any idea how to do this. aside from that i am not that proficient in c, i'm more into java. can someone help me with this. any help would much appreciated.

  • REQUEST: Probnorm Proxy Algorithm in C

    Hi, does anybody have an algorithm in C that approximates the probnorm functions that one finds in SAS, for example. I'd hate to build the table from scratch.Probnorm function is the P(X <= x) where X ~ N(mu,sigma^2) So, Probnorm(1.96) = 0.9750 and so forth.Moderator edit: No requests for assistance via email, please - Catweazle

  • Huffman Algorithm In C.

    I Am Working On A Project Related To Data Compression Using Huffmann Algorithm In C Language..........i Have Generated The Huffmann Codes Using Huffmann Tree.........but The Project Is Yet To Be Completed As I Don`t Know How To Store The Codes In Bits.............i Have Just Learned C.We Have To Submit The Project By 28 Th Feb............so Expecting A Quick Response...............

  • Oracle ROUNDing number according to Bankers algorithm

    I need an oracle function which performs Bankers algorithm to round number value. ROUND() function in Oracle performs rounding of 0.5 to 1 and 1.5 to 2 which results in adding extra 0.5 value each time it is used. In the Bankers algorithm 0.5 will round to 0 and 1.5 will round to 2 which balances the effect when the two rounded values are added.

  • c4.5 algorithm in c for linux

    my question is : i want to implement a C4.5 decision tree algorithm in c for the linux platform. i am using fedora 8. i get this source code for c4.5 written by J.R. Quinlan. www2.cs.uregina.ca/~dbd/cs831/notes/ml/dtrees/c4.5/tutorial.html]Machine Learning/Decision Trees/C4.5 Tutorial . but it is written for Berkeley BSD4.3 and it is for Unix platform. and i am unable to compile it.what i want is :: is there any one who has the linux version of this source code or can anyone make it compatible and give for me. ????????????any suggestion/help is important.!!!!!!!!!thanks for u r helpmy email ad

  • Ant Based Clustering algorithm in C Coding

    friends did anybody have implemented the ant based clustering algorithm in C.If so can u pls pass me on the coding.It would of great help to me.

  • Algorithm to C++

    could someone please help me with getting these 2 bits of algorithm into C++ code. Thanks in advance:for (x= 1:256)for(y=1:255)if (f(x,y) is even )do nothingelsef(x,y)= f(x,y)-1endAnd:for (x= 1:256) for(y=1:255)if (m(x,y) is one )f(x,y)= f(x,y)+1elsedo nothingend

  • polygon algorithm in c++

    Does anyone know which is the polygon filling algorithm in c++?It can be done with this code, but what i want is which is the algorithm that is behind this ready made function glBegin( GL_POLYGON ) of open gl.#include <iostream>#include <cmath>#include <windows.h>#include <gl/Gl.h>#include <gl/Glu.h>#include <gl/glut.h>#include <cmath>using std::cout;using std::cin;int x[4], y[4];void drawPolygon( int n, int *x, int *y ) {int i;glBegin( GL_POLYGON ); for (i = 0; i < n; i++ ) {glVertex2i( x[i], y[i] );}glEnd( );}//------------------------------------

  • Oracle Hiding Sensitive Association Rule for Sanitization algorithm implementation

    I am doing my research in the area of Data Mining and my problem is hiding industrial information using Hiding Sensitive Association Rule. If anybody having Sanitization process and algorithm implementation using Java. If anybody having relate materials, algorithms implementation, documentation and related web address. Please send to my mail id: [email protected] RegardKannanMessage was edited by: user591845

  • Looking for AES algorithm implementation

    I am looking for AES algorithm implementation which is not dependent on JCE library. I prefer a single AES algorithm implementation which is not dependent on any additional classes/libraries. It is better shipped with some related "how to use" documents and samples dealing with how to invoke this AES algorithm form a client application.Can anyone help?Best

  • C++ Maze Generation Algorithm Implementation Help

    I am attempting to create a simple console maze generator in C++ for a school project. I've already gotten most of it down but I'm having a problem debugging the actual generation algorithm I've implemented. I've been learning C++ for the past few months now but I haven't ventured into the STL very much. The problem may be I am doing something illegal with the vector but I can't see it.Here is the code thus far:// *************************************// ** M A Z E C O O R D C L A S S **// *************************************#include <iostream>enum COORDTYPE { FLOOR, WALL, BORDER };class

  • Huffman algorithm implementation in C

    friends!! I am very new to this type of groups, and this is my first post to this group, before asking u all a help I am just posting this code to u all, , please respond for this code Huffman algorithm is one used for image compression and it is also called as variable length coding, after all u had seen this code, if u have any problems please send me a message. My code takes a message file(example file is attached with this post as text file) and gives the output.

  • Drawing a Demi-Death Star: Questions About Bresenham's Line Algorithm in C++

    Greetings! My task is to impement Bresenham's line algorithm by mapping floats to integers, but be able to draw lines of any slope, including horizontal (zero slope) and vertical (infinite slope) lines. (The near-bottom of the page has an integer-only version of this.) My implementation of the linked pseudocode works partially and I'm almost certain the problem is in my mapping or/and rasterization function(s).The line begins at x0,y0 and ends at x1,y1. The command line reads in a square image resolution like 999 for 999x999 pixels ABS (absolute value), MAX, and MIN are defined elsewhere in my

  • Data Mining Algorithm Implementation

    if any one here could help me regarding the data mining algorithms. I am looking for a C/C++ or VC++ implementation of the Clustering K-Mean Algorithm. if any one could guide me how to go about it or send me a code, i'd be grateful.

  • Peter Kovesi edge linking algorithm in c++ code

    I implement in c++ programming.I want to have Peter Kovesi edge linking algorithmhelp me please.sent code to me please TT.Thank youemail :: [email protected]

  • Drawing fractal algorithm LEVY C CURVE

    I have to create algorithm, which draws recursive Levy C Curve. Please if someone has already done, help me.

  • Algorithm Implementation

    I need someone in implementation of algorithm in java in project with regards to cryptography.Will prefer someone who understand algorithm and cryptopgraphy system well.please contact me at [email protected] to discuss about the price.

  • Translate an algorithm to C program

    my problem is that i have written an algorihtm to convert non deterministic finite automata to deterministic finite automata but i couldn't translate it to C program and this is the algorithm i have written qx is a state in the NFA and q0 is its start state QX is a state in the DFA and Q0 is its start state The eqsilon-closure of a DFA state consists of all the states in the NFA that we can get to with epsilon moves from the states in the DFA state. Q0 = { q0 }// but there are some states we can reach from q0 at no cost Q0 = epsilon-closure(Q0)while there are states we haven't processedpick on

  • algorithm implementation problem

    basically i need an algorithm that will count the frequency of each date stored in a database. The database is storing votes and they want to see number of votes per day.i come from a java background and havent touched that in a year and i think im getting confused..the pseudo code:1. get all dates from db,2. put into array3. get first date4. while there are more of that date in array, counter ++5. print date and counter6. remove that date from array7. go to part 3i think this will work, but im stuck on the implementation. can anyone point me to any tutorials or code that will help?

  • Simulate SJF Algorithm Using C++

    Good day !I am a university student currently and I was assigned a project that ask me to simulate a SJF (shortest job first) algorithm of Operating System using C++. To show this, I need to use 3 methods :-i) keyboard inputii) sortingiii) outputAnyone got any idea how to do this ? I already got idea on how to show the algorithm on part 2 that is using Sorting.How about Keyboard input and output?

  • convolution algorithm in C++?

    I need an algorithm to convole 2 vectors of floats. Here is an example (with ints) of input and ouput:vector1 = [2 3 4]vector2 = [1 1 2]To convole these, you first need to invert the 2nd vector and then multiply elements together:234211 = 2234211 = 5234211 = 11234211 = 10234211 = 8So the output vector is [2 5 11 10 8]Can anyone give me a C++ algorithm that takes 2 vector<float> and performs this operation on them?

  • help with rc5 algorithm implementation

    need help in execution of rc5 algorithm.here is the code i wrote so far.please make the required changes in this code..import javax.swing.*;import java.util.io.*;public class Rc5{private int[] s;private int[] l;private int b, u, t, c;private byte[] key;private int rounds;public Rc5(){String str = "georgebatres";key = GetKeyFromString(str);rounds = 16;b = (int)key.length;u = 4;t = (int)(34);c = 12 / u;s = new int[34];l = new int[12];GenerateKey(key, rounds);}public Rc5(String password, int round){key = GetKeyFromString(password);rounds = round;b = (int)key.length;u = 4;t = (int)(2 * r

  • binary search algorithm implementation causes stackoverflow error

    I am trying to learn how to write recursive functions. Here, I tried to create a recursive implementation of binary search algorithm. The algorithm works fine but when the number of elements to search is increased(say 35 elements) a stackoverflowerror exception is raised. here is the code.package algorithms;public class BinarySearch {int len;int[] inputs;int search_element;int elementfoundatindex;public void setInputs(int[] ip){len = ip.length;inputs = new int[len];inputs = ip;}public void setSearch_element(int se){search_element = se;}public int BinarySearchAlgorithm(int prev_index){if(search

  • How to write this algorithm in C++?

    I'm kind of stumped as to how to write this in C++, seeing as I need some way of making the out of range array references = 0.Source, filter and output arrays:S [7] = { 1,2,3,4,5,6,7 };Filter [3] = { a0,a1,a2 };out [x];out[0] = a0.V[0] + a1.V[X]+ a2.V[X]out[1] = a0.V[1] + a1.V[0] + a2.V[X]out[2] = a0.V[2] + a1.V[1] + a2.V[0]out[3] = a0.V[3] + a1.V[2] + a2.V[1]out[4] = a0.V[4] + a1.V[3] + a2.V[2]out[5] = a0.V[5] + a1.V[4] + a2.V[3]out[6] = a0.V[6] + a1.V[5] + a2.V[4]out[7] = a0.V[X] + a1.V[6] + a2.V[5]out[8] = a0.V[X] + a1.V[X] + a2.V[6]The only way I can see to do it would be to include an 'if

  • coding for cpu scheduling algorithm using C

    can anyone give a code for cpu scheduling algorithm for FCFS, SRTF and PRIORITY please it to my <snip email> tnx..

  • Need help to do an algorithm in C++

    So I need help to do a work for school which consists of doing an algorithm that allows you to draw a pyramid of letters. The algorithm should ask the user to input one letter and then drew the pyramid.Example: If the letter that the user input is 'd' or 'D', the result should be the following:DDCDDCBCDDCBABCDorIf the letter that the user input is 'f' or 'F', the result should be the following:FFEFFEDEFFEDCDEFFEDCBCDEFFEDCBABCDEF____If some one can do this please post the code, I'd be trully grateful.

  • Algorithm in C++

    Considering the given code as an algorithm calculate the time complexity of this code.#include<iostream>#include<stdlib.h>using namespace std;int main(){int i, j, n;for(i=0;i<n; i++){for(j=0; j<n; j++){cout<<"my time complexity is = "<<i*j<<endl;}cout<<"complexity is increasing"<<j<<endl;}system("pause");return 0;}

  • Dijkstra’s algorithm in c#

    I have a task witch need to be done by Dijkstra’s algorithm, but I didn’t have opportunity to learn it.Anybody knows any a good online tutorial in this subject

  • Banker's Algorithm in C

    hii want to get it's implementation as soon as possible.i will be thankful for your help.

  • New Sorting Algorithm Implementation

    Please help with this new sorting algorithm. I implement it on VB but i cant get a correct output. It's a new sorting algorithm and the pseudocode was provided. Here are the informations about it.Here are the steps:1. In a single pass on the array, the algorithm finds max, min, Number Of Positive (NOP) elements, and Number Of Negative (NON) elements.2. If min equals max then the array is already sorted, go to step 6, otherwise, go to step 3.3. Checks the values NOP and NON to create theadditional arrays:a. If NOP is greater than zero then creates a newarray (PosArray) of size (max+1).b. If NON

  • Compression Algorithm in c++......HELP

    i want to compress data in c++.eg; aaabbccccthen the program shut outpu:a3b2c4PLZ HELPthis is a very important assignment

  • New Sorting Algorithm Implementation

    Please help with this new sorting algorithm. I implement it on VB but i cant get a correct output. It's a new sorting algorithm and the pseudocode was provided. Here are the informations about it.Here are the steps:1. In a single pass on the array, the algorithm finds max, min, Number Of Positive (NOP) elements, and Number Of Negative (NON) elements.2. If min equals max then the array is already sorted, go to step 6, otherwise, go to step 3.3. Checks the values NOP and NON to create theadditional arrays:a. If NOP is greater than zero then creates a newarray (PosArray) of size (max+1).b. If NON

  • simple ATM algorithm using c

    may anyone help me with a code in c for the mechanism of using an atm machine, conditions1.acc balance starts at zero2.do not use global variables3.loop the main menu after every transaction until user presses exit4.after every transaction user returns to the main menu.menu a. depositb. withdrawc. balance inquiryd. fast cash - a-100b-200c-500d-1000and exit

  • Algorithm and C++, evenly distributing data

    I am trying to make a C++ application that takes information from a text file (mainly a csv file from excel), performs some basic math, then sorts the data, puts it into a list, to a a text file again.What I am having problems with is the sorting the data into a list.The detail; the text file contains information on sound files such as their title, duration (in seconds), minium total time to be played (in minutes).So they text file looks like:Sound1, 120, 10Sound2, 30, 6Sound3, 60, 20And so on...Take 'Sound1' for example, the length of each sample is 120 seconds and the minimum time to be play

  • FFT Algorithm Variation C++

    to all, as you all know FFT algorithm has many variation in terms from its pruposes.My requirement of FFT is integer multiplication and polynomial evaluation.I looking for good reference about the topic.If you have any, please post it here.

  • Diagram Implementation C#

    dear C# programmers,I have to create a school project.The project will be written in C#. I need to read a text file that containscode in 'C language', and create a Diagram based on the code from the text file.Basically it should create some sort of tree of 'C commands', so than, I will be able to draw a flow diagram based on that tree using .Net GDI.I really need some help on how to implement this,or if anyone have any ideas for this "insane" project, please I really needyour help.Sincerely,sunny542

  • how to encrypt Video file with AES algorithm? in c#

    Any ideas for video file encryption using AES (symmetric) ????????????I seen only data file encryption. I wanna encrypt video file and decrypt as well .....Who wants to help such a new beginner ???????/PLssssssssssssssss

  • hi guys i try to find parallel floyd/warshall algorithm in C

    anyone knows where i can find this?sorry for my english

  • Ubuntu I need some tips for this algorithm in C

    First, I will read an "unsigned int" from stdin, which I will here call X.Then, I need to get a way of storing X elements of type "unsigned int", what's the best way to do it? I thought about simply creating a vector of usigned int's (as "unsigned int name [X]"), but would that work any good? 1)Now, I read X values and store them in the place I've just said, but then I have to read another "unsigned int", which I will here call Y.Finally, I have to output the largest amount of numbers separated by Y. For example, {1, 2, 2, 3, 4, 5 , 6 , 7} with Y == 3 wo

  • C++ code for Kruskal Algorithm

    Sir,I wanted to know the implementation code for krushkal algorithm in C++.Anyone can help me to give the code.ThnQ

  • Ubuntu Buggy A* Artificial Intelligence C++ Implementation

    Greetings,I am trying to implement the A* path finding algorithm in C++ as a template for an abstract base class. A user derives from an AStarBase template and implements pure virtual overrides to enable context specific heuristics (e.g. h(x)).For my driver, I am using OpenGL / Freeglut to render the path and use the algorithm in a spatial sense. The green and red spheres represent the start and end goal locations respectively. The raised blocks represent obstacles the agent cannot pass through. The agent can move up, down, left, right, and diagonal - when block obstructions permit.The algorit

  • Ubuntu [C] Euclidean Algorithm calc (critiques, please!)

    I've now written a very simple Euclidean Algorithm calc in C (of course not using the Math Library's gcd()!!) and would like to know if there's something to correct, improve or whatever... Surely the use of buffers can be changed to something more efficient; for some reason, I feel I'm still working as I did in BASIC.Hopefully I can "upgrade" this to an Extended Euclidean Algorithm calc soon!(Ehmm.. yes, I gave up with the RSA program I wanted to code. I must go step-by-step and learn the basics first!)Thanks!/*Euclidean Algorithm implementation in C*/#include <stdio.h>#include

  • Question on implementation on CRC (Cyclic Redundancy Code) algorithm.

    Can somebody help me with the CRC (Cyclic Redundancy Code) algorithm implementation given below:There is a three byte packet header. <--------1st byte-----><--------2nd byte-----><--------3rd byte------------->---------------------------------------------------------------------------------------------| 8bits | 8bits | 3 bits| 5 bits (CRC ) | ---------------------------------------------------------------------------------------------for example: 0D 0B 40 ---> Input Data stream ( 19 bits)04 ---> CRC ( 5bits)Now combining 0D 0B 44 ----> Data stream after CRC (24 bits)

  • Urgent help on parsing algorithm written in c++

    I have written this parsing algorithm in c++ and compiled in visual studio.On runtime after giving the value it gives an assertion error.The logic is correct bcuz ive dry runned it but i think there's a problem with memory allocation.I need urgent help.Please.// sas.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include<iostream>#include<stdlib.h>#include<string.h>using namespace std;const int LEN=80;const int MAX=40;//////////////////////////////////////////////////////////////////////////////class Type{public:virtual float getnumbe

  • Algorithm to get data from access database to tree view in C #

    I have an access database from which i have to retrieve data from access database into c# showing tree view in my application. here is what i want to do. I have this access database with the following tables.categoryid | Category Name | Parent Category ===============================================1000 Food 996996 contemporary 13995 Anything 1313 Glassware 50693This is just an example so now when the tree is displayed it should be like thisGlassware (13)||-> Contemporary (996)||-> Food (1000)-> Anything (995)Like this there are numerous parent and child categories. I am trying to fin

  • memory issues with C++ algorithm in Windows

    I am not sure if this is the place to ask.I develop an algorithm in C++ under Windows XP with Visual studio 2008,the algorithm is proved to be linear ( O(n) ),there is a usage of memory during the algorithm ( all of it is being allocated dynamically before the algorithm starts )and I measure the time it took to complete the computation and I observed the following -1. using 4 MB of memory take X time of running.2. using 40 MB of memory, only 4 MB is used, but it is scattered through all of the 40 MB,( e.g. I mean that I can use any part of the 40 MB allocated, but guaranteed to use only 4 MB )

  • solving max flow by push relabel using C++

    I am interested in implementing the push relabel max flow algorithm in C++. I see an implementation at http://www.boost.org/doc/libs/1_40_0..._max_flow.htmland don;t understand a good bit of it. I am in a position to describe my graph and if someone could explain how I can use this piece of code, I'd be grateful.

  • A* path finding algorithm

    i,m trying to use A* algorithm to do my task;this is the code////////////////////////////////////////////////////////////////////////////////////////////////////////////////// STL A* Search implementation// (C)2001 Justin Heyes-Jones//// Finding a path on a simple grid maze// This shows how to do shortest path finding using A*////////////////////////////////////////////////////////////////////////////////////////////////////////////////#include "stlastar.h" // See header for copyright and usage information#include <iostream>#include <math.h>#define DEBUG_LISTS 0#define DE

  • Reed Solomon - Algorithm

    I have to write a program which shows Reed Solomon Algorithm implementation.I'm looking for some information about it , maybe some examples in C++.I have something like this : http://www14.in.tum.de/lehre/1999WS/ds/slides/ReedSolomon.htmlbut I don't know how can I transalte it into C++.Please hlep me , it's very important for me !