3,815 Topics

Member Avatar for
Member Avatar for simonsayz27

This is starting to drive me nuts. I'm writing a program that simulates a two-pass algorithm which translates assembly language code in C++. I started with the first pass which reads the labels and address for each line. My whole program is in a mess and need a lot of …

0
54
Member Avatar for lordofdarkness

hi everyone. i need to find all possible paths for directed graph with dynamic programming. let me clarify. i have a path from 1 to n and this is a straight line. every line has a value. i need a way where the cost is smallest. i take inputs as …

Member Avatar for gusano79
0
113
Member Avatar for bottledwater

hi all! i have been programming in C for about 4 months now, and i have the very basics down pretty well (functions, pointers, etc etc), and have been doing a lot of console apps, and i was hoping to do a fractals program. i have the algorithm down (at …

Member Avatar for Ancient Dragon
0
162
Member Avatar for sathya8819

Hi, I am trying to implement the K Means Clustering Algorithm for Image Segmentation. The logic behind K Means is : 1. Place K points into the space represented by the objects that are being clustered. These points represent initial group centroids. 2. Assign each object to the group that …

Member Avatar for sathya8819
0
816
Member Avatar for qemajl

I am writing a hash algorithm simulator, I am running the keys through the hash but I am not being able to display the whole hash table after all keys are entered. I also I can not figure a way to check if there is any collision because I am …

Member Avatar for OmniX
0
138
Member Avatar for scrace89

My teacher gives a review sheet which is a lot like the exam if not the exam but with some minor changes. I'm stuck with these fill in the blanks. [CODE]Fill-In-The-Blank Word Frequency The following program gets the name of a file as a command-line argument, opens that file, reads …

Member Avatar for scrace89
0
401
Member Avatar for rehaam

Hi I need help;; Write a program to simulate a demand paging system. The program should implement the FIFO and LRU page replacement algorithms presented in Chapter 10 of the textbook. Your program input should include: The name of the page replacement algorithm. Information about the number of physical page …

Member Avatar for gerard4143
0
2K
Member Avatar for vinochick

I need to write a program that uses P = (nRT)/V P = pressure V = volume n = number of moles R= universal gas constant (8.31 j/mol K) T = absolute temperatre All variables must be local, no global variables. Inputs to the program include kelving temp, initial and …

0
58
Member Avatar for YoTaMiX

Hello to you all , I am required to write a program which gets a Math Expression (without checking it is good) and put in Stack only the Brackets . Implementation of Stack is One-Way Linked List Only. Examples for Good/Bad Expressions : (a*{b+c}-4/x +[e-5]) - GOOD (5+} - BAD …

Member Avatar for Berkut
0
283
Member Avatar for uniquesofts2009

Hi There, Can you tell me how to check the updated algorithm of Google. How to update our site according to Google algorithm. Thank you

Member Avatar for redesignunit
0
159
Member Avatar for Cy137

I keep receiving the same output for each record when I run it on the test data. I've tried numerous things...any suggestions? I've worked on this for almost twelve hours straight, not counting previous work. I'm hoping one of you guys/gals who know whats going on can point me in …

Member Avatar for mrnutty
0
189
Member Avatar for gilianz

I need help writing a pseudo code for converting decimal to binary. this is for Python. I have the program but i am not sure how to write the code please help! thanks!

Member Avatar for .11
-1
76
Member Avatar for Spreegem

I had to develop a brute force, a recursive, divide and conquer, and transform and conquer algorithms for calculating the nth power of a, a^n, for an assignment. I got the first three done pretty easy but I'm completely stumped at how to do the transform and conquer algorithm. I've …

Member Avatar for Nimmy Chohan
0
184
Member Avatar for ab_n00b

Can anybody tell me what is the difference between those 2 algorithms ? I've done a few research and it says Damerau-levenshtein enables transportation characters which levenshtein does not support. I wanna know how it does. Damerau algorithm on wikipedia isn't very clear. Please somebody point me to a good …

0
51
Member Avatar for ayan2587

hi frndz.... i was wondering that given 1<n<1000000 & 1<r<1000000 how do i [B][I]efficiently[/I][/B] find nCr (combination) for any given values of n & r. please help with an efficient algorithm...

Member Avatar for ayan2587
0
93
Member Avatar for MRWIGGLES

can anyone help me determine it? from the looks of pages on google. it's just a bunch of 90 degree angles that are constantly rotated 45 degrees about it's axis. thanks.

Member Avatar for vegaseat
0
1K
Member Avatar for Spreegem

So I have to make a greedy algorithm to find the fewest number of coins needed to make change for any n cents. I have an infinite number of quarters(25 cents), dimes (10 cents), nickles (5 cents), and pennies (1 cent). This is the algorithm I came up with, it …

0
54
Member Avatar for buzzykerbox

Hey Guys and Gals,I'm writing a program to find the highest and lowest of 5 integers.I think i have the algorithm almost right but it doesn't work.I think its something simple.......as usual......... [CODE] include <iostream.h> include <conio.h> int main () { double total=0,num1,num2,num3,num4,num5,high,low; cout<<please enter number; cin>>num1; cout<<please enter number; …

Member Avatar for buzzykerbox
0
2K
Member Avatar for angel1204

I am taking entry level C++ course, and I am having trouble with my assignment for this week on Sequential Files. Here is my assignment: Create a C++ console application that analyzes the contents of a text file. Your program should count the number of: lines (hint: use getline) words …

Member Avatar for Clinton Portis
0
127
Member Avatar for moods125

can someone help me do this problem An array can be used to store large integers one digit at a time. For example, the integer 1234 could be stored in the array a by setting a[0] to 1, a[1] to 2, a[2] to 3, and a[3] to 4. However, for …

Member Avatar for moods125
0
273
Member Avatar for Nikhar

Note:- I am NOT asking you to write the program for me. I am NOT asking you to do the homework for me either. All I am asking you is if you could suggest an algorithm for me. Present below are two algorithms. Can you please suggest me an algorithm …

Member Avatar for nezachem
0
132
Member Avatar for bairamfci

i have array on 3*3 2D and every row are sorted and every colomn are sorted also and need to apply binary search on it as best algorithm e.g : 9 11 17 12 15 22 19 20 29

Member Avatar for Ancient Dragon
0
82
Member Avatar for DCV

Hey, I'm in a class in which the assignment here is to sort integers. We were called on to use two different sorting methods: InsertSort and HeapSort. My InsertSort works just fine. My HeapSort, however, does not; when the HeapSort() function is finished, the integers are still out of order. …

Member Avatar for Narue
0
137
Member Avatar for ItecKid

Hello all, I am trying to write a clustering algorithm where, given location of certain points (I.e, latitude and longitude) I need to choose 50 of these to be cluster centers such that the diameter of each cluster is minimized. To that end, I believe that the program should choose …

Member Avatar for ItecKid
0
113
Member Avatar for UberJoker

Any ideas on how would I be able to traverse this BTree in asceding order? right now I am sorting the data and giving it to my retreival() function to look for the keys. But naturally it visits and prints the data in ascending order because I give it sorted …

Member Avatar for wmsigler
0
232
Member Avatar for rt.arti

Hello! I had a question about appending data in to a file. My program flows in the following way-- [CODE] // This function reads data from the file parse_input_data_for_one_algo(some parameters) { FILE *f = fopen (filename, "rw+"); while ( fgets (in_line, 100, f) != NULL ) { //read values } …

Member Avatar for uskok
0
147
Member Avatar for singh.sanjana

[I]<<thread split from [URL="http://www.daniweb.com/forums/thread13488-9.html"]here[/URL]>>[/I] hi. i can c ur proficiency in the algorithm n complexity field. can u pls help me out? i need 2 understand it 4m the very beginin. take me as a layman n thn send ur replies.

Member Avatar for فلذمنصور
0
72
Member Avatar for kavourdoukos

[CODE]#include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <algorithm> using namespace std; class letter{ private: int genre; int price; string adress; public: letter(); ~letter(); }; class parcel{ private: int genre; int price; string adress; public: parcel(); ~parcel(); }; class post{ private: letter** LETTERS; parcel** PARCELS; …

Member Avatar for mrnutty
0
116
Member Avatar for confusedndazed

Hello all!! I've been working on this code for a while now and I'm still lost. Can anyone tell me what's wrong with this code please??? I know Line 44 is missing something but I'm not sure what goes there, here is the pseudocode as well: /* pseudocode for Binomial …

Member Avatar for confusedndazed
0
116
Member Avatar for crystality

Hi! I'm trying to implement an optimization idea for Dijkstra's algorithm for homework. This is the optimization idea that they want us to implement: [INDENT][B]Idea 3. [/B]Many of the vertices have exactly two neighbors. If a vertex [I]v[/I] has exactly two neighbors [I]u[/I] and [I]w[/I], then you can replace the …

Member Avatar for crystality
0
174
Member Avatar for ronny22

hi everyone im my computer science degree am doing a module on algorithms tho we are studying it i am bit behind my question is what does n - 1 mean (n minus 1) what does n/2 mean (n over 2 or n divided by 2) because stuff like this …

Member Avatar for ronny22
-1
169
Member Avatar for nola_Coder

I'm working on a Floyd's Algorithm type Java program. What I have done so far is represent a directed graph in a 2d array, and I am trying to transform that into a 2d array representing the graph's paths of length 2. I planned for it to fill the adj2[][] …

Member Avatar for nola_Coder
0
170
Member Avatar for ericcool

Required to use PriorityQueue to implements Dijkstra’s algorithm for solving the single-source shortest-path problem for weighted graphs without negative edge weights. I have a wrong output of my program. Here's the code: [CODE] //Graph.h class Graph { public: Graph(int r = 1, int c = 1); // constructor void setCost(int …

Member Avatar for ericcool
0
145
Member Avatar for hamidvosugh

Hi Would any one tell me how can I generate a random permutation of N numbers in c++? Is there any algorithm in STL for this purpose? Thanks in advance

Member Avatar for hamidvosugh
0
209
Member Avatar for stayfierce

I am trying to run a source code that I downloaded. However, there are several error message in reference to the classes TablePanel, BufferedPanel, Stringable, and Booleanview. I am not sure why I am getting these errors because it is a complete source code. Do I need to import additional …

0
57
Member Avatar for simonsayz27

Hey everyone. I'm getting REALLY frustrated with this program and I've been working on this problem for too long now. I am building an undirected and unweighted bi-connected graph class which detects all the articulation points. I am able to detect all the articulation points but I cannot figure out …

0
64
Member Avatar for Compton11

I'm working on a project implementing Dijkstra's Algorithm. The project involves reading from an input file and the format of the file is as follows: - The first line of the file tells the number of total vertices and the number of edges (n, m) respectively. - The rest of …

Member Avatar for sireeshakiran
0
720
Member Avatar for BrownBearForU

Hey you guys i have a major problem here basically im a begginer c++ program student and i am trying to get use to vectors and functions so i made this program like a mad lib game or a bear hunt as you say. The program basically have vectors (duh) …

Member Avatar for BrownBearForU
0
167
Member Avatar for TheDLSyrnyk

I have an exam coming up on this unit found in the guide to programming with Java textbook. I was just wondering if someone can provide an algorithm to the following question. 13. a.) Write an algorithm to count the number of words in a sentence. b.) Write an algorithm …

Member Avatar for javaAddict
0
134
Member Avatar for fedya

Hello guys! I have an assignment in my data structure class and I want to ask following thing: I have txt file which is unordered (not sorted) say like this: red apple blue sky white car handsome boy hello world My program should read file into linked list and sort …

Member Avatar for dkalita
0
89
Member Avatar for redrum237

hi this program starts off with random letters, then using a genetic algorithm eventually forms the "hello world!" basically i need this code to be able to input a word of the users choice, everytime i try something i get an error of some sort thanks [CODE]#pragma warning(disable:4786) // disable …

Member Avatar for programmersbook
0
408
Member Avatar for ab_n00b

Hello everyone, I been reading a bit about Levenshtein distance algorithm (edit distance) from [url]http://www.merriampark.com/ld.htm[/url] site. I'm pretty clear with how the algorithm works but I've no idea how to edit ( edit here as in edit , delete, insert a word or words) after i've gotten the distance. Can …

Member Avatar for Rashakil Fol
0
71
Member Avatar for blamp

Can someone help me figure out why nothing comes up on the output screen. The program compiles but the the output is blank. 1. Maintain information on all students. Each student has the following: 1st line - lastname, city of residence, student id, ssn 2nd line - course, course id, …

Member Avatar for pecet
0
132
Member Avatar for Eternity[LK]

Hello :) This is my first post on daniweb forum and I hope this site will help me improve. I'm a first year college student in computer science, and I've only recently started C++. This means that code posted by me might seem very lousy and /or unprofessional. I have …

Member Avatar for Eternity[LK]
0
97
Member Avatar for wmsigler

I'm having difficulties thinking through the logic of my natural mergesort program. I think I have the split working correctly, but my merge doesn't seem to be working at all, and the pseudocode in my book and what I've found so far on the web is fuzzy. This is a …

0
72
Member Avatar for fedya

Hello guys, I've got a question related to my data structures class. I have file in which data is unordered. Say: hello apple blue phone number I have to search a string using Binary Search. But since we cannot apply Binary Search to unordered list, we should make an ordered …

Member Avatar for mrnutty
0
78
Member Avatar for gen84

[code]/****************************************************/ /* File: Binomial Numbers.cpp */ /* */ /* Created by: Regine R Calinda */ /* Date: November 9, 2009 */ /* */ /* Program to compute binomial coefficients */ /* */ /* Inputs: (keyboard) */ /* Two positive integers (n & k) */ /* */ /* Output: */ /* …

Member Avatar for Ancient Dragon
0
124
Member Avatar for imagine88

Logic Used: Insert Pixel Data into a struct containing RGB values of the pixels read Data in a 3x3 array: | BGR(-1,-1) | BGR(-1,0) | BGR(-1,1) | | BGR(0,-1) | BGR(0,0) | BGR(0,1) | | BGR(1,-1) | BGR(1,0) | BGR(1,1) | Assign Average of all Blue,Green,Red components respectively to another …

Member Avatar for death_oclock
1
154
Member Avatar for LisaJane

I have this program that is supposed to read part numbers from a text file. 101-110, 301-310, 501-510 and put them into a hash table. It will prompt for one of four algorithms to be used and then continue to load the part numbers. Everything seems to be working okay, …

Member Avatar for xaveri
0
5K
Member Avatar for silveram

I need a java code or algorithm for converting eNFAs to NFAs. This is our project for our automata theory class and our prof said that it would be alright to get codes from other people as long as we fully understood how the program works. Please help me and …

-3
50

The End.