Cooperating to buy shoes in the real world: online cycle picking in directed graphs

  • Authors:
  • I. D. Sanders

  • Affiliations:
  • University of South Africa, Florida

  • Venue:
  • Proceedings of the South African Institute for Computer Scientists and Information Technologists Conference
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

There are many people who have different size feet and need different sizes of shoes to get shoes that fit well. A static approach to solving the problem could be to get a list of all the people who need shoes and their size requirements, then from that list find groups of people who can cooperate. In a graph theory sense this means creating a directed graph from the input data, finding all of the simple cycles in the graph and then picking the smallest set of cycles such that each node in a cycle in the original graph is in at least one cycle in the final set of cycles. This paper looks at a more dynamic approach of dealing with the problem. People who need shoes enter the system, by giving their shoe size requirements, and remain in the system until their needs have been satisfied. This approach is represented by an online algorithm which stores all the possible paths in the graph at any stage, checks for cycles when a new person enters the system and updates appropriately in each iteration. The online algorithm can also accommodate "altruism" (where an individual chooses to stay in the system to assist others to buy shoes) and spreading the cost of buying additional pairs of shoes (for example, two people buying three pairs of shoes) in order for individuals to more quickly have their shoe needs satisfied. The three versions of the online algorithm were implemented and tested on synthetic data. The online algorithm generally satisfies the needs of the people entering the system although its performance is sometimes affected by the lack of knowledge of the entire input set.