Code Comments
Programming Forum and web based access to our favorite programming groups.Joe, Yes, it can be done. I mean such algorithms exist. As the result you will either find the sequence or conclude that it can't be done with the given data. I believe that your task is very close to "The Eight Queen Problem". Using backtracking you can do much better than all permutations (see http://www.staff.vu.edu.au/johnr/scm2711/back.pdf or Google) ======================================== ========================= "Joe Wright" <joewwright@comcast.net> wrote in message news:0a6dnZTROendXoLcRVn-ow@comcast.com... > If this is Off Topic for the group, I appologize. I need some help > from xBASE programmers more experienced than I. The scenario.. > > I have a .dbf which is a list of members by family and a facility > that each member is assigned to. It might look like this.. > > first last fam fac > > Michael Davis 2896 102 > Mitch McGlynn 3706 74 > Theresa McGlynn 3706 210 > Mitchell McGlynn 3706 210 > Megan McGlynn 3706 210 > Patricia Doyle 3715 210 > Sandra Ratliff 3712 342 > Edgell Ratliff 3712 342 > Lori Hayes 3713 74 > David Hayes 3713 74 > Mary Stoner 4777 40 > Mary Harrison 22486 102 > Thomas McGlynn 22751 391 > Patricia Griffin 22751 391 > Thomas McGlynn 22751 391 > Connor McGlynn 22751 391 > Kesley McGlynn 22751 391 > Michaela McGlynn 22751 391 > > The task is to rearrange the rows such that neither fam or fac are > adjacent. Theresa McGlynn cannot follow Mitch for example because > their families are the same. Patricia Doyle cannot follow Megan > McGlynn because their facilities are the same. > > I'm not sure it can be done at all. Until now, I can't. TIA. > -- > Joe Wright mailto:joewwright@comcast.net > "Everything should be made as simple as possible, but not simpler." > --- Albert Einstein ---
Post Follow-up to this messageOn Sun, 15 Aug 2004 20:02:42 -0500, "E.Fridman" <pm771@netscape.net> wrote: >Joe, > >Yes, it can be done. I mean such algorithms exist. >http://www.staff.vu.edu.au/ Small world. The "vu" is Victoria University and is about 30 minutes from me. I attended a single semester subject on the motorola 6809 microprocessor there back in ...cough, cough 1980 <g>. Regards, Ross McKenzie ValuSoft Melbourne Australia valusoft AT optushome DOT com DOT au
Post Follow-up to this messageOn Mon, 16 Aug 2004 02:59:43 +0000, Ross McKenzie sez: > Small world. The "vu" is Victoria University and is about 30 minutes > from me. I attended a single semester subject on the motorola 6809 > microprocessor there back in ...cough, cough 1980 <g>. {snicker} The poet/philosopher Michael Jagger put it best when he wrote, "What a drag it is getting old." People don't believe me when I tell them my high school class stored programs on paper tape, and my freshman BASIC class in college was the last to use punch cards exclusively for our assignments. Of course, here I am telling this to a bunch of fellow Clipper dinosaurs. It's the Javascript and C++ infants who can't grok punch cards (or Motorola 6809 architecture, for that matter). -- Peter B. Steiger Cheyenne, WY If you must reply by email, you can reach me by placing zeroes where you see stars: wypbs_**3 at bornagain.com.
Post Follow-up to this messagePeter,
>{snicker} The poet/philosopher Michael Jagger put it best when he
>wrote, "What a drag it is getting old." People don't believe me when I
>tell them my high school class stored programs on paper tape, and my
>freshman BASIC class in college was the last to use punch cards
>exclusively for our assignments.
BASIC? You must be a youngster <g>. I took a basic (lowercase!!!)
programming class after I had already finished my MBA. Fortran, PL/1
and Cobol were the primary languages taught then ... it was not until
several years later that BASIC classes started to appear. And yes,
puch cards were still the primary medium long after I graduated.
Those were the days ... <g>
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.