CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Posts
    1

    Robot Task Optimization problem

    Consider a group of n robots, and m tasks. Tasks can be different and robots are specialized, hence a given robot can only perform certain tasks. For each robot, you are given a list of tasks in a text file that the robot is capable of performing. Assume each task takes one day to perform from start to finish, and once a robot starts working on a task, it completes it before starting on another task. Also, the robots cannot multi-task. Finally, assume that there are no dependencies among tasks and any subset of tasks can be worked on concurrently by qualified robots.
    A text file is given with inputs like:
    3, 10
    1, 1, 3, 4
    2, 2, 5, 8
    3, 5, 7, 9
    where the numbers on the first line correspond to # of robots(3) and total number of tasks(10) & the numbers on lines 2-4 correspond to robot number followed by what tasks the specified robot can complete.


    Based on the constraints above, what would be the best way to optimize the maximum number of tasks that can be completed in one day?
    I'm under the impression that the max number of tasks that can be completed equals the number of robots since each robot can complete 1 task per day. But, I am also supposed to output a set of robot-task pairings to achieve the result.

    My question is, what is best way to find a robot-task pairing after input file has been parsed for tasks that can be completed by each robot?

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Robot Task Optimization problem

    This is an algorithm problem rather than a Java problem.

    I'll request the mods move this post to the "Algorithms & Data Structures" forum. Once you have your algorithm, if you get stuck implementing it in Java then post a question here.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured