Click here to Skip to main content
15,887,135 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Strict alternation Pin
Simon_Whale18-Aug-15 5:12
Simon_Whale18-Aug-15 5:12 
GeneralRe: Strict alternation Pin
Bowri18-Aug-15 7:14
Bowri18-Aug-15 7:14 
GeneralRe: Strict alternation Pin
Richard MacCutchan18-Aug-15 7:40
mveRichard MacCutchan18-Aug-15 7:40 
GeneralRe: Strict alternation Pin
Bowri18-Aug-15 18:11
Bowri18-Aug-15 18:11 
AnswerRe: Strict alternation Pin
Patrice T21-Aug-15 12:16
mvePatrice T21-Aug-15 12:16 
Questionl-Exclusion Pin
Bowri18-Aug-15 4:09
Bowri18-Aug-15 4:09 
SuggestionRe: l-Exclusion Pin
Richard MacCutchan18-Aug-15 6:39
mveRichard MacCutchan18-Aug-15 6:39 
GeneralRe: l-Exclusion Pin
Bowri18-Aug-15 7:17
Bowri18-Aug-15 7:17 
It is actually not a homework. I am trying to apply classic distributed algorithms in a peer-to-peer n player mobile game where each player plays only with one of the players who hasn't already lost in an earlier round to another player. A player who has lost waits until last player wins against runner-up , at which time all players are back in game, until then they need play proxy games with any other lost player to improve skills and ranking, but not get any points when the tournament restarts.

When there are is any player playing in tournament, the code looks like this :
for process i
while( 1)
{
while( games[i/2] != 0){}
enter critical section and play game;
games[i/2] <- 1; //assign to other player
//after m such rounds, if score of I is > score of I+1, I wins, else I+1 wins.

Scores for each round in a tournament is stored in a different file for each cycle of tournament and hence I need it to be accessible by only one player - winner or loser( winner is even and loser is assigned odd number and reordered after every round to determine ranking for next tournament round)
GeneralRe: l-Exclusion Pin
Richard MacCutchan18-Aug-15 7:38
mveRichard MacCutchan18-Aug-15 7:38 
GeneralRe: l-Exclusion Pin
Bowri18-Aug-15 18:10
Bowri18-Aug-15 18:10 
GeneralRe: l-Exclusion Pin
Richard MacCutchan18-Aug-15 21:49
mveRichard MacCutchan18-Aug-15 21:49 
QuestionCounting Semaphore Using Test&Set() Pin
Bowri18-Aug-15 4:08
Bowri18-Aug-15 4:08 
QuestionLENGTH of the maximum contiguous sum Pin
Member 1187537030-Jul-15 11:56
Member 1187537030-Jul-15 11:56 
GeneralRe: LENGTH of the maximum contiguous sum Pin
PIEBALDconsult30-Jul-15 12:06
mvePIEBALDconsult30-Jul-15 12:06 
GeneralRe: LENGTH of the maximum contiguous sum Pin
Member 1187537030-Jul-15 12:25
Member 1187537030-Jul-15 12:25 
GeneralRe: LENGTH of the maximum contiguous sum Pin
PIEBALDconsult30-Jul-15 12:33
mvePIEBALDconsult30-Jul-15 12:33 
GeneralRe: LENGTH of the maximum contiguous sum Pin
Member 1187537030-Jul-15 12:40
Member 1187537030-Jul-15 12:40 
GeneralRe: LENGTH of the maximum contiguous sum Pin
PIEBALDconsult30-Jul-15 13:14
mvePIEBALDconsult30-Jul-15 13:14 
GeneralRe: LENGTH of the maximum contiguous sum Pin
PIEBALDconsult30-Jul-15 18:21
mvePIEBALDconsult30-Jul-15 18:21 
GeneralRe: LENGTH of the maximum contiguous sum Pin
PIEBALDconsult31-Jul-15 5:34
mvePIEBALDconsult31-Jul-15 5:34 
Questiona special type of bin packing problem Pin
Cenator19-Jul-15 20:39
Cenator19-Jul-15 20:39 
AnswerRe: a special type of bin packing problem Pin
Richard MacCutchan19-Jul-15 21:47
mveRichard MacCutchan19-Jul-15 21:47 
GeneralRe: a special type of bin packing problem Pin
Cenator19-Jul-15 22:12
Cenator19-Jul-15 22:12 
GeneralRe: a special type of bin packing problem Pin
Richard MacCutchan19-Jul-15 22:23
mveRichard MacCutchan19-Jul-15 22:23 
GeneralRe: a special type of bin packing problem Pin
Cenator19-Jul-15 22:55
Cenator19-Jul-15 22:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.