Re: permutations algorithm
- From: "Green, Simon (EDS)" <SGreen@xxxxxxxxxxxxxxx>
- Date: Tue, 10 Oct 2006 11:12:29 +0200
If I understand you correctly, I think you may be trying to be too clever.
I guess that each of these members represents a server to be restored and
will have associated with it the number of slots it requires in the tape
library. So the objective is to see which servers you can fit into your 36
slot library, and which you'll need to leave for later.
Wouldn't it be much simpler to just sort by the number of tape slots
required and then work from the smallest one up? That would be trivial to
code and would probably produce just as good results. It might not give you
the "best fit" but you don't really need to care if you've got some empty
tape slots, providing that your servers get restored efficiently.
That method won't always give the best results, but it should be OK unless
you've got a lot more servers and tapes than you can fit, (so you're doing
at least three sets of restores).
--
Simon Green
EDS
-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Taylor, David
Sent: 09 October 2006 22:37
To: aix-l@xxxxxxxxxxxxx
Subject: permutations algorithm
Admins:
I am looking for an algorithm to determine all the possible list of
permutations for a list of arguments that can range anywhere from 1 to 6.
For example, if the list is A B C, I want the algorithm to spit out:
A
B
C
AB
AC
BC
ABC
The maximum number of members would be six the minimum would be one.
Pseudo-code is just fine.
In case anyone is curious, the purpose of the algorithm will be used in a
script for determining servers to restore in a DR/BCP environment. I have a
very limited capacity library (36 slot - 3583) and I want to be able to
determine, given a list of servers to restore, which combination would give
me the most number of servers I could restore at one time and still have all
of the required tapes still fit in the library.
Backupsets, collocation, hot-site SAN, et.... Have all been suggested and
some form of improvement will be implemented the next year or two but, in
the meatime I have to do the best I can with what I have.
- Prev by Date: permutations algorithm
- Next by Date: Re: permutations algorithm
- Previous by thread: Re: permutations algorithm
- Index(es):
Relevant Pages
|
|