Find Jobs
Hire Freelancers

Solve the K-Server problem using dynamic programming using Xlib for when K=3.

$10-30 USD

Pågår
Lagt ut over 7 år siden

$10-30 USD

Betalt ved levering
The aim of this project is to model an instance of the k-server problem for three servers with input given from the screen. Initially the servers are located at the top left corner (yellow), top right (red) and middle of the bottom line (blue). The user specifies a sequence of request points by left mouseclicks in the window, terminated by a right mouseclick. You show after each mouseclick a strategy of your choice (in thin yellow/red/blue lines) then after the final right mouseclick you compute and display the optimal strategy (in thick yellow/red/blue lines). Your program then prints (to stdout) the total length of both strategies, and the competitiveness ratio that you achieved. You can find the optimal strategy by a dynamic-programming type argument: If the input sequence was n request points long (p1,...,pn), you create an n × n × n × n array; the entry cost[i][j][k][t] is the cost of the cheapest sequence of moves that starts at the given starting positions and serves the requests up to time step t, and ends up with the yellow server at pi, the red server at pj, and the blue server at pk. One of ijk must be t, since the last request at pt was served, all other table entries have cost ∞. Any possible table entry must have been reached by moving one of the three servers from a position at step t − 1. The attached file is a sample project using xlib written in C. The project should model the attached sample project
Prosjekt-ID: 12265380

Om prosjektet

1 forslag
Eksternt prosjekt
Aktiv 7 år siden

Ønsker du å tjene penger?

Fordeler med budgivning på Freelancer

Angi budsjettet og tidsrammen
Få betalt for arbeidet ditt
Skisser forslaget ditt
Det er gratis å registrere seg og by på jobber

Om klienten

UNITED STATESs flagg
Lake's Bay, United States
5,0
2
Betalingsmetode bekreftet
Medlem siden des. 2, 2016

Klientbekreftelse

Takk! Vi har sendt deg en lenke for at du skal kunne kreve din gratis kreditt.
Noe gikk galt. Vær så snill, prøv på nytt.
Registrerte brukere Publiserte jobber
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Forhåndsvisning innlasting
Tillatelse gitt for geolokalisering.
Påloggingsøkten din er utløpt og du har blitt logget ut. Logg på igjen.