Tideman Testing

Start editing to see some magic happen!




Ballot #1:
ranks=[0,1,2]
Ballot #2:
ranks=[0,1,2]
Ballot #3:
ranks=[0,1,2]

Ranks matrix

012
012
012

Preferences matrix

033
003
000

Pairs

(0, 1) (0, 2) (1, 2)

Sorted Pairs

(0, 1) (0, 2) (1, 2)
Important: your sorted pairs may look slightly different, depending on sorting method you applied, because tied pairs are actually not sorted, as per problem specification.

Locked matrix

011
001
000

Winner

Alice

Graph

Red edges *not* locked, because they would create circle. Graph is interactive…

Testing in cs50 IDE

Copy the below into a file data.txt (including the last line-break character!)

3
Alice
Bob
Charlie
Alice
Bob
Charlie
Alice
Bob
Charlie
 

and then run the following command
./tideman Alice Bob Charlie < data.txt

Brought to you by Josef Richter
Created with React & TypeScript in Codesandbox.io

See Tideman description here

Big Thanks

to prof. David Malan & whole cs50 staff!