matching algorithm.. PHP Watch

blueRo
Badges: 0
Rep:
?
#1
Report Thread starter 7 years ago
#1
hi all,,
in my graduation project, i have to use matching between two ranked lists,
one for student, he choose 6 wanted project (by rank), that he want to assign,
and the other list is for the project, where the supervisor can choose 6 student (by rank)..
then after all choices done, start matching algorithm between the two lists.

there is an algorithm done by
but i don't knw if it help in my project or not..
- is this algo depends on stable marriage algorithm?
- can i find any thing help me understand the algo ?
-also how can i write it in PHP..


Code:
assign each student to be free;
assign each project and lecturer to be totally unsubscribed;
while (some student si is free) and (si has a non-empty list) {
pj = ?rst project on si ’s list;
lk = lecturer who o?ers pj ;
/* si applies to pj */
provisionally assign si to pj ;
/* and to lk */
if (pj is over-subscribed) {
sr = worst student assigned to pj ;
/* according to Lj */
k
break provisional assignment between sr and pj ;
}
else if (lk is over-subscribed) {
sr = worst student assigned to lk ;
pt = project assigned sr ;
break provisional assignment between sr and pt ;
}
if (pj is full) {
sr = worst student assigned to pj ;
/* according to Lj */
k
j
for (each successor st of sr on Lk )
delete the pair (st , pj );
}
if (lk is full) {
sr = worst student assigned to lk ;
for (each successor st of sr on Lk )
for (each project pu ? Pk ? At )
delete the pair (st , pu );
}
}

Thanxx
0
reply
INTit
Badges: 17
Rep:
?
#2
Report 7 years ago
#2
Sorry but your post sounds like one of those computer generated spam emails that try to get past the junk filters.

Try again.
1
reply
roblee
Badges: 2
Rep:
?
#3
Report 7 years ago
#3
(Original post by blueRo)
hi all,,
in my graduation project, i have to use matching between two ranked lists,
one for student, he choose 6 wanted project (by rank), that he want to assign,
and the other list is for the project, where the supervisor can choose 6 student (by rank)..
then after all choices done, start matching algorithm between the two lists.

there is an algorithm done by
but i don't knw if it help in my project or not..
- is this algo depends on stable marriage algorithm?
- can i find any thing help me understand the algo ?
-also how can i write it in PHP..

Thanxx
Your pseudocode being quite obfuscated and otherwise viciously hard to read makes it difficult to tell if that's a valid algorithm (are you saying you got it from somewhere else?)

If it is known to be valid, it looks like the rank ordering algorithm described and explained here (which, yes, is a generalisation of one of the stable marriages algorithms). It'd certainly be worth checking the link and corresponding wikipedia article out.

Sorry for the late reply, I'd assumed that somebody more qualified than me might have shown up before now and given a more authoritative response :rolleyes:

EDIT: Also after consideration, a suggestion: In future, ask at StackOverflow. You'll get higher levels of answer there.
0
reply
blueRo
Badges: 0
Rep:
?
#4
Report Thread starter 7 years ago
#4
yes i got it from :
Algorithms for the Student-Project Allocation Problem
"Abraham,D.J. Irving,R.W. Manlove,D.F. "

http://eprints.gla.ac.uk/1034/

"sorry i forget to say this",

what am saying that i have read the hole algorithm with its description, but i still dont knw how to implement it, and where it can be really used ..!

any help resources?
0
reply
roblee
Badges: 2
Rep:
?
#5
Report 7 years ago
#5
This is a specific problem not encountered very often, so one would be hard-pressed to find help on the subject.

Having looked at the notes: If you don't know how to go about this, write a stable marriage solver first and generalise from there using the notes as a reference. The difference between the two algorithms is very small.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Brexit: Given the chance now, would you vote leave or remain?

Remain (1336)
79.67%
Leave (341)
20.33%

Watched Threads

View All
Latest
My Feed