- Data Structure & Algorithm Classes (Live)
- System Design (Live)
- DevOps(Live)
- Explore More Live Courses
- Interview Preparation Course
- Data Science (Live)
- GATE CS & IT 2024
- Data Structure & Algorithm-Self Paced(C++/JAVA)
- Data Structures & Algorithms in Python
- Explore More Self-Paced Courses
- C++ Programming - Beginner to Advanced
- Java Programming - Beginner to Advanced
- C Programming - Beginner to Advanced
- Full Stack Development with React & Node JS(Live)
- Java Backend Development(Live)
- Android App Development with Kotlin(Live)
- Python Backend Development with Django(Live)
- Complete Data Science Program(Live)

## Mastering Data Analytics

Devops engineering - planning to production, cbse class 12 computer science.

- School Guide
- All Courses
- Linked List
- Binary Tree
- Binary Search Tree
- Advanced Data Structure
- All Data Structures
- Asymptotic Analysis
- Worst, Average and Best Cases
- Asymptotic Notations
- Little o and little omega notations
- Lower and Upper Bound Theory
- Analysis of Loops
- Solving Recurrences
- Amortized Analysis
- What does 'Space Complexity' mean ?
- Pseudo-polynomial Algorithms
- Polynomial Time Approximation Scheme
- A Time Complexity Question
- Searching Algorithms
- Sorting Algorithms
- Graph Algorithms
- Pattern Searching
- Geometric Algorithms
- Mathematical
- Bitwise Algorithms
- Randomized Algorithms
- Greedy Algorithms
- Dynamic Programming
- Divide and Conquer
- Backtracking
- Branch and Bound
- All Algorithms
- Company Preparation
- Practice Company Questions
- Interview Experiences
- Experienced Interviews
- Internship Interviews
- Competitive Programming
- Design Patterns
- System Design Tutorial
- Multiple Choice Quizzes
- Go Language
- Tailwind CSS
- Foundation CSS
- Materialize CSS
- Semantic UI
- Angular PrimeNG
- Angular ngx Bootstrap
- jQuery Mobile
- jQuery EasyUI
- React Bootstrap
- React Rebass
- React Desktop
- React Suite
- ReactJS Evergreen
- ReactJS Reactstrap
- BlueprintJS
- TensorFlow.js
- English Grammar
- School Programming
- Number System
- Trigonometry
- Probability
- Mensuration
- Class 8 Syllabus
- Class 9 Syllabus
- Class 10 Syllabus
- Class 11 Syllabus
- Class 8 Notes
- Class 9 Notes
- Class 10 Notes
- Class 11 Notes
- Class 12 Notes
- Class 8 Formulas
- Class 9 Formulas
- Class 10 Formulas
- Class 11 Formulas
- Class 8 Maths Solution
- Class 9 Maths Solution
- Class 10 Maths Solution
- Class 11 Maths Solution
- Class 12 Maths Solution
- Class 7 Notes
- History Class 7
- History Class 8
- History Class 9
- Geo. Class 7
- Geo. Class 8
- Geo. Class 9
- Civics Class 7
- Civics Class 8
- Business Studies (Class 11th)
- Microeconomics (Class 11th)
- Statistics for Economics (Class 11th)
- Business Studies (Class 12th)
- Accountancy (Class 12th)
- Macroeconomics (Class 12th)
- Machine Learning
- Data Science
- Mathematics
- Operating System
- Computer Networks
- Computer Organization and Architecture
- Theory of Computation
- Compiler Design
- Digital Logic
- Software Engineering
- GATE 2024 Live Course
- GATE Computer Science Notes
- Last Minute Notes
- GATE CS Solved Papers
- GATE CS Original Papers and Official Keys
- GATE CS 2023 Syllabus
- Important Topics for GATE CS
- GATE 2023 Important Dates
- Software Design Patterns
- HTML Cheat Sheet
- CSS Cheat Sheet
- Bootstrap Cheat Sheet
- JS Cheat Sheet
- jQuery Cheat Sheet
- Angular Cheat Sheet
- Facebook SDE Sheet
- Amazon SDE Sheet
- Apple SDE Sheet
- Netflix SDE Sheet
- Google SDE Sheet
- Wipro Coding Sheet
- Infosys Coding Sheet
- TCS Coding Sheet
- Cognizant Coding Sheet
- HCL Coding Sheet
- FAANG Coding Sheet
- Love Babbar Sheet
- Mass Recruiter Sheet
- Product-Based Coding Sheet
- Company-Wise Preparation Sheet
- Array Sheet
- String Sheet
- Graph Sheet
- ISRO CS Original Papers and Official Keys
- ISRO CS Solved Papers
- ISRO CS Syllabus for Scientist/Engineer Exam
- UGC NET CS Notes Paper II
- UGC NET CS Notes Paper III
- UGC NET CS Solved Papers
- Campus Ambassador Program
- School Ambassador Program
- Geek of the Month
- Campus Geek of the Month
- Placement Course
- Testimonials
- Student Chapter
- Geek on the Top
- Geography Notes
- History Notes
- Science & Tech. Notes
- Ethics Notes
- Polity Notes
- Economics Notes
- UPSC Previous Year Papers
- SSC CGL Syllabus
- General Studies
- Subjectwise Practice Papers
- Previous Year Papers
- SBI Clerk Syllabus
- General Awareness
- Quantitative Aptitude
- Reasoning Ability
- SBI Clerk Practice Papers
- SBI PO Syllabus
- SBI PO Practice Papers
- IBPS PO 2022 Syllabus
- English Notes
- Reasoning Notes
- Mock Question Papers
- IBPS Clerk Syllabus
- Apply for a Job
- Apply through Jobathon
- Hire through Jobathon
- All DSA Problems
- Problem of the Day
- GFG SDE Sheet
- Top 50 Array Problems
- Top 50 String Problems
- Top 50 Tree Problems
- Top 50 Graph Problems
- Top 50 DP Problems
- Solving For India-Hackthon
- GFG Weekly Coding Contest
- Job-A-Thon: Hiring Challenge
- BiWizard School Contest
- All Contests and Events
- Saved Videos
- What's New ?
- Divide & Conquer

