3,815 Topics

Member Avatar for
Member Avatar for _Nemesis_

Hi guys, Brief Background: I'm currently working on a project in which I wish to create an autonomous game agent capable of traversing 3D environments. To do this I would like to implement a custom path finding algorithm that works with a navigation mesh. The Problem: I'm currently looking at …

Member Avatar for _Nemesis_
0
174
Member Avatar for doublebond

Hi Guys, I have an issue with my program. I am trying to implement bitonic sort parallel algorithm using MPI. The issue is like i am able to sort upto 1000000 array elements.. but, if i increase it to 10000000 or 100000000 the processors are not able to handle it. …

Member Avatar for giomal
0
1K
Member Avatar for geojia

Hi gurus, this is a homework assignment on finding all closest pairs. I used a quad tree for my algorithm and its running time is compared to the naive algorithm. (I didn't use the java quad tree because I didn't know it existed...) My problem right now is that after …

Member Avatar for rubberman
0
218
Member Avatar for sariberri

[CODE]import java.util.*; //You may assume that all Points are unique. public class PointSet { private ArrayList<Point> list; private Comparator<Point> compareMethod; //default constructor public PointSet(){ list = new ArrayList<Point>(); } //copy constructor for a point public PointSet(PointSet l){ list = new ArrayList<Point>(); for(Point p: l.list){ this.add(p); } } //randomly generating a …

Member Avatar for sariberri
0
909
Member Avatar for ladybro

Thanks for taking the time to open this. I am just starting to learn Java and cannot seem to get past a point in the program I'm currently working on. I'm making a credit card verifier, where you enter the numbers and an algorithm deems it valid or invalid. I …

Member Avatar for stultuske
0
155
Member Avatar for igotaquestion

How to implement a DHT in Java? Basically I need to know how to implement a lookup algorithm for DHT. The idea is to grasp java RMI and lookup algorithm of DHT.

Member Avatar for dantinkakkar
0
159
Member Avatar for polarpandabear

Hello Guys, I'm new here and I would like to ask help from you in making circular queue. I'm solving these for days but I can't have any idea anymore to solve for it's algorithm... I made this code so far... [CODE]#include <iostream> #define SIZE 5 using namespace std; int …

Member Avatar for polarpandabear
0
421
Member Avatar for ogglock

Hi, I am relatively new to C++ and I am having problems sorting a set of items here is my code: [CODE] #include<iostream> #include<sstream> #include<string> #include<iomanip> #include<fstream> #include<vector> #include<string> #include<cstring> #include<set> #include<algorithm> using namespace std; struct SimpsonChars { string firstname,lastname; double firstnum,secondnum,thirdnum,fourthnum,fifthnum; SimpsonChars(const string& lname = "", const string& fname …

Member Avatar for ogglock
0
154
Member Avatar for danielbala

Hi.. I want to implement a program for identifying spam emails using an algorithm naive bayes in php.. How to implement this..can anyone help me.. Thx in Advance

Member Avatar for danielbala
0
82
Member Avatar for inspire_all

i recently read that quick sort is most popular algorithm.it has a good efficiency but its not stable.can anyone plz explain me quicksort algorithm in short.i am not able to get it:?:

Member Avatar for inspire_all
0
159
Member Avatar for The_Purple_Mask

I am using a priority_queue-s for implementing A* and Dijkstra's algorithm. Is there a point writing my own heap for time optimization? How faster would it be? I read in wikipedia that Fibonacci heap will be the best. Do you agree?

Member Avatar for mike_2000_17
0
269
Member Avatar for phorce

