Rencontre en tournoi

Discussion en Français sur NeoBook

Moderator: Neosoft Support

Locked
User avatar
Pilou
Posts: 546
Joined: Sun Oct 16, 2005 4:17 pm
Contact:

Rencontre en tournoi

Post by Pilou »

Bonjour à la communauté néobook.

Besoin d'aide merci par avance.

Voila ma demande !

J'ai cinquante équipes pour un tournoi (1.....50)
Il faut que chaque équipe se rencontre 1 fois

Avez-vous une solution

Pilou
User avatar
dpayer
Posts: 1394
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Rencontre en tournoi

Post by dpayer »

Are there limits (by location of the tournament or by time) that must be considered?

Example: will this entire tournament be done in one afternoon? Or can it take weeks?

Are there a limited number of places (like a soccer field) where the tournament games can be performed?

How long does each "competition" take? One hour? 10 minutes?

I think we must consider such things before devising a method for each of 50 teams to meet.

Sounds interesting!

David P.
David Payer
Des Moines, Iowa
USA
User avatar
Pilou
Posts: 546
Joined: Sun Oct 16, 2005 4:17 pm
Contact:

Re: Rencontre en tournoi

Post by Pilou »

Bonjour Dpayer !

Non aucun critère juste une base de donnée

Equipe 1 équipe 2 .... équipe15..... équipe 50

Et que chaque équipe se rencontre dans le tournoi pour faire 1 match ensemble.

Merci

Pilou

traduction gooogle


Hello Dpayer!

Not just any standard database

Team 1 Team 2 Team .... équipe15 ..... 50

And that each team meets in the tournament to one game together.

thank you

Pilou
User avatar
neobook84
Posts: 85
Joined: Wed Feb 25, 2009 3:55 am
Location: Vaucluse (France)
Contact:

Re: Rencontre en tournoi

Post by neobook84 »

Regarde ce lien ... c'est pas du neobook mais bon, si ça peut t'aider ...

http://www.commentcamarche.net/forum/af ... quipes#top
User avatar
Pilou
Posts: 546
Joined: Sun Oct 16, 2005 4:17 pm
Contact:

Re: Rencontre en tournoi

Post by Pilou »

Salut néobook84

Merci pour ce lien hélas je n'ai pas trouvé mon bonheur.

J'ai besoin juste que les équipes jouent tous un mach entre eux pas d'élimination d'équipe !
un tournoi de 30 voir plus l 'équipe 1 contre la 2ème puis cette équipe rencontre la 3ème que la 2ème rencontre la 4ème mais aussi la 3ème etc... pour toutes les équipes.

Merci quand même pour ta proposition.

pilou
AlfB
Posts: 132
Joined: Sun Apr 03, 2005 12:43 am

Re: Rencontre en tournoi

Post by AlfB »

Salut Pilou,

je pense que tu trouveras la solution pour ton problème ici

http://fr.wikipedia.org/wiki/Tournoi_toutes_rondes

Moi aussi, je serais interessé pour ta solution :P

mes 2 cents d'euro

ALF
User avatar
dpayer
Posts: 1394
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Rencontre en tournoi

Post by dpayer »

AlfB wrote:Salut Pilou,

je pense que tu trouveras la solution pour ton problème ici

http://fr.wikipedia.org/wiki/Tournoi_toutes_rondes

Moi aussi, je serais interessé pour ta solution :P

mes 2 cents d'euro

ALF
The number of possibilities for matches gets quite large if you do not do eliminations.

I have been thinking about this one and I have mapped out a strategy but the coding would take me a bit of time. Matches are always between 2 teams, The number of matches will follow this formula:
n=number of teams

(n/2)^2 +2(n/4)^2 + 4(n/8)^2 + 8(n/16)^2 + 16(n/32)^2 +32(n/64)^2 = total number of matches (based on 50 teams)

Your number of teams for this calculation will always round up to the next near multiple of 2. This is because you do not have exact multiples of 2 in your total number of teams and therefore there will always be "bye" games where one team does not play a match when others do. So for you, 50 'rounds up' to 64

1024 + 512 + 256 + 128 + 64 + 32 = 2016 matches (includes all 'bye' matches - those with only one team in the slot so no actual competition)