## Related Articles

- Write Articles
- Pick Topics to write
- Guidelines to Write
- Get Technical Writing Internship
- Write an Interview Experience
- Top 50 Array Coding Problems for Interviews
- Introduction to Recursion - Data Structure and Algorithm Tutorials
- Difference between BFS and DFS
- Counting Sort
- A* Search Algorithm
- SDE SHEET - A Complete Guide for SDE Preparation
- Asymptotic Notation and Analysis (Based on input size) in Complexity Analysis of Algorithms
- DSA Sheet by Love Babbar
- How to write a Pseudo Code?
- Types of Asymptotic Notations in Complexity Analysis of Algorithms
- Understanding Time Complexity with Simple Examples
- Worst, Average and Best Case Analysis of Algorithms
- How to analyse Complexity of Recurrence Relation
- Playfair Cipher with Examples
- Recursive Practice Problems with Solutions
- How to Analyse Loops for Complexity Analysis of Algorithms
- What is Algorithm | Introduction to Algorithms
- Quick Sort vs Merge Sort
- Complexity Analysis of Binary Search
- Converting Roman Numerals to Decimal lying between 1 to 3999
- Generate all permutation of a set in Python
- Difference Between Symmetric and Asymmetric Key Encryption
- Comparison among Bubble Sort, Selection Sort and Insertion Sort
- Data Structures and Algorithms Online Courses : Free and Paid
- Mid-Point Circle Drawing Algorithm
- Cyclomatic Complexity
- DDA Line generation Algorithm in Computer Graphics
- Difference between NP hard and NP complete problem
- Introduction to Amortized Analysis
- Design a Chess Game

## Scheduling in Greedy Algorithms

- In this case, the maximum number of events is two. As selected events B and D are as follows:
- It is possible to invent several greedy algorithms for the problem.

Algorithms that work with every case:

- The first idea is to select as short events as possible. In the example, this algorithm selects the following events:
- However, selecting short events is not always a correct strategy. For example, the algorithm fails in the below case:
- If short event is selected, it can only select one event. However, it would be possible to select both long events.

- Another idea is to always select the next possible event that begins as early as possible. This algorithm selects the following events:
- However, given a counter example for this algorithm. In this case, the algorithm only selects one event:
- If the first event is selected, it is not possible to select any other events. However, it would be possible to select the other two events.

- The third idea is to always select the next possible event that ends as early as possible. This algorithm selects the following events:
- It turns out that this algorithm always produces an optimal solution.
- The reason for this is that it is always an optimal choice to first select an event that ends as early as possible.
- After this, it is an optimal choice to select the next event using the same strategy, etc., until any other event can’t be selected.
- One way the algorithm works is to consider what happens if first select an event that ends later than the event that ends as early as possible.
- Now, with having at most an equal number of choices how the next event can be selected.
- Hence, selecting an event that ends later can never yield a better solution, and the greedy algorithm is correct.

Solve DSA problems on GfG Practice.

## Please Login to comment...

## Data Structures & Algorithms in Python - Self Paced

- Stack Overflow Public questions & answers
- Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
- Talent Build your employer brand
- Advertising Reach developers & technologists worldwide
- About the company

## Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Connect and share knowledge within a single location that is structured and easy to search.

## Teacher time schedule algorithm

- A teacher cannot teach two classes at the same time
- A student cannot follow two lessons at the same time
- Some teachers must have at least one day off during the week
- All the days of the week should be covered by the time table
- Subject X must have exactly so-and-so hours each week

- Each teacher's schedule should be as compact as possible (i.e. the teacher should work all hours for the day in a row with no pauses if possible)
- Teachers that have days off should be able to express a preference on which day
- Teachers that work part-time should be able to express a preference whether to work in the beginning or the end of the school day.

Does anyone have an idea on how to crack this thing?

