I'm not sure if this is the right forum, but just in case anyone enjoys a brain teaser, here goes ...
I am musically associated with a bunch of lady Morris dancers (but please don't hold that against me). They have the same problem each time they dance in public: given the individual dancers who have turned up, which of their dances can they perform as a team ?
If it were just a question of who knows which dance, we can do that with just a spreadsheet:
- Set up a grid of people down the left, dances across the top; enter a "1" in the grid for each person who knows that dance. Underneath each dance name, enter the minimum number of people needed to perform the dance (some need 4, others 6 or occasionally 8 ). Also set up a total for each dance column.
- Using a copy of this data, delete rows for anyone who is not there. If the total for a dance column is GTE the minimum needed for that dance, we can do it.
The problem is that each dance has up to 8 positions, and many of the newer dancers have only learned a dance in one or two of the positions. So now, for each dance, we need to find a combination of dancers (at least the minimum number for that dance), each of whom knows at least one of the positions, so that each position is filled. You can't just do totals for each position now; one of the dancers may well know all of the positions, but she can only dance one of them at a time !
I've almost accepted that I'm going to have to work out the logic to grind through all of the possible permuations, but I thought I'd sound out the experts, in case anyone can see a clever logical shortcut. Failing that, there is always the organic, "ooh can we do this one ?" approach, which usually works (eventually).
Pete
Logic puzzle
Want to talk about something that isn't covered by another category?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Jump to
- LiveCode Community
- ↳ Announcements
- ↳ Developer Services Marketplace
- ↳ User Groups and Events
- ↳ SoCal LiveCode Group
- ↳ Greater Toronto Area LiveCode Users Group
- ↳ Off-Topic
- ↳ Made With LiveCode
- Getting Started With LiveCode
- ↳ Getting Started with LiveCode - Complete Beginners
- ↳ Getting Started with LiveCode - Experienced Developers
- ↳ Converting to LiveCode
- Developing With LiveCode
- ↳ Talking LiveCode
- ↳ Databases
- ↳ Games
- ↳ Internet
- ↳ Multimedia
- ↳ Software Engineering
- ↳ Version Control
- ↳ Feature Proposals
- ↳ Bug Triage
- Extending LiveCode
- ↳ Using Plugins for Customizing the LiveCode IDE
- ↳ Using Externals
- ↳ Making IDE Plugins
- ↳ Building Externals
- ↳ LiveCode Builder
- Platform Specific
- ↳ Windows
- ↳ Mac OS
- ↳ Linux
- ↳ iOS Deployment
- ↳ Android Deployment
- ↳ CGIs and the Server
- ↳ HTML5
- ↳ Raspberry Pi
- Academic Endeavors
- ↳ Teaching with LiveCode
- ↳ Research and Post Secondary
- ↳ LiveCode University
- ↳ Educational Outreach
- Livecode Open Source Archived Forum- closed to posting
- ↳ Engine Contributors
- ↳ IDE Contributors
- ↳ Documentation and Tutorials
- ↳ Brainstorms
- ↳ Community Projects
- LiveCode Hosting