Click here to Skip to main content
15,919,774 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Calculate lateral acceleration Pin
Russell'18-Sep-07 4:27
Russell'18-Sep-07 4:27 
AnswerRe: Calculate lateral acceleration Pin
El Corazon18-Sep-07 5:17
El Corazon18-Sep-07 5:17 
GeneralRe: Calculate lateral acceleration Pin
AlexB4726-Sep-07 5:15
AlexB4726-Sep-07 5:15 
GeneralRe: Calculate lateral acceleration Pin
El Corazon26-Sep-07 6:39
El Corazon26-Sep-07 6:39 
QuestionNeural Network Pin
tanj005617-Sep-07 0:04
tanj005617-Sep-07 0:04 
AnswerRe: Neural Network Pin
ic3b3rg317-Sep-07 4:48
ic3b3rg317-Sep-07 4:48 
GeneralRe: Neural Network Pin
tanj005618-Sep-07 4:51
tanj005618-Sep-07 4:51 
QuestionHamiltonian algorithms Pin
Patrick Etc.16-Sep-07 12:05
Patrick Etc.16-Sep-07 12:05 
I'm not entirely sure what to even Google for this particular algorithm, so any insight would be much appreciated.

The following is the problem I need to solve:

Say I have a list of many raw items, with some repeats (the number doesn't matter, just assume it's more than three or 4. It could be several hundred, it could be 5).

I have ANOTHER list of possible combinations of those items. We'll call these recipes. Each recipe can be created out of 3 of the other items.

The algorithm I need to create will do the following:

* Determine which recipes can be created out of the list of raw items.
* Determine the OPTIMAL combination of recipes. That is, I want to minimize the number of remaining items.

Yes, I could do this the brute force way - if I wanted my program to run all night. I KNOW there are implementations of this algorithm that will run in mere seconds.

It has been 6 years since I took my CS class on algorithms, so I no longer remember what this is called. Doesn't it have something to do with Hamiltonians? Consequently, it's hard to search Google for it Frown | :(

If you remember what this is and/or can point me the right direction, I'd appreciate it!


More Info
This is a problem I've set for myself simply to re-develop these skills. This is not homework or work, I just want to figure out how to do it.

Also, this actually IS a way to figure out how to make real food recipes. I have a game I play where I can get lots and lots of raw ingredients, and I can make recipes out of those ingredients. I've gotten sick of referring back to the list of recipes, so I wanted to make a program that will do the crunching for me. I figured this would be a perfect opportunity to use to remind myself how to solve these types of problems.





The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee

AnswerRe: Hamiltonian algorithms Pin
Tim Craig17-Sep-07 17:59
Tim Craig17-Sep-07 17:59 
GeneralRe: Hamiltonian algorithms Pin
Patrick Etc.18-Sep-07 6:45
Patrick Etc.18-Sep-07 6:45 
QuestionTumbnail algorithm Pin
martin_hughes14-Sep-07 0:33
martin_hughes14-Sep-07 0:33 
AnswerRe: Tumbnail algorithm Pin
Giorgi Dalakishvili14-Sep-07 0:54
mentorGiorgi Dalakishvili14-Sep-07 0:54 
GeneralRe: Tumbnail algorithm Pin
martin_hughes14-Sep-07 1:30
martin_hughes14-Sep-07 1:30 
GeneralRe: Tumbnail algorithm Pin
Giorgi Dalakishvili14-Sep-07 1:35
mentorGiorgi Dalakishvili14-Sep-07 1:35 
Questionconversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 0:28
professionalTom Deketelaere13-Sep-07 0:28 
AnswerRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 1:36
sitebuilderLuc Pattyn13-Sep-07 1:36 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 1:43
professionalTom Deketelaere13-Sep-07 1:43 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 2:00
sitebuilderLuc Pattyn13-Sep-07 2:00 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 2:13
professionalTom Deketelaere13-Sep-07 2:13 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 2:36
sitebuilderLuc Pattyn13-Sep-07 2:36 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 3:08
professionalTom Deketelaere13-Sep-07 3:08 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 3:18
sitebuilderLuc Pattyn13-Sep-07 3:18 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 3:26
professionalTom Deketelaere13-Sep-07 3:26 
GeneralRe: conversion color - hexnumber - color Pin
Tim Craig13-Sep-07 18:21
Tim Craig13-Sep-07 18:21 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 20:46
professionalTom Deketelaere13-Sep-07 20:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.