Looking at this question made me think about this problem, and whether genetic algorithms would be usable in this case. However it would be pretty hard to mutate possibilities while maintaining the sanity check rules. Also it's not clear to me how to distinguish incompatible requirements.

## 10 Answers 10

I think you might be missing some constraints.

One would prefer where possible to have teachers scheduled to classes for which they are certified.

Start with a small set of constraints, and increase them as you see success (if you see success)

I agree. It sounds like a fun challenge

- The headcount would be fixed (say x classes of y students). All teachers are equally certified. At least in Italian schools that is... ;) – Sklivvz Oct 16, 2008 at 23:49
- The problem is, I suspect that even generating a bad, but sane solution is almost np-hard... Should I generate a random one to start with? That really doesn't sound feasible – Sklivvz Oct 16, 2008 at 23:52
- Ya, omitting those constraints simplifies things. I think sitting down and drawing a picture of possible data structures for the constraints would be a good step. Do the part you know, and the rest may become visible. – EvilTeach Oct 16, 2008 at 23:54
- Ya, I probably would generate a large initial set, run them through fitness, then start breeding them, injecting new random ones intermittently, if they start to die off too fast. You are really gonna have to do it, to see what happens. – EvilTeach Oct 16, 2008 at 23:56

- Create the list of teachers, classes and preferences then let the user populate some of the preferences on a map to have as a starting point.
- Randomly take one element from the list and put it at a random free position on the map if it doesn't cross any sanity checks until the list is empty. If at any certain iteration you can't place an element on the map without crossing a sanity check shift two positions on the map and try again.
- When the map is filled, try shifting positions on the map to optimize the result.

I did not try this, but this would be my initial approach.

The FET project mentioned by gnud uses this algorithm:

Some words about the algorithm: FET uses a heuristical algorithm, placing the activities in turn, starting with the most difficult ones. If it cannot find a solution it points you to the potential impossible activities, so you can correct errors. The algorithm swaps activities recursively if that is possible in order to make space for a new activity, or, in extreme cases, backtracks and switches order of evaluation. The important code is in src/engine/generate.cpp. Please e-mail me for details or join the mailing list. The algorithm mimics the operation of a human timetabler, I think.

Solving a constraint satisfaction problem on a finite domain is an NP-complete problem in general. Research has shown a number of polynomial-time subcases, mostly obtained by restricting either the allowed domains or constraints or the way constraints can be placed over the variables. Research has also established relationship of the constraint satisfaction problem with problems in other areas such as finite model theory and databases.

This reminds me of this blog post about scheduling a conference , with a video explanation here .

Have the population include two things:

- Who teaches what class (I expect the teachers to teach one subject).
- What a class takes on a specific time slot.

The fitness function would include:

- How many time slots each teacher gives per week.
- How many time slots a teacher has on the same day (They can't have a full day of teaching, this too must be balanced).
- How many time slots of the same subject a class has on the same day (They can't have a full day of math!).

Maybe take the standard deviation for all of them since they should be balanced.

After thousands of iterations you inch closer to an acceptable solution.

You might also find some interest in the Linear Programming arena, e.g. simplex and so on.

Yes, I think this is NP complete - or at least to find the optimal solution is NP complete.

## Your Answer

Sign up or log in, post as a guest.

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

## Not the answer you're looking for? Browse other questions tagged algorithm scheduling np-hard or ask your own question .

- The Overflow Blog
- Building an API is half the battle: Q&A with Marco Palladino from Kong
- Developers think AI assistants will be everywhere, but aren’t sure how to...
- Featured on Meta
- We've added a "Necessary cookies only" option to the cookie consent popup
- The Stack Exchange reputation system: What's working? What's not?
- Launching the CI/CD and R Collectives and community editing features for...
- The [amazon] tag is being burninated
- Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2
- Temporary policy: ChatGPT is banned

## Hot Network Questions

- Why did my flight leave the gear down for the first 10 minutes of flight?
- Are the Āraṇyaká-s and the Upaniṣád-s part of the Véda?
- Does the Federal Reserve insure the money of all depositors?
- How to notate 3 quarters framed by eighths?
- Why is the ongoing auction for Silicon Valley Bank started privately held (vs. publicly)?
- How useful is a caliper for a home-based bike workshop?
- Is the cabin pressure "worse" at the back of the cabin than in front?
- What's a good word to describe someone who is prone to sudden changes of mood?
- Mechanic sent me this image and said my brake rotors should be replaced. Does this seem right?
- Why Hegel thinks that A and not-A will entail each other?
- Would a spider familiar be able to press the button on the immovable rod whilst swinging from a rope tied to said rod?
- Applying geometry nodes doesn't work on a curve object
- What filter is used on this image?
- Why isn't the derivative of the volume of the cone its surface area?
- What is the concept of hole in semiconductor physics?
- Why is crystal frequency often multiplied inside a microcontroller?
- Fired (seemingly) for finding paycheck inconsistencies. What kind of legal recourse might exist?
- How can I make the rules of my Faerie Portal free from contradiction?
- Can we explain why using `Nothing` twice on a list does not operate twice?
- What's the best word to indicate "not mindless"?
- Is cross examination strictly confined to the subjects that the original examination pertained to, or can the opposing party make their own points?
- Where is the extra hour? Eurostar London to Paris is 2hr 30m but departure is 3hrs 30m before arrival
- Test whether an expression contains a particular pattern
- How to extract the internal key of a simple P2TR address?

## Classroom scheduling using heuristics and genetic algorithm

The schedule has to conform to the following rules:

- One teacher can only teach 1 class at a time.
- The maximum number of periods for a subject per day is 2.
- Subjects that require teachers who are niche in the subject only allows the teacher who specializes in the subject to teach it.
- Teachers are only allowed to have a maximum of 12 periods per week and 5 periods per day
- Each subject for any class can only be taught by 1 teacher. That means each subject for each class will be assigned to 1 teacher
- Subjects that must be held in the morning must be held before recess.
- Subjects that have the attribute “side_by_side=True” must have the maximum amount of consecutive classes. This means if a subject has 5 periods per week, it must have periods of 2,2,1 for each day.
- Subjects that have the attribute “side_by_side=False” can only have 1 period per day.

A brief introduction to Genetic algorithm

In the genetic algorithm solution, the problem is being broken down into 2 sections i.e.

b)The assignment of classes to each class.

The fitness is decreased as to the following 2 criteria:

As this is a regular encoding problem, the following operators are used for solving this problem

A random teacher ID is selected and switched to another random teacher ID.

The Roulette method is used for selecting individuals from each population.

a) Each morning period that is assigned after recess decreases the fitness score by 1

## Heuristics solution

Every sequence would go through the following processes:

c) Select the subject that fulfills the criteria as in the diagram

e) Randomly select the coordinate and assign the period the classes

a) Scale it up to more classes

b) Use simulated annealing algorithm method

d) Assign classes based on facilities availability according to subjects.

e) Minimization of walking distance by teachers

## More from Tay Tze Hao

## Get the Medium app

## Tay Tze Hao

International Conference on Advanced Information Networking and Applications

AINA 2021: Advanced Information Networking and Applications pp 533–540 Cite as

## Solving Job Scheduling Problem Using Genetic Algorithm

Part of the Lecture Notes in Networks and Systems book series (LNNS,volume 227)

This is a preview of subscription content, access via your institution .

## Buying options

- DOI: 10.1007/978-3-030-75078-7_53
- Chapter length: 8 pages
- Instant PDF download
- Readable on all devices
- Own it forever
- Exclusive offer for individuals only
- Tax calculation will be finalised during checkout
- ISBN: 978-3-030-75078-7
- ISBN: 978-3-030-75077-0
- Dispatched in 3 to 5 business days
- Free shipping worldwide Shipping restrictions may apply, check to see if you are impacted .

## Author information

College of Engineering and Science, Victoria University Sydney, Sydney, Australia

Soheila Gheisari & Farshid Hajati

You can also search for this author in PubMed Google Scholar

## Corresponding author

Correspondence to Farshid Hajati .

## Editor information

Department of Computer Science, Ryerson University, Toronto, ON, Canada

Faculty of Business Administration, Rissho University, Tokyo, Japan

## Rights and permissions

## Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG

## About this paper

## Download citation

DOI : https://doi.org/10.1007/978-3-030-75078-7_53

Publisher Name : Springer, Cham

Print ISBN : 978-3-030-75077-0

Online ISBN : 978-3-030-75078-7

eBook Packages : Intelligent Technologies and Robotics Intelligent Technologies and Robotics (R0)

## Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

## Get Started with OR-Tools for Python

The following sections will get you started with OR-Tools for Python:

## What is an optimization problem?

Like all optimization problems, this problem has the following elements:

The first step in solving an optimization problem is identifying the objective and constraints.

Next, we give an example of an optimization problem, and show how to set up and solve it in Python.

## A linear optimization example

Maximize 3x + y subject to the following constraints:

## Main steps in solving the problem

For each language, the basic steps for setting up and solving a problem are the same:

- Import the required libraries,
- Declare the solver,
- Create the variables,
- Define the constraints,
- Define the objective function,
- Invoke the solver and
- Display the results.

## Python program

This section walks through a Python program that sets up and solves the problem.