Hello :) (Too many questions about this)! Basically, I'm trying to display the contents of a matrix without using "cout" in my class. (It's a bad method) I've tried to return an array, but, that failed miserably.. So I've got a method in my class: [code] double Matrix::read(int theRow, int …

Member Avatar for ravenous
0
118
Member Avatar for phorce

Hello.. I'm doing a project that involves searching/matching 2 matrix's. The basic idea: Matrix 1: 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 Which will then be interpreted in memory as: 0 1 0 1 0 1 0 1 0 1 1 1 …

Member Avatar for mrnutty
0
107
Member Avatar for HEMAMBUJAVALLY

Hi everyone, i need some tutorial to implement BLS (Boneh-Lynn-Shacham) signature algorithm to create private key and public key to encrypt a message. Can anyone please help me? I need tutorial to implement this in VB.NET. Thanks in advance. Regards, V. Hemambujavally, B.Tech

Member Avatar for tungnk1993
0
79
Member Avatar for perryleros

Hello everyone, Im developing an application in C# for a school project that encrypts data in text form using a password and vice versa, and i' d need some help with something. The program encrypts fine taking as input 1)the data (reading it from textbox) and 2)the password, and stores …

Member Avatar for overcanyon
0
4K
Member Avatar for picogenkaku

In simulating round-robin scheduling algorithm, is it possible to have more than one time slice, say two time slices. If so, how will it be simulated? For example, I have Q1 = 10 milliseconds and Q2 = 20 milliseconds. In my opinion, it is like this: a) I'll use the …

0
77
Member Avatar for tahsin.rahit

This code is giving me runtime error. Here, first I want to take a integer input which determine the number (n) of nodes in the graph. Then for n-1 time I want take two integer input which will give the adjacency information. [CODE] #include <set> #include <map> #include <list> #include …

Member Avatar for mike_2000_17
0
252
Member Avatar for vuquanghoang

My teacher has just teach me about complexity of algorithm and he has gave me some homework. I have solve almost all except for this ex: Consider a robot arm that is fixed at one end. The arm contains two elbows at each of which it is possible to rotate …

Member Avatar for tungnk1993
0
157
Member Avatar for Joey_Brown

Hello; What would be the most efficient way to get all of the 2^24 network identifiers for the given A class IP address. I am aware it is a very stupid question, and a inpractical one for that matter but thank you for any input. Im trying to speed up …

Member Avatar for Joey_Brown
0
140
Member Avatar for The_Purple_Mask

I've tried for some time to make the following code run properly. The problem is in the comparison function of sort(comp). It compares 2 doubles but in some cases it causes the program to crash with the message "Debug Assertion failed! Program: retrace.exe File:c:program files (x86)\microsoft visual studio 10.0\vc\include\algorithm Expression:Invalid …

Member Avatar for Fortran IV
0
207
Member Avatar for hystaspes

