-
Permutation set ... cont
Date: 01/26/06
Keywords: no keywords
Earlier I asked about printing all N! combination of set of N elements ...
Now if I don't want to print all N! permutations but rather have a set s from 1 .... n but only want all the permutations of size k . Forget about the actual algorithm, how many will there permutation will there be ?
for example s = 1 2 3 4 and k is 2 so the avail sets are 1 2 , 1 3 , 1 4 , 2 1 , 2 3 , 2 4 , 3 1 , 3 2 , 3 4, 4 1 , 4 2 , 4 3 . It seems it will be n choose k * k! where n is the number of elements in s and k is the permutation size. Is that correct ?
Source: http://community.livejournal.com/algorithms/71982.html
-
procedure to output all the n! combinations of the set s {1...n}
Date: 01/25/06
Keywords: no keywords
I am trying to write a procedure to output all the n! combinations of the set s {1...n}
for example
n = 3 , s = 1 2 3 then I want to print out
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
I am still trying to do it but if you know right away an algorightm for doing this please let me know .. thanks
Source: http://community.livejournal.com/algorithms/71766.html
-
Solutions
Date: 01/25/06
Keywords: no keywords
Over the months I've seen a lot of questions on here, and tried to help a few people. But everybody knows that what works in theory doesn't always work well in practice. Too hard to implement, good O performance but huge constants, etc.
So is anybody game to tell us how their problems went, what they tried, what did or didn't work well? What was your final solution to your problem?
Source: http://community.livejournal.com/algorithms/71516.html
-
Adaptive Golomb coding
Date: 01/23/06
Keywords: no keywords
Can someone explain (or give a link to a decent explanation) how adaptive Golomb coding works?
Source: http://community.livejournal.com/algorithms/71308.html
-
Optimizing task load
Date: 01/19/06
Keywords: no keywords
Optimizing task load
I have a number of airplanes with known fuel capacity and a many locations to visit, the goal is to send out as few airplanes as possible and also to having their loads as balance as possible proportionally to their fuel capacity.
A greedy method is probably sort the airplane in decreasing order based on their fuel and try to assign as many locations as possible to the first airplane, after that one is out of fuel, continue with the next, …. Obviously this will be very unbalance as the first airplane has a whole bunch of locations why the last probably just has a few (especially in the case when their fuel capacities are similar).
(Note if locations 1 2 3 … n are assigned to an airplane then that airplane will go from its base -> 1 -> 2 -> 3 -> base).
Is there a polynomial time for this or it is one of NP- Hard problem time scheduling or Knapsack (that’s the thief problem right?) problems ?
Thanks
Source: http://community.livejournal.com/algorithms/71117.html
-
Simple drawing program to smoothen curve
Date: 01/18/06
Keywords: no keywords
Simple drawing program to smoothen curve
Hi, any suggestion on a drawing program produce smoothen contious line , I have graphs with lines which sharp edges and I want to smoothen those. Basically given several points on a graphs, draw a curve through those points ... simple as that.
I was able to do some tricks (in Matlab) with least square procedure to produce smooth curve but the problem is it's not as flexible (e.g., I cannot tell it what point exactly it must pass through) so I am looking for a program that allows me to do so. Please not gimp or photoshop as I don't know how to use them and doubt I can learn their complexity quickly.
Thanks
Source: http://www.livejournal.com/community/algorithms/70728.html
-
Simple drawing program to smoothen curve
Date: 01/18/06
Keywords: no keywords
Simple drawing program to smoothen curve
Hi, any suggestion on a drawing program produce smoothen contious line , I have graphs with lines which sharp edges and I want to smoothen those. Basically given several points on a graphs, draw a curve through those points ... simple as that.
I was able to do some tricks (in Matlab) with least square procedure to produce smooth curve but the problem is it's not as flexible (e.g., I cannot tell it what point exactly it must pass through) so I am looking for a program that allows me to do so. Please not gimp or photoshop as I don't know how to use them and doubt I can learn their complexity quickly.
Thanks
Source: http://community.livejournal.com/algorithms/70728.html
-
Experiments to show effectiveness of cooperations
Date: 01/18/06
Keywords: no keywords
Experiments to show effectiveness of cooperations
Hi, I am about to write some papers on a project that has autonomous airplanes cooperation and was looking for suggestions on what kind of experiments, figures, tables etc that can present the benefits
An example is before the planes depart each has a planned path assigned, and during their missions they can update their paths, helping each other etc -> I can represent the benefits of something like this with figures showing without that capbility they most likely won't succeed or with graphs showing the failure rate ...
I am looking for ne wideas on what others (visual presentable materials, graphs etc) to show about robotics cooperation, it seems people are more interested in tables and such more than reading words.
Source: http://www.livejournal.com/community/algorithms/70589.html
-
Experiments to show effectiveness of cooperations
Date: 01/18/06
Keywords: no keywords
Experiments to show effectiveness of cooperations
Hi, I am about to write some papers on a project that has autonomous airplanes cooperation and was looking for suggestions on what kind of experiments, figures, tables etc that can present the benefits
An example is before the planes depart each has a planned path assigned, and during their missions they can update their paths, helping each other etc -> I can represent the benefits of something like this with figures showing without that capbility they most likely won't succeed or with graphs showing the failure rate ...
I am looking for ne wideas on what others (visual presentable materials, graphs etc) to show about robotics cooperation, it seems people are more interested in tables and such more than reading words.
Source: http://community.livejournal.com/algorithms/70589.html
-
Divide & Conquer Analogy
Date: 01/18/06
Keywords: no keywords
We were discussing divide and conquer in my algorithms class last semester. Most of those in the class had at some point been misinstructed concerning the definition, so it took a number of examples to clarify.
The best example we came up with was this, written on a piece of notebook paper:
So, building a car is not divide and conquer. But, if you've got a bunch of Transformers (ROBOTS IN DISGUISE) and they can all join into a really f***ing huge Transformer, then this is divide and conquer.
Below this on the paper was written,
Dude, Voltron. Case closed.
Source: http://www.livejournal.com/community/algorithms/70236.html
-
Divide & Conquer Analogy
Date: 01/18/06
Keywords: no keywords
We were discussing divide and conquer in my algorithms class last semester. Most of those in the class had at some point been misinstructed concerning the definition, so it took a number of examples to clarify.
The best example we came up with was this, written on a piece of notebook paper:
So, building a car is not divide and conquer. But, if you've got a bunch of Transformers (ROBOTS IN DISGUISE) and they can all join into a really f***ing huge Transformer, then this is divide and conquer.
Below this on the paper was written,
Dude, Voltron. Case closed.
Source: http://community.livejournal.com/algorithms/70236.html
-
Nearest match bit-string search.
Date: 01/18/06
Keywords: database
Here's a doozy of a problem. I've been beating my head for a while to come up with the best data structure and/or algorithm for handling this, but I'm drawing a blank.
I have a large number (on the order of 100 million or more) 4096-bit values. I need to store them in a database or similar structure so that given a 4096-bit key, and a number N, I can extract and present all records that contain (in this order)
a) that exact key.
b) keys that differ by at most 1 bit.
c) keys that differ by at most 2 bits.
...
X) keys that differ by at most N bits.
I need the entire thing to be as fast as possible, to the extent that I am willing to burn several hundred gigabytes of storage if that will get me some speed. Any ideas?
Source: http://www.livejournal.com/community/algorithms/70141.html
-
Nearest match bit-string search.
Date: 01/18/06
Keywords: database
Here's a doozy of a problem. I've been beating my head for a while to come up with the best data structure and/or algorithm for handling this, but I'm drawing a blank.
I have a large number (on the order of 100 million or more) 4096-bit values. I need to store them in a database or similar structure so that given a 4096-bit key, and a number N, I can extract and present all records that contain (in this order)
a) that exact key.
b) keys that differ by at most 1 bit.
c) keys that differ by at most 2 bits.
...
X) keys that differ by at most N bits.
I need the entire thing to be as fast as possible, to the extent that I am willing to burn several hundred gigabytes of storage if that will get me some speed. Any ideas?
Source: http://community.livejournal.com/algorithms/70141.html
-
Arrrr. I suck.
Date: 01/06/06
Keywords: programming, java
So... after having taken *counts* 5 programming classes, I still suck at programming. 3 of the said clases were lower level assembly languages, the other two the higher level C/C++ and a Data Structures course in Java.
That's kind of sad. I'm also starting research with a data base lab this spring and I'm freaking out here, because I seriously doubt I know much to begin with. Or even the stuff I am supposed to know.
The problem now is I need to fix this. I am not sure how. I have been doing well in my classes... but it's been mostly through beating the material to my head, and spending waaaay more time on the projects than I felt like it should take . It doesn't feel like the stuff comes to me as easily as it should.
Also! I *know* my algorithm writing skills suck. I guess I need more practice. And now I'm rambling.
*Anything* you guys would recommend? I feel like I need to review the most elementary stuff and practice more. Any resources/exercises?
Danke.
Source: http://www.livejournal.com/community/algorithms/69477.html
-
Arrrr. I suck.
Date: 01/06/06
Keywords: programming, java
So... after having taken *counts* 5 programming classes, I still suck at programming. 3 of the said clases were lower level assembly languages, the other two the higher level C/C++ and a Data Structures course in Java.
That's kind of sad. I'm also starting research with a data base lab this spring and I'm freaking out here, because I seriously doubt I know much to begin with. Or even the stuff I am supposed to know.
The problem now is I need to fix this. I am not sure how. I have been doing well in my classes... but it's been mostly through beating the material to my head, and spending waaaay more time on the projects than I felt like it should take . It doesn't feel like the stuff comes to me as easily as it should.
Also! I *know* my algorithm writing skills suck. I guess I need more practice. And now I'm rambling.
*Anything* you guys would recommend? I feel like I need to review the most elementary stuff and practice more. Any resources/exercises?
Danke.
Source: http://community.livejournal.com/algorithms/69477.html
-
Shortest path ...
Date: 01/04/06
Keywords: no keywords
Shortest path ...
given a x * y * z cell grid (assume each cell is a 1x1x1 cube) , and the cost to go from a cell to another What (quick) algorithm would you use to go from a cell to another ?
Dijkstra gurantees the shortest path in this case but it can be slow. Currently I used A* heuristic approach however wondering if possible to find a quicker algorithm. D* ? The performance of A* is fine when finding the route from point A to point B however in my project there's a set S of points and I want to find in that set which point is closest to point B, so I have to re-run A* on point A to each of the points in set S), taking lots of time
Thanks ....
I believe there are some posts relating to this early however cannot find it , is there a way to search on old posts ?
Source: http://www.livejournal.com/community/algorithms/69200.html
-
Shortest path ...
Date: 01/04/06
Keywords: no keywords
Shortest path ...
given a x * y * z cell grid (assume each cell is a 1x1x1 cube) , and the cost to go from a cell to another What (quick) algorithm would you use to go from a cell to another ?
Dijkstra gurantees the shortest path in this case but it can be slow. Currently I used A* heuristic approach however wondering if possible to find a quicker algorithm. D* ? The performance of A* is fine when finding the route from point A to point B however in my project there's a set S of points and I want to find in that set which point is closest to point B, so I have to re-run A* on point A to each of the points in set S), taking lots of time
Thanks ....
I believe there are some posts relating to this early however cannot find it , is there a way to search on old posts ?
Source: http://community.livejournal.com/algorithms/69200.html
-
Other methods than using Genetic Programming to build machine
Date: 12/25/05
Keywords: database
In my prev project, I used GP to build evolve hardware, more specifically, a radar. The radar is unknown, only thing known is if X is input then Y is output and I built the radar based on the input database and based on some common-sense about what the radar is like. It works fairly well w/ GP however I always look for more ideas so that I can solve more complicated hardware models. I am wondering if there are other algorithms/methods to achieve the same goal ? I am hoping to find some other alternatives to hybrid their strong features to my GP proj. Thanks
Source: http://www.livejournal.com/community/algorithms/69112.html
-
Other methods than using Genetic Programming to build machine
Date: 12/25/05
Keywords: database
In my prev project, I used GP to build evolve hardware, more specifically, a radar. The radar is unknown, only thing known is if X is input then Y is output and I built the radar based on the input database and based on some common-sense about what the radar is like. It works fairly well w/ GP however I always look for more ideas so that I can solve more complicated hardware models. I am wondering if there are other algorithms/methods to achieve the same goal ? I am hoping to find some other alternatives to hybrid their strong features to my GP proj. Thanks
Source: http://community.livejournal.com/algorithms/69112.html
-
Combinatorics
Date: 12/22/05
Keywords: web
Hello,
I ran into a combinatorics problem in a website I'm developing. I can't for the life of me figure this one out... I'd be very grateful if anyone could help me with this.
You're given n lists of elements, where an element consists of a unique identifier and a number. These lists are of various lengths and are all sorted from low to high based on the element's number. You want to generate all sequences of elements, where each sequence contains exactly one element from every list. The catch is that you need to generate these sequences in sorted order. The sort value for a sequence is simply the sum of all numbers from the elements in that sequence.
For example if you had just two lists:
List 1: {A-10, B-20}
List 2: {D-1, E-2, F-100}
You would return the following order of sequences:
{A,D}, {A,E}, {B,D}, {B,E}, {A,F}, {B,F}
as that would give you the sort values:
11, 12, 21, 22, 110, 120
I can't just calculate all combinations and then sort them, as my application would typically have billions of combinations and I only need the top 100. I need to do this in sorted order.
Thanks for the help!
Source: http://www.livejournal.com/community/algorithms/68721.html