- Import the required libraries. from ortools.linear_solver import pywraplp from ortools.init import pywrapinit
- Declare the solver. # Create the linear solver with the GLOP backend. solver = pywraplp.Solver.CreateSolver('GLOP') if not solver: return pywraplp is a Python wrapper for the underlying C++ solver. The argument "GLOP" specifies GLOP , the OR-Tools linear solver.
- Create the variables. # Create the variables x and y. x = solver.NumVar(0, 1, 'x') y = solver.NumVar(0, 2, 'y') print('Number of variables =', solver.NumVariables())
- Define the constraints. The first two constraints, 0 ≤ x ≤ 1 and 0 ≤ y ≤ 2 , are already set by the definitions of the variables. The following code defines the constraint x + y ≤ 2 : # Create a linear constraint, 0 <= x + y <= 2. ct = solver.Constraint(0, 2, 'ct') ct.SetCoefficient(x, 1) ct.SetCoefficient(y, 1) print('Number of constraints =', solver.NumConstraints()) The method SetCoefficient sets the coefficients of x and y in the expression for the constraint.
- Define the objective function. # Create the objective function, 3 * x + y. objective = solver.Objective() objective.SetCoefficient(x, 3) objective.SetCoefficient(y, 1) objective.SetMaximization() The method SetMaximization declares this to be a maximization problem.
- Invoke the solver and display the results. solver.Solve() print('Solution:') print('Objective value =', objective.Value()) print('x =', x.solution_value()) print('y =', y.solution_value())

## Complete program

The complete program is shown below.

## Running the program

You can run the program above as follows:

- Copy and paste the code above into new file and save it as program.py .
- Open a command window and change to the directory where you saved program.py . At the command prompt, enter: python relative/path/to/ program.py where relative/path/to/ is the path to the directory where you saved the program.

The program returns the values of x and y that maximize the objective function:

## Linear optimization

Constraint optimization, mixed-integer optimization, network flows.

Learn more about linear optimization

Learn more about mixed-integer optimization

Learn more about constraint optimization

Learn more about network flows

## Information

## Initiatives

- Active Journals
- Find a Journal
- Proceedings Series
- For Authors
- For Reviewers
- For Editors
- For Librarians
- For Publishers
- For Societies
- For Conference Organizers
- Open Access Policy
- Institutional Open Access Program
- Special Issues Guidelines
- Editorial Process
- Research and Publication Ethics
- Article Processing Charges
- Testimonials
- Preprints.org
- SciProfiles
- Encyclopedia

## Article Menu

Find support for a specific problem in the support section of our website.

Please let us know what you think of our products and services.

Visit our dedicated information section to learn more about MDPI.

## JSmol Viewer

Multi-objective task scheduling optimization in spatial crowdsourcing.

## 1. Introduction

- N is the inertia weight;
- P is population number;
- I is iteration number;
- D is duration max;
- C1 and C2 are acceleration coefficients;
- r1 and r2 are random numbers;
- S is the speed of workers;
- No.w is the number of workers;
- No.t is the number of tasks.

## 4.1. The Performance of the Ranking Strategy Algorithm

- Initializing the position of a particle randomly (the percentage of randomness is 100%);
- Initializing the position of a hybrid particle, both randomly and from the ranked table (the percentage of randomness is 50%);
- Initializing the positions of all particles from the ranked table (the percentage of randomness is 0%).
- Initializing the positions of all particles randomly;
- Initializing the positions of all particles using the output of the ranking strategy stage.

## 4.2. Performance of the MOTSO Model