If you only had 20 teams, you would 'round up' to 32
(n/2)^2 +2(n/4)^2 + 4(n/8)^2 + 8(n/16)^2 + 16(n/32)^2
or
256 + 128 + 64 + 32 + 16 = 496

So... for curiosity sake I will continue with this to make a more comprehensive formula. My math skills are a bit rusty. :)

I will look for a way to remove the bye matches from the calculation.

David P.
David Payer
Des Moines, Iowa
USA
AlfB
Posts: 132
Joined: Sun Apr 03, 2005 12:43 am

Re: Rencontre en tournoi

Post by AlfB »

the formula for the number of matches in round robin systems is

n*(n-1)/2

which in the case of 50 teams should be 1225 matches. But Pilou looks for a method to find the table of matches as far as I've understood.

la formule de nombre de parties est n*(n-1)/2 ce qui donne avec 50 joueurs 1225 parties. mais Pilou cherche une possibilité de trouver l'ordre des parties pour chaque tour du tournois, n'est-ce pas?

ALF
User avatar
Pilou
Posts: 546
Joined: Sun Oct 16, 2005 4:17 pm
Contact:

Re: Rencontre en tournoi

Post by Pilou »

Bonjour
Exact AlfB
(Pilou cherche une possibilité de trouver l'ordre des parties pour chaque tour du tournois.)
Par contre 35 équipes c'est déjà pas mal.

pilou
AlfB
Posts: 132
Joined: Sun Apr 03, 2005 12:43 am

Re: Rencontre en tournoi

Post by AlfB »

Salut Pilou,
ce weekend j'ai essayé de trouver une simple solution pour 8 joueurs, mais à mon avis c'est pas trop compliqué d'adapter pour toi.

Code: Select all

NBW Publication Source File
(C)2014 NeoSoft Corp.
Title=Untitled NeoBook Publication
Language=US
NeoBookVer=5.80
ScreenColors=16777216
ScreenWidth=640
ScreenHeight=480
BkndColor=0
ScreenAutoSize=Yes
LinkColor=16711680
WindowStyle=0
WindowOrder=0
WindowPos=0
WindowProps=31
BiDiMode=0
UseUpdateTimer=Yes
ReturnTime=60
StartupAction=FileExists "[pubdir]roundrobin.txt" "[isfile]"¶¶if "[isfile]" "=" "true"¶   FileErase "[pubdir]roundrobin.txt"¶endif¶.. ici tu peux ajouter le chiffre de participants¶setvar "notour" "1"¶setvar "nom1" "joueur1"¶setvar "nom2" "joueur2"¶setvar "nom3" "joueur3"¶setvar "nom4" "joueur4"¶setvar "nom5" "joueur5"¶setvar "nom6" "joueur6"¶setvar "nom7" "joueur7"¶setvar "nom8" "joueur8"¶.. ou tu programmes une routine entrée texte avec loop¶.. tu peux aussi remplir les valiables nom à partir d'un fichier
ShapeTransColor=536870912
SplashProps=3
CompileType=0
MediaType=0
FilesIncluded=1
FontsIncluded=2
CopyExternalFiles=No
SetupMedia=3
SetupInstDir=C:\MyProgram
SetupTitle=Setup
SetupColors=16711680|0|65535
Variables=[1]¶[extra]¶[nom1]¶[nom2]¶[nom3]¶[nom4]¶[nom5]¶[nom6]¶[nom7]¶[nom8]¶[notour]¶
VersionMajor=1
VersionMinor=0
VersionRelease=0
VersionBuild=0
ReqExLevel=1
CustomFontName=Arial
CustomFontSize=9
CustomFontStyle=0
CustomCharset=1
CacheSize=30
ExtractOp=132
L_OK=OK
L_CANCEL=Cancel
L_YES=Yes
L_NO=No
L_CLOSE=Close
L_ERRORTITLE=Error
L_FINDTITLE=Find
L_FINDPROMPT=Find &What
L_FINDFIRST=&Find First
L_FINDNEXT=Find &Next
L_FINDERROR=Search text not found.
L_PWORDTITLE=Password required
L_PWORDMSG=Before continuing, you must first|enter the correct password.
L_PWORDPROMPT=&Password:
L_PWORDERROR=That's not the right password!
L_MEDIAERROR=In order to play this type of file you must install|the appropriate multimedia hardware and/or|software.
L_INTERNETERROR=Unable to locate Internet Browser software.
L_ABORTFUNCTION=Do you want to cancel this function?
L_EXTRACTERROR=This file could not be extracted and cannot be played.
L_INSTDIRPROMPT=Please enter the drive and directory where you would like this program to be installed. To accept the default drive and directory, simply press Enter.
L_INSTFOLDERPROMPT=Do you wish to create a program folder?
L_INSTRUNPROMPT=Do you want to run
L_INSTDISKPROMPT=Please insert disk #
L_INSTDISKERROR=That's not the correct disk, try again.
L_INSTGENERROR=The installation has terminated.
L_INSTEXITPROMPT=Do you really want to cancel the installation?
L_INSTWINTITLE=Setup
L_INSTPROGTITLE=Extracting Files...
L_SENDEMAIL=Sending Mail...
L_MAILSERVER=Please enter the name of your outgoing email server:
L_COPY=Copy to Clipboard
L_SELECTALL=Select All
L_DONWLOADFILE=Downloading: %s
L_PLEASEWAIT=Please wait...
TrayMenuBegin
MenuName=TrayOpen
MenuText=Open
MenuState=3
MenuKey=0
MenuAction=SetVar "[WindowState]" "Normal"
MenuName=TrayExit
MenuText=Exit
MenuState=3
MenuKey=0
MenuAction=Exit "" ""
MenuEnd
MasterPage
NewPage=New Page
PageStyle=0
PageColor=16777215
PageGradient1=16711680
PageGradient2=255
PageGradientDir=1
WallpaperStyle=0
EffectSpeed=0
ObjectType=3
Name=PushButton1
X=50
Y=68
W=49
H=55
Anchor=0
Text=[nom1]
Align=2
ImageStyle=0
ObjAction=Nom[1]
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16711935
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=10
ObjectType=3
Name=PushButton2
X=109
Y=68
W=49
H=55
Anchor=0
Text=[nom2]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=65280
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=9
ObjectType=3
Name=PushButton3
X=170
Y=68
W=49
H=55
Anchor=0
Text=[nom3]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=65535
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=8
ObjectType=3
Name=PushButton4
X=231
Y=68
W=49
H=55
Anchor=0
Text=[nom4]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16776960
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=7
ObjectType=3
Name=PushButton5
X=50
Y=138
W=49
H=55
Anchor=0
Text=[nom8]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16711935
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=6
ObjectType=3
Name=PushButton6
X=110
Y=137
W=49
H=55
Anchor=0
Text=[nom7]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=65280
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=5
ObjectType=3
Name=PushButton7
X=171
Y=137
W=49
H=55
Anchor=0
Text=[nom6]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=65535
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=4
ObjectType=3
Name=PushButton8
X=232
Y=137
W=49
H=55
Anchor=0
Text=[nom5]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16776960
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=3
ObjectType=3
Name=PushButton9
X=295
Y=107
W=49
H=55
Anchor=0
Text=[extra]
Align=2
ImageStyle=0
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=2
ObjectType=3
Name=PushButton10
X=377
Y=276
W=188
H=75
Anchor=0
Text=Prochain Tour
Align=2
ImageStyle=0
ObjAction=.. tu écris les tours suivants ici¶FileWrite "[pubdir]roundrobin.txt" "Append" "[notour]"¶FileWrite "[pubdir]roundrobin.txt" "Append" "[nom1] vs. [nom8]"¶FileWrite "[pubdir]roundrobin.txt" "Append" "[nom2] vs. [nom7]"¶FileWrite "[pubdir]roundrobin.txt" "Append" "[nom3] vs. [nom6]"¶FileWrite "[pubdir]roundrobin.txt" "Append" "[nom4] vs. [nom5]"¶FileWrite "[pubdir]roundrobin.txt" "Append" "-----------------"¶.. pour compter jusqu'au nombre des participants¶setvar "[notour]" "[notour]+1"¶.. si tu as 50 joueurs tu mets 50 ici¶if "[notour]" "=" "8"¶   MessageBox "Fin du Tournoi" "C'est fini!" "ok" ""¶   FileWrite "[pubdir]roundrobin.txt" "Append" "-- fin du tournoi --"¶   Exit "" ""¶   ¶endif¶.. ici il faut ajouter jusqu'au nombre des joueurs,¶.. la dernière ligne étant pour example setvar "[nom50]" "[extra]"¶setvar "[extra]" "[nom2]"¶setvar "[nom2]" "[nom3]"¶setvar "[nom3]" "[nom4]"¶setvar "[nom4]" "[nom5]"¶setvar "[nom5]" "[nom6]"¶setvar "[nom6]" "[nom7]"¶setvar "[nom7]" "[nom8]"¶setvar "[nom8]" "[extra]"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=11
ObjectType=8
Name=Text1
X=47
Y=216
W=288
H=245
Anchor=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
Text={\rtf1\ansi\deff0\deftab254{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\pard{\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs28\cf0 Parties dans tour [notour]\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs28\cf0 \par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs28\cf0 [nom1] vs. [nom8]\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs28\cf0 [nom2] vs. [nom7]\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs28\cf0 [nom3] vs. [nom6]\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs28\cf0 [nom4] vs. [nom5]\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 ajouter les autres parties nom6 ... nom50\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 en changeant nom8 vers nom 50 etc\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 le systh\'e8me est le suivant:\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 1 vs 50\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 2 vs 49\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 3 vs 48  etc...}}}
HMargin=4
VMargin=4
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=1
TabOrder=12
ObjectType=8
Name=Text2
X=384
Y=103
W=202
H=72
Anchor=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
Text={\rtf1\ansi\deff0\deftab254{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\pard{\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs48\cf0 TOUR [notour]}}}
HMargin=4
VMargin=4
LineColor=0
LineWidth=0
LineStyle=0
FillColor=12632256
FillPattern=1
TabOrder=13
ObjectType=8
Name=Text3
X=377
Y=368
W=231
H=86
Anchor=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
Text={\rtf1\ansi\deff0\deftab254{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\pard{\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 regarde les actions dans ce bouton!\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 ici se d\'e9roulent toutes les calculations\par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 \par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 tu trouves le tournoi complet dans \par\ql\li0\fi0\ri0\sb0\sl\sa0 \plain\f0\fs20\cf0 le fichier roundrobin.txt}}}
HMargin=4
VMargin=4
LineColor=0
LineWidth=0
LineStyle=0
FillColor=12632256
FillPattern=1
TabOrder=14
J'espère que ca marche pour toi.

mes 2 cts. d'euro

ALF
User avatar
Pilou
Posts: 546
Joined: Sun Oct 16, 2005 4:17 pm
Contact:

Re: Rencontre en tournoi

Post by Pilou »

bonjour alfb

Peux tu me faire la pub directe depuis bien longtemps mon pc ne peux plus lire les codes pubs .

merci beaucoup

pilou
User avatar
Pilou
Posts: 546
Joined: Sun Oct 16, 2005 4:17 pm
Contact:

Re: Rencontre en tournoi

Post by Pilou »

Merci je te tiens au courant

pilou
PhilGard
Posts: 132
Joined: Sat Feb 16, 2008 2:25 pm

Re: Rencontre en tournoi

Post by PhilGard »

Bonjour.
En revenant faire un tour sur le forum...
Je remonte ce post au cas où....
Voilà ma solution :

SetVar "[ComptA]" "0"
SetVar "[ComptB]" "1"
While "[ComptA]" "<" "49"
SetVar "[ComptA]" "[ComptA]+1"
SetVar "[ComptB]" "[ComptA]"
While "[ComptB]" "<" "50"
SetVar "[ComptB]" "[ComptB]+1"
FileWrite "[PubDir]Resultat.txt" "Append" "[ComptA]-[ComptB] / "
EndWhile
EndWhile
TextWindow "" "-1" "-1" "-1" "-1" "[PubDir]Resultat.txt" "Wordwrap"

Tu peux remplacer le 50 par 1000, 5000 enfin ce que tu veux :lol:.
Et le 49 par 1 de moins que le chiffre mis à la place du 50...
50 étant le nombre d'inscrits dans le tournoi.

Bonne soirée.

Phil.
User avatar
Pilou
Posts: 546
Joined: Sun Oct 16, 2005 4:17 pm
Contact:

Re: Rencontre en tournoi

Post by Pilou »

Merci philgard
.
ALFB ma donné la solution merci à vous deux pour votre participation
Locked