Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Scrambling a list
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 ---



Report this thread to moderator Post Follow-up to this message
Old Post
E.Fridman
08-16-04 01:55 AM


Re: Scrambling a list
On 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

Report this thread to moderator Post Follow-up to this message
Old Post
Ross McKenzie
08-16-04 08:55 AM


Re: Scrambling a list
On 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.


Report this thread to moderator Post Follow-up to this message
Old Post
Peter B. Steiger
08-16-04 08:55 PM


Re: Scrambling a list
Peter,

>{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]

Report this thread to moderator Post Follow-up to this message
Old Post
Klas Engwall
08-17-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clipper archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:35 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.