BEST PHP script to select the best 1000 combinations of elements based on some constraints (maybe linear programming and/or sort algorithm is needed)

  • Status: Pending
  • Prize: $25
  • Entries Received: 5
  • Winner: vhts09

Contest Brief

The winner of this contest would be the BEST PHP Script in terms of efficiency. I will test every PHP Script locally and will measure processing time and number of iterations.

From a list of elements with a Type (W,X,Y,Z), Color (C1-C20), Token value (from 38 to 123) and an estimated Weight (from 0-11.73) for each of  7 runs; a combination of 15 elements would be selected  

The four lighter (less Weight value) elements of each run would be not counted. The Heaviest element of each run value would be doubled. The sum of all values would be the final weight of the combination.

Sum of Tokens <= 1000
SameColorElementsInCombination <= 3
Quantity of Elements Type W in combination = 2
Quantity of Elements Type X in combination  = 5  
Quantity of Elements Type Yin combination = 5 
Quantity of Elements Type Zin combination = 3  
Quantity of Elements Type W in run = 1  
Quantity of Elements Type X in run  >=3 and <=5
Quantity of Elements Type Y in run  >=2 and <=5
Quantity of Elements Type Z in run  >=1 and <=3

Recommended Skills

Top entries from this contest

View More Entries

Public Clarification Board

  • Arunsh89
    • 1 year ago

    plz wait i m still working on it yet!

    • 1 year ago
    1. juanjodelagarza
      Contest Holder
      • 1 year ago


      • 1 year ago

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!