Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
C

Cynthia Moore

@Cynthia Moore
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help with allocation algorithm
    C Cynthia Moore

    I posted a question about this several months ago, but I didn't explain it very well and then I got sidetracked by some family emergencies. Now I need to get this done, so would appreciate any help. Here's the situation. About a year ago, while cleaning out the attic, I found a box of old LP record albums. I haven't had a turntable for 20 years and, figuring that no one listens to LPs anymore, I was about to toss them. Before I did, I posted a message on our neighborhood email group. I got a ton of responses offering to take them and pleading with me not to toss them. I've always had a tendency to leap and then look, so I posted another note offering to collect any other unwanted albums anyone else might have in their attic and then have a yard or garage event to distribute them to those who want them. I got another surprising response. More than a dozen people responded and brought over albums. I now have over 1,000 albums in about 25 banker boxes all over my home office. I need to get these distributed so I can use that space for other junk. 😉 The yard event is out. I have at least 20 "takers" so far. There is no way that I can find a time when they are all available and a couple of them are relatives of neighbors who are not in town. Plus, with 1,000 albums, people would be thumbing through the boxes forever. Much better to have a list that people can peruse at their leisure. I decided to use this opportunity to polish up my database skills and come up with a way to allow each taker to select the albums they want online and then come up with an algorithm to allocate them fairly. I have made some progress. I have the albums in an Access database. I have a Google Sheet derived from that database. I have a way to share that with the neighbors. They can mark the albums that they want. All I need now is the allocation algorithm. My first question is how to set up the Google Sheet. Should I put a checkbox next to each album so that they check the albums they want? I don’t really like this option, because the albums are not equal. Each neighbor will have a different priority for different albums. I need way for them to indicate a preference of one album over another. Next, I thought about letting them rearrange the albums in priority order or give each one a priority number. But there are 1,000 albums. I think that would be difficult to manage. My current thinking is to define a limited number of priorities, like 5 or 10. There would be a box next to each album into which each neighbor could en

    Algorithms question database algorithms help tutorial

  • Help with allocation algorithm
    C Cynthia Moore

    Wow! My programming skills may not be the best, but it's clear that you meet every geek stereotype, namely, social skills: non-existent.

    Algorithms database algorithms help question lounge

  • Help with allocation algorithm
    C Cynthia Moore

    Let me see if I understand what you are suggesting. I have 15-20 "takers". I give each of then a number from 1-20, right so far? Then I pick the items one at a time and draw one of the taker numbers from a hat, like a Bingo wheel. Whichever number comes up, that person gets the item. Right? So I have almost 700 items. Are you seriously suggesting that I have 700 "draws"? If I could manage to keep each draw to 30 seconds, which I doubt, that would take almost 6 hours. Then there is the problem that most of the takers will only want a few items. So I'd have to go through the numbers after each draw and only put in the ones who want that item. Now we are well over minute for each draw and well over 12 hours for the whole disaster. Plus I don't want to try and find a time when all 20 takers are available. I have the items in a database and I have a Google Sheet containing the list of items that I can share with each taker. At their leisure, they can browse the list of items and indicate which they want. I will merge those choices into an Excel sheet that will execute my allocation algorithm. All I need is the algorithm. The key feature is breaking ties. I am working on a way to calculate the percentage of the choices each taker has received. If 2 or more takers want the same item, I will either award it to the3 one with the lowest percentage or generate a weighted random number based on those percentages.

    Algorithms database algorithms help question lounge

  • Help with allocation algorithm
    C Cynthia Moore

    Hi, I am new here. I hope I am doing this right. If not, please advise. I signed up to handle a neighborhood project that involves distributing about 700 items to anyone in the neighborhood who wants them. I have created an Access database containing the items with details such as the size, weight, and condition (very good to poor). I also have a Google Sheet that I populated from the database. It has one row for each item. There are columns for each of the properties (description, size, weight, condition etc.). These are all read only (protected). The first column is the selection column. In it, the neighbor can indicate whether they want that item or not. My current thinking is to let them enter a priority number (1-10) or leave it blank. I will allow each neighbor to access a copy of that sheet and fill in their choices. When they are all done, I will lock the sheets and import the priority columns to Excel where I am more comfortable. I have the code roughed out that will do the actual allocations. My remaining task is to devise an algorithm for allocating items that are selected by multiple people. I could just select randomly, but I'd like an algorithm that does the allocation as fairly as possible. I realize that "fairly" is subjective. I currently have about 20 people who have said they want some of the items. At least one person said they would take them all. The algorithm will start by allocating all of the items that are selected by just one person. My current thinking for the items selected by multiple people is to calculate some measure of the percentage of the items they requested that they have already been given. Suppose A & B both choose item 143, A has 20% of their requests, and B has 30% of theirs. I could then award that item to A or, since B has 3/2 as much of their selections as does A, I could generate a random number from 1-5 and award it to A if it's 1-3, and B if 4-5. Or I could skew it more in favor of A, the one with the lower percentage. I'm not entirely happy with this algorithm for a couple of reasons. (1) It doesn't take into account the priority choice. What if A choose the item with a priority of 5, but B chose with with a priority of 1? (2) I'm not sure of it takes into account how many items each one chose. If B only chose 1 item but A chose 100, should that one go to B, because if not, they get nothing? I would appreciate any suggestions for good ways to handle this. Thanks

    Algorithms database algorithms help question lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups