ANALYSIS of ALGORITHMS, Bulletin Board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

my..sleeplessness



I have a study programme requirement says that" take any
course(s) such that the sum of the credit hours of the taken
courses equal to or greater than the total credit hours of
the requirement".
description
The total credit hours of the requirement is  R credit
hours,
each course has its own credit hours,
the list of taken passed courses may be like this:
{courseA 2 cr, courseB 3cr, courseC 2cr, courseD 4cr,
 courseE 4cr, courseF 3cr, courseG  1cr,courseI 6cr}.
OR
{courseA 3cr, courseB 2cr,courseE 1cr}.
i.e I cant not  expect what are the elements of the list
exactly.


.......
NOTICE
------------
1- a course in the list  is unique.
2- two or more courses in the list may have the same credit
hours.
3- min credit hours of a course is 1credit hour.
4- max credit hours of a course is 7 credit hours.
5- i.e any course has credit hours in {1,2,3,4,5,6,7}.
6- the list of taken courses is finite.
7- no dependency between courses.

THE QUESTION IS:
-------------------------
"select one or  more course(s) from the list of courses such
that the sum of the credit hours of the selected courses is
equal to or greater than   (R) , the total  requirement
credit hours".
i.e i want to satisfy the requirement  R credit hours  with
courses from the list.
------------------------------------------------------------------------------------------------

I want to formulate this problem,,
I search for an algorithm to solve it.
I ask for source code to implement it in any computer
langauge.
I THANK YOU WITH LOL.
-----------------------------------------------------------------fawzy
mustafa..analyst...



Date Prev | Date Next | Date Index | Thread Index