3,815 Topics
![]() | |
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 … | |
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. … | |
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 … | |
[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 … | |
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 … | |
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. | |
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 … | |
![]() | 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 … ![]() |
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 | |
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:?: | |
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? | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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. … | |
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... … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 - … | |
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. … | |
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 … | |
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 … | |
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... | |
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 … | |
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 … | |
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 … | |
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 … | |
Do you know Google recently update - "Page Layout Algorithm"? | |
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 … | |
[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 … | |
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. … | |
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 … | |
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 … |
The End.