- Wang, Y.; Jia, X.; Jin, Q.; Ma, J. Mobile crowdsourcing: Framework, challenges, and solutions. Concurr. Comput. Pr. Exp. 2016 , 29 , e3789. [ Google Scholar ] [ CrossRef ]
- Sun, D.; Gao, Y.; Yu, D. Efficient and Load Balancing Strategy for Task Scheduling in Spatial Crowdsourcing. In Web-Age Information Management ; Song, S., Tong, Y., Eds.; Springer: Berlin, Germany, 2016; pp. 161–173. [ Google Scholar ]
- Tong, Y.; She, J.; Ding, B.; Wang, L.; Chen, L. Online mobile Micro-Task Allocation in spatial crowdsourcing. In Proceedings of the 2016 IEEE 32nd International Conference on Data Engineering (ICDE), Helsinki, Finland, 16–20 May 2016; pp. 49–60. [ Google Scholar ]
- Song, T.; Tong, Y.; Wang, L.; She, J.; Yao, B.; Chen, L.; Xu, K. Trichromatic Online Matching in Real-Time Spatial Crowdsourcing. In Proceedings of the 2017 IEEE 33rd International Conference on Data Engineering (ICDE), San Diego, CA, USA, 19–22 April 2017; pp. 1009–1020. [ Google Scholar ]
- Zhao, Y.; Han, Q. Spatial crowdsourcing: Current state and future directions. IEEE Commun. Mag. 2016 , 54 , 102–107. [ Google Scholar ] [ CrossRef ]
- Kazemi, L.; Shahabi, C. GeoCrowd: Enabling Query Answering with Spatial Crowdsourcing. In Proceedings of the 20th International Conference on Intelligent User Interfaces, Redondo Beach, CA, USA, 6–9 November 2012; pp. 189–198. [ Google Scholar ]
- Chen, L.; Shahabi, C. Spatial Crowdsourcing: Challenges and Opportunities. IEEE Data Eng. Bull. 2016 , 39 , 14–25. [ Google Scholar ]
- Cheng, P.; Lian, X.; Chen, L.; Han, J.; Zhao, J. Task Assignment on Multi-Skill Oriented Spatial Crowdsourcing. IEEE Trans. Knowl. Data Eng. 2016 , 28 , 2201–2215. [ Google Scholar ] [ CrossRef ][ Green Version ]
- Kazemi, L.; Shahabi, C.; Chen, L. GeoTruCrowd: Trustworthy Query Answering with Spatial Crowdsourcing. In Proceedings of the 21st ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, Orlando, FL, USA, 5–8 November 2013; pp. 314–323. [ Google Scholar ]
- Deng, D.; Shahabi, C.; Zhu, L. Task matching and scheduling for multiple workers in spatial crowdsourcing. In Proceedings of the 23rd SIGSPATIAL International Conference on Advances in Geographic Information Systems, Seattle, DC, USA, 3–6 November 2015; p. 21. [ Google Scholar ]
- Deng, D.; Shahabi, C.; Demiryurek, U. Maximizing the number of worker’s self-selected tasks in spatial crowdsourcing. In Proceedings of the 21st ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, Orlando, FL, USA, 5–8 November 2013; pp. 324–333. [ Google Scholar ]
- Tran, L.; To, H.; Fan, L.; Shahabi, C. A Real-Time Framework for Task Assignment in Hyperlocal Spatial Crowdsourcing. ACM Trans. Intell. Syst. Technol. 2018 , 9 , 1–26. [ Google Scholar ] [ CrossRef ][ Green Version ]
- Tsai, J.-T.; Fang, J.-C.; Chou, J.-H. Optimized task scheduling and resource allocation on cloud computing environment using improved differential evolution algorithm. Comput. Oper. Res. 2013 , 40 , 3045–3055. [ Google Scholar ] [ CrossRef ]
- Zhang, G.; Zuo, X. Deadline Constrained Task Scheduling Based on Standard-PSO in a Hybrid Cloud. In Advances in Swarm Intelligence ; Tan, Y., Shi, Y., Mo, H., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; Volume 7928, pp. 200–209. [ Google Scholar ]
- Jana, B.; Chakraborty, M.; Mandal, T. A Task Scheduling Technique Based on Particle Swarm Optimization Algorithm in Cloud Environment. In Soft Computing: Theories and Applications ; Ray, K., Sharma, T.K., Rawat, S., Saini, R.K., Bandyopadhyay, A., Eds.; Springer: Singapore, 2019; Volume 742, pp. 525–536. [ Google Scholar ]
- Kennedy, J.; Eberhart, R. Particle swarm optimization. In Proceedings of the ICNN’95-International Conference on Neural Networks, Perth, WA, Australia, 27 November–1 December 1995; Volume 4, pp. 1942–1948. [ Google Scholar ] [ CrossRef ]
- Wang, D.; Tan, D.; Liu, L. Particle swarm optimization algorithm: An overview. Soft Comput. 2018 , 22 , 387–408. [ Google Scholar ] [ CrossRef ]
- Coello, C.C.; Lechuga, M. MOPSO: A proposal for multiple objective particle swarm optimization. In Proceedings of the 2002 Congress on Evolutionary Computation, 2002. CEC ’02, Honolulu, HI, USA, 12–17 May 2003; Volume 2, pp. 1051–1056. [ Google Scholar ]
- Alabbadi, A.A.; Abulkhair, M.F. Task-Scheduling Based on Multi-Objective Particle Swarm Optimization in Spatial Crowdsourcing. J. King Abdulaziz Univ. Comput. Inf. Technol. Sci. 2019 , 8 , 45–57. [ Google Scholar ] [ CrossRef ]
- Chen, Z.; Fu, R.; Zhao, Z.; Liu, Z.; Xia, L.; Chen, L.; Cheng, P.; Cao, C.C.; Tong, Y.; Zhang, C.J. gMission: A General Spatial Crowdsourcing Platform. Proc. VLDB Endow. 2014 , 7 , 1629–1632. [ Google Scholar ] [ CrossRef ]
- Uber. Available online: https://www.uber.com// (accessed on 22 November 2018).
- Google Maps. Available online: https://www.google.com/maps (accessed on 22 November 2018).
- Free Driving Directions, Traffic Reports & GPS Navigation App by Waze. Available online: https://www.waze.com/ (accessed on 22 November 2018).
- Restaurants, Dentists, Bars, Beauty Salons, Doctors—Yelp. Available online: https://www.yelp.com/ (accessed on 22 November 2018).
- TaskRabbit Connects You to Safe and Reliable Help in Your Neighborhood. Available online: https://www.taskrabbit.com/ (accessed on 22 November 2018).
- Gigwalk: We’ve Got Your Brand’s Back—Gigwalk. Available online: http://www.gigwalk.com/ (accessed on 22 November 2018).
- To, H. Task Assignment in Spatial Crowdsourcing: Challenges and Approaches. In Proceedings of the 3rd ACM SIGSPATIAL PhD Symposium, Burlingame, CA, USA, 31 October 2016; Volume 1, pp. 1–4. [ Google Scholar ]
- Cheng, P.; Jian, X.; Chen, L. Task Assignment on Spatial Crowdsourcing (Technical Report). arXiv 2016 , arXiv:1605.09675. [ Google Scholar ]
- Gummidi, S.R.B.; Xie, X.; Pedersen, T.B. A Survey of Spatial Crowdsourcing. ACM Trans. Database Syst. 2019 , 44 , 1–46. [ Google Scholar ] [ CrossRef ]
- Tong, Y.; Zhou, Z.; Zeng, Y.; Chen, L.; Shahabi, C. Spatial crowdsourcing: A survey. VLDB J. 2019 , 29 , 217–250. [ Google Scholar ] [ CrossRef ]
- To, H.; Shahabi, C.; Kazemi, L. A Server-Assigned Spatial Crowdsourcing Framework. ACM Trans. Spat. Algorithms Syst. 2015 , 1 , 1–28. [ Google Scholar ] [ CrossRef ]
- To, H.; Fan, L.; Tran, L.; Shahabi, C. Real-time task assignment in hyperlocal spatial crowdsourcing under budget constraints. In Proceedings of the 2016 IEEE International Conference on Pervasive Computing and Communications (PerCom), Sydney, NSW, Australia, 14–19 March 2016; pp. 1–8. [ Google Scholar ]
- Alfarrarjeh, A.; Emrich, T.; Shahabi, C. Scalable Spatial Crowdsourcing: A Study of Distributed Algorithms. In Proceedings of the 2015 16th IEEE International Conference on Mobile Data Management, Pittsburgh, PA, USA, 15–18 June 2015; Volume 1, pp. 134–144. [ Google Scholar ]
- Hassan, U.U.; Curry, E. Efficient task assignment for spatial crowdsourcing: A combinatorial fractional optimization approach with semi-bandit learning. Expert Syst. Appl. 2016 , 58 , 36–56. [ Google Scholar ] [ CrossRef ]
- Wang, L.; Yu, Z.; Han, Q.; Guo, B.; Xiong, H. Multi-Objective Optimization Based Allocation of Heterogeneous Spatial Crowdsourcing Tasks. IEEE Trans. Mob. Comput. 2017 , 17 , 1637–1650. [ Google Scholar ] [ CrossRef ]
- SNAP: Network Datasets: Gowalla. Available online: http://snap.stanford.edu/data/loc-gowalla.html (accessed on 17 January 2017).

## Share and Cite

## Article Metrics

Article access statistics, further information, mdpi initiatives, follow mdpi.

Subscribe to receive issue release notifications and newsletters from MDPI journals

## Stack Exchange Network

Connect and share knowledge within a single location that is structured and easy to search.

## Is there a greedy algorithm to solve the assignment problem?

The assignment problem is defined as:

The commonly used solution is the Hungarian algorithm, see

## Your Answer

Sign up or log in, post as a guest.

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

## Not the answer you're looking for? Browse other questions tagged algorithms greedy-algorithms assignment-problem or ask your own question .

- Upcoming Events
- 2023 Community Moderator Election ends in 8 days
- Featured on Meta
- We've added a "Necessary cookies only" option to the cookie consent popup
- The Stack Exchange reputation system: What's working? What's not?
- 2023 Community Moderator Election
- 2023 Moderator Election Q&A – Question Collection

## Hot Network Questions

- How can I protect /dev/sdX against accidental formatting?
- Theoretical Computer Science vs other Sciences?
- Are there 2 Parkruns close enough together with a large enough start time difference such that one could run both on one day?
- Is there a RAW or optional rule for how a player could discover what type of skill check needs to be made?
- Can the positive root of this polynomial be expressed elementarily?
- Detecting the version of i486 CPU
- What filter is used on this image?
- Finding a career as a researcher without any PhD, work experience, and/or relevant academic degree
- How was altitude calculated before the invention of the altimeter?
- Is cross examination strictly confined to the subjects that the original examination pertained to, or can the opposing party make their own points?
- In Acts 8:32–33 was the Ethiopian eunuch reading a Septuagint scroll or a Hebrew scroll?
- Why Hegel thinks that A and not-A will entail each other?
- Clarifications on the Eversmoking Bottle 5e
- Applying geometry nodes doesn't work on a curve object
- Can we explain why using `Nothing` twice on a list does not operate twice?
- Is the cabin pressure "worse" at the back of the cabin than in front?
- How can I make the rules of my Faerie Portal free from contradiction?
- Find replacement HVAC transformer
- Did any storylines or content from The Clone Wars exist prior to its broadcasting?
- Truncated floor symbol
- What is the velocity in the Lorentz equation relative to when considering a vacuum?
- On top of itself
- I need to have each line of a file run in a subshell of its own
- Best practices Use == or isSameDay apex date

## IMAGES

## VIDEO

## COMMENTS

