Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 640393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:56:54+00:00 2026-05-13T20:56:54+00:00

Assume that a task exists with two attributes: priority and due date. Priority p

  • 0

Assume that a task exists with two attributes: priority and due date.

Priority p is a numeric value. The priority importance increases to infinity, meaning that 5 is a priority higher than 4. Priority 0 is normal priority.

Due date d is a date in the past or in the future, when compared with the current date. A d date before now is more important than a date in the future.

The idea is to combine these two
attributes, priority and due date,
according to the rules above, in order
to produce a numeric output that can
be used to order a list of tasks.

This should be possible to model as a math function but I am rusty, to say the least, in that field. I am even not convinced if it should be a 2D function or a 3D function.

I started by a 2D graph where x-axis is for priority and y-axis is for the difference between the current date and the due date.

  • The upper left quadrant A1 has due dates
    in the past and high priorities.
  • The upper right quadrant A2 has due dates in
    the future and high priorities.
  • The lower left quadrant A3 has due dates in
    the past and low priorities.
  • The lower right quadrant A4 has due dates in
    the future and low priorities.

Any guys with math knowledge that can throw a fee pointers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:56:54+00:00Added an answer on May 13, 2026 at 8:56 pm

    A simple linear function should do. Something based on 3 variables and one constant; something like

    CombinedPriority = k * (cd - d) + p
    

    Where k is a coefficient expressing the relative importance of the date vs. the priority value, and cd is the current date.

    How/why does this work?

    • (cd – d), expressed is day units, indicates how late (if positive) we are, or how many days we have left (if negative), relative to d. The bigger the value the more “blown” the delivery date; the smaller the value, the more time we have before it comes due.
    • k is used to “convert” this days-late-or-early value, in whatever rank units of the variable p.
    • take the sum of the two, and you have a rating value for a given task (i.e. a d and p value pair), relative to other tasks, for today (this will of course change tomorrow, as when we move in time, d matters more).

    Another, similar but less intuitively tractable approach is to increase the degree of the equation, to express the fact that, say, when we are two days late is the importance of the date should have a bigger impact on the CombinedPriority than when we are just one day late.
    The function would the look something like

     CombinedPriority = kd2 * ((cd - d) ^ 2)
                      + kd1 * (cd - d) 
                      + kp2 * (p^2)
                      + kp1 * p
    

    Where kd1, kd2, kp1, kp2 are constants, expressing the relative importance of the four elements of the addition. some of these constants may even be zero; in that sense, the first function is a particular case of the second function, one where
    kd2 = 0, kp2 = 0, kp1 = 1 and kd1 = k

    To summarize: the difficulty is not so much with the math per-se, but with defining a good set of constants which expresses the relative importance of d and p, and possibly the scale on which d and p are measured.
    The first function assumes that each of these two factor is on a linear scale (a job with p = 6 is twice as urgent as a job with p = 3, and/or a job 3 days late is three times as urgent as a job due yesterday etc.), whereby the second function allows the d and/or p factors to be on a quadratic scale.

    A tentative plan to help define the coefficient(s) is to:

    • first consider the p factor individually (as if the d factor didn’t exist). Only considering the p factor, how urgent is a job with p = 3 relative to a job with p = 6 (or p = 9) etc. ?.
    • second consider the d factor individually. (Similar to above: how urgent is a job which is due 5 days from now, relative to a job due tomorrow? Or a job due two days ago?
    • these two steps help define if any of the scales is not linear, and orient us toward a function or the another
    • then we’re just left defining the relative importance of the “normalized” p and d factors; this is done by tweaking the k (or kpn, kdn) constant(s).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 330k
  • Answers 330k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could check the userAgent like this: return navigator.userAgent.indexOf(\"Mac OS… May 14, 2026 at 2:34 am
  • Editorial Team
    Editorial Team added an answer That is an incorrect characterization of dependency injection. It is… May 14, 2026 at 2:34 am
  • Editorial Team
    Editorial Team added an answer With the Apache web server, you could use mod_rewrite to… May 14, 2026 at 2:34 am

Related Questions

I'm facing a problem which is probably extremely common in game-design. Let's assume that
For a FFT function I need to permutate or shuffle the elements within an
First of all, let's define a few tables: Users table will store information about
My goal is to write a program that handles an arbitrary number of tasks
I'm trying to learn JavaFX and maybe create a few learner games. I always

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.