Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 2254. Possible Opponents Matrix for single-elimination tournament

Created by Paul Berglund

It's tournament time!

Given a single-elimination tournament with 2^N competitors, compute the 2^N by 2^N matrix M such that M(i,j)=1 iff competitor i might play competitor j in round R, where 1<=R<=N. (In each round each surviving competitor plays his "next door neighbor" in the bracket.)

For example, if N=1, R=1 then

 M =
   [ 0 1
     1 0]

or if N=2, R=2 then

 M = 
   [ 0 0 1 1 
     0 0 1 1
     1 1 0 0 
     1 1 0 0 ]

Tags

Problem Group

Solution Statistics

9 correct solutions 0 incorrect solutions
Last solution submitted on Sep 18, 2014

Problem Comments