There is an algorithm that optimally solves the problem with time complexity O((n ⋅log(max p j))k) for some fixed k. NP-hard in the ordinary sense (pseudo polynomial time complexity): The problem cannot be optimally solved by an algorithm with polynomial time complexity but with an algorithm of time complexity O((n ⋅max p j)k).

Step 4: Since we only need 2 lines to cover all zeroes, we have NOT found the optimal assignment. Step 5: We subtract the smallest uncovered entry from all uncovered rows. Smallest entry is 500. -500 0 2000 -500 1500 500 0 0 0 Then we add the smallest entry to all covered columns, we get 0 0 2000 0 1500 500 500 0 0 Now we return to Step 3:.

The assignment problem consists of finding, in a weightedbipartite graph, a matchingof a given size, in which the sum of weights of the edges is minimum. If the numbers of agents and tasks are equal, then the problem is called balanced assignment. Otherwise, it is called unbalanced assignment.[1]

The problem is NP-hard, at least for a particular simplified configuration. Assume that each m l is effectively infinite - we can scan a particular libraries' books all on the day we get access. Let all d l = 1 - each library takes one day to get access to, meaning we get access to exactly n libraries.

Many scheduling problems can be solved using greedy algorithms. Problem statement: Given N events with their starting and ending times, find a schedule that includes as many events as possible. It is not possible to select an event partially. Consider the below events: In this case, the maximum number of events is two.

The basic form of the problem of scheduling jobs with multiple (M) operations, over M machines, such that all of the first operations must be done on the first machine, all of the second operations on the second, etc., and a single job cannot be performed in parallel, is known as the flow-shop schedulingproblem.

change that solution by just changing a few assignments and recalculate the ponderation if 2. is better than 1. and repeat starting with 2. as the root solution if you're blocked, you can "visit" other solutions by making important changes to the initial solution. Share Improve this answer Follow answered Oct 20, 2009 at 22:03 Vladimir

Fig. 2: An example of the greedy algorithm for interval scheduling. The nal schedule is f1;4;7g. Second, we consider optimality. The proof's structure is worth noting, because it is common to many correctness proofs for greedy algorithms. It begins by considering an arbitrary solution, which may assume to be an optimal solution.

3.2 Minimum Makespan Scheduling A central problem in scheduling theory is to design a schedule such that the last nishing time of the given jobs (also called makespan) is minimized. This problem is called the minimum makespan scheduling. Problem De nition Given processing times for n jobs, p1;p2;:::;pn, and an integer m, nd an assignment of the ...

This is a mapping problem: you need to map to every hour in a week and every teacher an activity (teach to a certain class or free hour ). Split the problem: Create the list of teachers, classes and preferences then let the user populate some of the preferences on a map to have as a starting point.

The Restricted Assignment Scheduling Problem (RASP), the problem that was proposed by Bertogna () as an example of the kinds of complex multiprocessor scheduling problems that arise in the analysis of modern safety-critical real-time systems, may be described in the following manner.We have a real-time workload that is modeled as a directed acyclic graph \(G=(V,E)\), in which the vertices ...

diﬀerent subproblems: course timetabling, class-teacher timetabling, student scheduling, teacher assignment, and classroom assignment. This paper focuses primarily on the teacher assignment problem.

In the genetic algorithm solution, the problem is being broken down into 2 sections i.e. a) The assignment of teachers to each subject of each class since each subject of each class can only be taught by 1 teacher as in Rule 5. b)The assignment of classes to each class.

Optimization problems are ubiquitous in logistics, where the scheduling, sequencing and assignment of activities and resources have a significant impact on operational efficiency. These optimization problems are encountered across the entirety of the modern supply chain: sequencing orders on production lines, scheduling cranes in container ...

Key words: Approximation algorithms, generalized assignment problem, scheduling unrelated parallel machines. 1. Introduction The generalized assignment problem can be viewed as the following problem of scheduling parallel machines with costs. Each of n independent jobs is to be processed by exactly one

Genetic algorithms are known to give the best solutions to such problems. The purpose of this paper is to propound a solution to a job scheduling problem using genetic algorithms. The experimental results show that the most important factor on the time complexity of the algorithm is the size of the population and the number of generations.

Assignment. Assignment problems involve assigning a group of agents (say, workers or machines) to a set of tasks, where there is a fixed cost for assigning each agent to a specific task. The problem is to find the assignment with the least total cost. Assignment problems are actually a special case of network flow problems. Learn more about ...

To solve the previous problem, we developed a new method, i.e., the multi-objective task scheduling optimization (MOTSO) model that consists of two algorithms, namely, the multi-objective particle swarm optimization (MOPSO) algorithm with our fitness function Alabbadi, et al. and the ranking strategy algorithm based on the task entropy concept ...

2. The answer of your post question (already given in Yuval comment) is that there is no greedy techniques providing you the optimal answer to an assignment problem. The commonly used solution is the Hungarian algorithm, see. Harold W. Kuhn, "The Hungarian Method for the assignment problem", Naval Research Logistics Quarterly, 2: 83-97, 1955.