I'm studying Sipser's book [B]Introduction to the Theory of Computation[/B]. In [B]Time Complexity[/B] chapter the following NTM is given as a solution to HAMPATH problem (Hamiltonian Path [URL="http://en.wikipedia.org/wiki/Hamiltonian_path"]http://en.wikipedia.org/wiki/Hamiltonian_path[/URL]): -------- N = On input <G,s,t> where G is a directed graph with nodes [B]s[/B] (starting node) and [B]t[/B] (destination node): 1. …

0
84
Member Avatar for shaker naser

Type an algorithm to solve the following problem: You want to read the different ages of a group of people until an age of negative is entered. Based on the ages entered, you should count and print how many of the people are old (above 65), how many are middle-aged …

Member Avatar for deceptikon
0
67
Member Avatar for daniel1977

I am wondering if the algorithm is correct that it shows for the insertAt(int, const elemType&) function for an array-based list: template <class elemType> void arrayListType<elemType>::insertAt (int location, const elemType& insertItem) { if (location < 0 || location >= maxSize) cerr << "The position of the item to be inserted …

Member Avatar for ChrisPadgham
0
139
Member Avatar for vegaseat

The code shows a fast prime number generator using a sieve algorithm. It looks at only odd numbers. Technically 1 and 2 are prime numbers too, since they are only divisible by unity and themselves, exceptions are made for 1 and 2. Zero and negative numbers return an empty list. …

Member Avatar for Mavericks
1
3K
Member Avatar for ubi_ct83

Hi all, i have a task which is create an algorithm from a java code.and i need help from u guys to check on my algo put a comment on what should i change or why it is wrong. I really appreciate if u could help me on this matter... …

Member Avatar for ubi_ct83
0
156
Member Avatar for jdh1231

I have a problem to solve, and I came so close with algorithm, but I am having hard time organizing them so they work. I will post the question and the codes I have. Can someone help me organizing them? The program is expected to read input information from a …

Member Avatar for thines01
0
170
Member Avatar for student_learner

i am trying to make an application which would predict the value of investments such as shares based on the past values, and help the user to choose the better option. want some suggestions on the [B]fuzzy algorithms[/B] that i can use in my project. it would be a form …

Member Avatar for skatamatic
0
369
Member Avatar for student_learner

i am trying to make an application which would predict the value of investments such as shares based on the past values, and help the user to choose the better option. want some suggestions on the fuzzy algorithms that i can use in my project. it would be a form …

Member Avatar for mrnutty
0
67
Member Avatar for Cupidvogel

Hi, a program requires one to enter a given number of strings, and for each string, the program has to output the number of permutations possible. We all know that if a string S of length l has a type of one letter, b type of another, c type of …

0
80
Member Avatar for boris90

Hi! I've been having this problem recently: I wrote this code which, practically, reads lines of text from a text file (e.g. Microsoft Notepad file) and stores them into a vector. Each line has three parts: the product code, the product amount and the product name. The user is offered, …

Member Avatar for boris90
0
546
Member Avatar for kartik1997

Please help!!! What would be the algorithm form of the following program:- [code]import java.util.*; public class quizcontest { Scanner sc=new Scanner(System.in); String name; int ans1,ans2,ans3,ans4,ans5; //declaring variable// void acceptname() {System.out.println("****************************"); System.out.println("|||||-----Please Enter Your Name-----|||||"); name=sc.next(); System.out.println("****************************"); System.out.println("+++++Best Of Luck ! "+name+" +++++"); } void sports() { System.out.println("Here Starts Our Quiz …

Member Avatar for stultuske
0
143
Member Avatar for xavier666

I've tried to make a [URL="http://en.wikipedia.org/wiki/Deque"]DEQUE[/URL] program. My book on data structures (Seymour Lipschutz) doesn't have an algorithm on DEQUES. Neither does [URL="http://www.itl.nist.gov/div897/sqg/dads/HTML/deque.html"]DADS[/URL] give a good description. All I heard was that it could be implemented better with two lists (one forward and one backward) & there are 2 types …

Member Avatar for WaltP
0
262
Member Avatar for collin_ola

Hi, I seem to be having a problem with displaying data in a second form. I've created a linear search algorithm which works just fine - it locates the records from the database. I now want to be able to display the record in another form, I've attempted this using …

Member Avatar for collin_ola
0
265
Member Avatar for npsgaming

I have put together some code for a homework assignment and I have almost got it working. There are a few key items that are missing or not fully functional and I am fresh out of ideas on how to attack it. The code is to take 9 digits/integers from …

Member Avatar for deceptikon
0
204
Member Avatar for Tiffany216

Assignment 2-a: Program 1: You are given the task of determining the download speed of an Internet connection. You decide to use two files whose size is known (in Kilobytes-KB). You will download the two different files, and record the time it takes to download each one. You will determine …

Member Avatar for DeanMSands3
0
124
Member Avatar for Evenmu

Hey I am a student and i am new on the algorithm subject. I have been given a compulsory assignment that is to set up a program that have Liked list with Nodes. The problem is that i dont understand how to do this: - remove the first node - …

Member Avatar for DavidKroukamp
0
99
Member Avatar for Jay22

Hi, This my first time asking for help for my C++ programming class but recently my teacher gave us an assignment that got me so confused. I don't understand what to do. My assignment is due Wed, Feb 8, 2012 and my C++ programming book is expected to arrive Friday. …

Member Avatar for Jay22
0
98
Member Avatar for MasterGberry

Title may be a bit off, but I am having issues trying to form this last function. I created a simple sorting algorithm for a list of ints I have for a project, now the ints are from the min to max. I know the size and have a pointer …

Member Avatar for mrnutty
0
199
Member Avatar for ddm

Write a program to accomplish the following tasks: 1. Generate arbitrary number of random integer numbers between [0-100] 2. Save or load the numbers from/to a text file based on user option 3. Search the generated list for an arbitrary number entered by a user 4. Use Linear and Binary …

Member Avatar for WaltP
0
698
Member Avatar for neo09

Hi All, As we all know that google do update algorithm time to time so can anyone do let me know if somebody have got through with any update regarding inbound and outbound links for website...

Member Avatar for seema123
0
110
Member Avatar for ruval002

So i have implemented the following link list, but i just want to know if i can sort the link list. any help? [CODE] #include<iostream> #include"ll.h" using namespace std; // PURPOSE: contructor which initializes front and rear to NULL and count // to 0 LL::LL() { front = NULL; rear …

Member Avatar for Kanoisa
0
276
Member Avatar for jaskij

This here is a code of my recent uni assignment to render Mandelbrot, Julia and Burning Ship sets, using SDL. The code works properly, using MS Visual Studio 2010 Premium, but displays some errors (either numerical or type casting differences, I couldn't find them) after porting to Linux and compiling …

Member Avatar for jaskij
1
182
Member Avatar for Karlwakim

Hi everybody, How can i find out if a number is prime or not ? For example : [CODE]#include <iostream> using namespace std; int main () { int number; bool isprime; cin >> number; /*algorithm .............. .............. .............. */ if (isprime == false) { cout << "Not prime"; } else …

Member Avatar for jaskij
0
253
Member Avatar for ddm

Write a program to accomplish the following tasks: 1. Generate arbitrary number of random integer numbers between [0-100] 2. Save or load the numbers from/to a text file based on user option 3. Search the generated list for an arbitrary number entered by a user 4. Use Linear and Binary …

Member Avatar for ddm
0
219
Member Avatar for Webmastergrace
Member Avatar for Commonman4012

Hello World! I am having trouble with a linear search algorithm function that I have to write for a program. The direction for this function states: A linear search algorithm, where x is the searched item in vector v. It simply starts searching for x from the beginning of the …

Member Avatar for ravenous
0
202
Member Avatar for ztdep

[CODE]#ifndef PARTICLE_H #define PARTICLE_H #include<vector> #include<iostream> using namespace std; class Particle { protected: public: Particle(); Particle(const int aDim); int dimension; vector<double> velocity; vector<double> position; vector<double> pBest; double pBestFitness; double fitness; bool valid; bool operator<(const Particle& aP2) const; ~Particle(void); }; #endif[/CODE] [CODE]#define SWARM_H #include"Particle.h" #include<vector> #include <Algorithm> #include<iostream> #include<stdexcept> using namespace …

Member Avatar for jaskij
0
98
Member Avatar for Despairy

Hi, we were asked to build a 2d complex maze using c++ and sfml. the game includes: a king that needs to reach his castle a warrior that kills orcs and they drop money a thief that collects the money to open gates and more characters. so far no problem. …

Member Avatar for Despairy
0
306
Member Avatar for laklaker

I created a game a random guessing game ( for school project ) . I just want to ask on how to put a hall of fame? Like when you played the game then its end it will be putted his/her name then it will be saved. Then it will …

Member Avatar for DavidKroukamp
0
199
Member Avatar for mechstough

I am programming for a genetic algorithm. there is a class named Chromosome. populationsize=1000; Chromosome chromosomelist[populationsize]; when I am using this array of objects chromosomelist to initialize some other object Chromosome parent1 = chromosomelist[p1]; I am getting access violation error for p1 greater than 20 upto 999, while it is …

Member Avatar for ravenous
0
170

The End.