Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Help with problem

Name: Anonymous 2010-10-20 20:42

I'm trying to do a problem but I'm stuck
How do you determine the number of ties that occurred given the number of teams in a competition, the number of games played, and the score each team has after that number of games. A victory is worth 3 points, a tie worth 1 point and a loss no points.
An example with 3 teams after 3 games:
Team A has 5 points, Team B has 1, Team C has 1.

Name: Anonymous 2010-10-20 20:56

Less of this.

Name: Anonymous 2010-10-20 23:56

More of &this

Name: Anonymous 2010-10-21 3:50

import this

Name: Anonymous 2010-10-21 4:46

What king of retarted league is that?

A must've played 3 games, winning 1 and drawing 2 (once against B, once against C)

One of B of C has played 2 games (both against A!), and the other only 1.

The schedule-maker for that league should be shot

Name: Anonymous 2010-10-21 6:02

>>1
score = (1 + 1) * nties + (3 + 0) * (ngames - nties)
nties = 3 * ngames - score
I leave calculating 3 * 3 - 7 as an exercise for the reader.

[b][u]FIFTH GRADE QUALITY PROBLEM[/b][/u]. The interesting question is: do five graders now hang out on /prog/, or have the US education system gave up completely?

Name: Anonymous 2010-10-21 6:27

I suggest an exhaustive search algorithm.

For a given number of games, assume zero ties and iterate attempting one more tie until the solution is found.

On each iteration, for each team, assume their score is completely the result of ties. Check all teams. If you run out of ties, start assuming the first team that has three or more points got a victory. Check again. If it doesn't match, increase the number of victories until possible. Then start doing the same with the second team that has three or more points, but this time test all possibilities of the first team while checking every possibility of this second team. Do this until you run out of teams (if you're doing it correctly, every time you check a new team the number of possibilities to check should have grown exponentially).

Once you rule out an hypothesis, it's time for the outer iteration outlined in paragraph two. This is sure to find the solution. If you suspect there might be no solution, check that the number of ties doesn't exceed the number of games.

Name: Anonymous 2010-10-21 6:31

Are you telling me you're unable to solve a simple diophantine equation?

Leave /prog/ rigth now.

Name: Anonymous 2010-10-21 7:25

>>8
rigth
( ≖‿≖)

Name: Anonymous 2010-10-21 9:00

>>9
Lenght or heigth?

Name: jews 2010-10-21 10:03

VIPPER

Name: sage 2010-10-21 12:20

Name: Anonymous 2012-01-31 5:16

'check my binary tripz

Name: Anonymous 2013-01-19 0:19

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List