Puzzle
5 minute read

Ponder This Challenge - June 2026 - The Superhero Team Movies

A certain comic book publisher holds the copyright for a certain superhero team, and wishes to create a movie franchise based on them. To minimize superhero fatigue with the audience, the movie franchise is planned ahead with the goal of having the minimum number of action sequences which cover all the possible superhero combinations.

Each superhero movie is built in the same manner: First, one hero appears and participates in an action sequence. Next, another hero joins them and the next action sequence contains both heroes, and so on. A movie need not contain all the heroes on the team.

As an example, assume the superhero team contains the heroes Dinolady (D), Vacuum Cleaner (V), and MathMan (M). A possible list of movies is:

The first movie provides action sequences starring D solo, and D and V together. Mathematically speaking, {D} and {D,V}.

The second movie includes the scenes {V} and {M,V}.

The third movie has the scenes {M}, {D, M} and the grand finale of {D, M, V}.

In this example, we managed to cover all the possible superhero combinations without using any such combination twice, using a total of 7 combinations. In general this is not possible. With 4 superheroes there are 15 combinations total, but we will need at least 17 combinations spread across 6 films to cover them all (since we have 6 films and 4 superheroes, we'll have two solo action sequences starring a hero that already had a solo action sequence).

In order to write solutions compactly, we can avoid spaces and linebreaks and use "0" to signify a new movie begins. With these conventions, the above solution becomes "0DV0VM0MDV".

Your goal: Find an optimal solution for the case of n=6n=6 heroes. Give your solution in the compacted format.

A bonus "*" will be given for finding an optimal solution for the case of n=10n=10 heroes.

Solution

  • Solution

    The optimal solution strings are of length 102 for n=6 and 1898 for n=10 (this includes the "0" in the strings).

    Seeing this is simple combinatorics. For n=6n=6, there are (63)=20{6\choose 3}=20 subsets of 3 superheroes that needs to be covered. Each movie has at most one size-3 set of superheroes, so a minimum of 20 movies is required. In each of those movies, we have at least 3 superheroes, so we already have a string of size 80: 20 "0" and 60 letters per movie.

    There is a total of (64)=15{6\choose 4}=15 size-4 subsets and again, each movie can contain only one, and each one requires adding an additional hero to the movie. So we need 15 more letters. The same goes for (65)=6{6\choose 5}=6 and (66)=1{6\choose 6}=1 for size 5 and 6 sets. So in total, the minimum length of the relevant string is 20+203+15+6+1=10220+20\cdot 3+15+6+1=102. Applied to n=10n=10 the same reasoning yields 1898.

    To find the movies, one can consider the directed graph of subsets of 1,2,,n{1,2,\ldots,n} where we have an edge ABA\to B is BB is obtained by adding a new element to AA. This is a layared graph (each layer corresponding to some set cardinality) where every two adjacent layers form a bipartite graph. One can use the Hopcroft-Karp algorithm to obtain maximum matching between layers; the obtained paths are the movies (when a path does not start from the first layer, we can add the heroes up to the starting point in an arbitrary order).

    Specific concrete solutions:

    • 0FDB0FEB0FDC0FEC0FED0FDAB0FEAB0FCAD0ECAF0EDAF0FBCD0EBCF0DBEF0DCEF0FABCD0EABCF0DABEF0CADEF0BCDEF0ABCDEF

    • 0JHFDB0JIFDB0JHGDB0JIGDB0JIHDB0JHFEB0JIFEB0JHGEB0JIGEB0JIHEB0JHGFB0JIGFB0JIHFB0JIHGB0JHFDC0JIFDC0JHGDC0JIGDC0JIHDC0JHFEC0JIFEC0JHGEC0JIGEC0JIHEC0JHGFC0JIGFC0JIHFC0JIHGC0JHFED0JIFED0JHGED0JIGED0JIHED0JHGFD0JIGFD0JIHFD0JIHGD0JHGFE0JIGFE0JIHFE0JIHGE0JIHGF0JHFDAB0JIFDAB0JHGDAB0JIGDAB0JIHDAB0JHFEAB0JIFEAB0JHGEAB0JIGEAB0JIHEAB0JHGFAB0JIGFAB0JIHFAB0JIHGAB0JHFCAD0JIFCAD0JHGCAD0JIGCAD0JIHCAD0JHECAF0JIECAF0JGECAH0IGECAJ0IHECAJ0JGFCAH0IGFCAJ0IHFCAJ0IHGCAJ0JHEDAF0JIEDAF0JGEDAH0IGEDAJ0IHEDAJ0JGFDAH0IGFDAJ0IHFDAJ0IHGDAJ0JGFEAH0IGFEAJ0IHFEAJ0IHGEAJ0IHGFAJ0JHFBCD0JIFBCD0JHGBCD0JIGBCD0JIHBCD0JHEBCF0JIEBCF0JGEBCH0IGEBCJ0IHEBCJ0JGFBCH0IGFBCJ0IHFBCJ0IHGBCJ0JHDBEF0JIDBEF0JGDBEH0IGDBEJ0IHDBEJ0JFDBGH0IFDBGJ0HFDBIJ0HGDBI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0EDAFGHIJ0JBCDEFGH0IBCDEFGJ0HBCDEFIJ0GBCDEHIJ0FBCDGHIJ0EBCFGHIJ0DBEFGHIJ0DCEFGHIJ0JABCDEFGH0IABCDEFGJ0HABCDEFIJ0GABCDEHIJ0FABCDGHIJ0EABCFGHIJ0DABEFGHIJ0CADEFGHIJ0BCDEFGHIJ0ABCDEFGHIJ

Solvers

  • *King Pig (2/6/2026 3:51 PM IDT)
  • *Daniel Chong Jyh Tar (2/6/2026 4:07 PM IDT)
  • *Alper Halbutogullari (2/6/2026 4:37 PM IDT)
  • *Stéphane Higueret (2/6/2026 5:19 PM IDT)
  • *Bertram Felgenhauer (2/6/2026 6:41 PM IDT)
  • *Paul Lupascu (2/6/2026 6:48 PM IDT)
  • *Lazar Ilic (2/6/2026 7:58 PM IDT)
  • *Sanandan Swaminathan (2/6/2026 11:45 PM IDT)
  • *Michał Franczak (3/6/2026 1:22 AM IDT)
  • *Prashant Wankhede (3/6/2026 2:24 AM IDT)
  • *Rethna Pulikkoonattu (3/6/2026 3:46 AM IDT)
  • *Jack Saleeby (3/6/2026 6:21 AM IDT)
  • *Carter Tran (3/6/2026 7:46 AM IDT)
  • *Dawson Yao (3/6/2026 8:28 AM IDT)
  • *Nadir S. (3/6/2026 8:33 AM IDT)
  • *Lucas Reymond (3/6/2026 11:05 AM IDT)
  • Abraham Joshua (3/6/2026 11:27 AM IDT)
  • Alex Fleischer (3/6/2026 11:28 AM IDT)
  • *Harold Gutch (3/6/2026 12:05 PM IDT)
  • *Yogesh Narang (3/6/2026 12:45 PM IDT)
  • *Jan Fricke (3/6/2026 2:02 PM IDT)
  • *Juergen Koehl (3/6/2026 2:09 PM IDT)
  • *Vladimir Volevich (3/6/2026 2:50 PM IDT)
  • *Lorenz Reichel (3/6/2026 5:57 PM IDT)
  • Ahmet Yuksel (3/6/2026 6:36 PM IDT)
  • Dan Dima (3/6/2026 6:56 PM IDT)
  • *Jean-François Hermant (3/6/2026 11:33 PM IDT)
  • *Alexander Daryin (4/6/2026 1:11 AM IDT)
  • *Guangxi Liu (4/6/2026 6:25 AM IDT)
  • *Peyo (4/6/2026 7:24 AM IDT)
  • *Kang Jin Cho (4/6/2026 10:00 AM IDT)
  • *Evert van Dijken (4/6/2026 2:12 PM IDT)
  • *Dan Ismailescu (4/6/2026 3:41 PM IDT)
  • Frank Schoeps (4/6/2026 5:29 PM IDT)
  • Patricia Ji (4/6/2026 6:04 PM IDT)
  • Baocheng Jiao (4/6/2026 7:19 PM IDT)
  • Amos Guler (4/6/2026 7:27 PM IDT)
  • Simon Atileh (4/6/2026 10:55 PM IDT)
  • Trevor Nerbas (4/6/2026 10:56 PM IDT)
  • *Jason Shaw (4/6/2026 11:48 PM IDT)
  • *Bert Dobbelaere (5/6/2026 12:20 AM IDT)
  • Lixing Fang (5/6/2026 1:49 AM IDT)
  • *Stephen Ebert (5/6/2026 2:41 AM IDT)
  • *Nickita Khylkouski (5/6/2026 3:44 AM IDT)
  • GUMPINA RAMA KRISHNA CHAITANYA (5/6/2026 10:53 AM IDT)
  • *Dominik Reichl (5/6/2026 6:44 PM IDT)
  • *Gary M. Gerken (6/6/2026 7:13 AM IDT)
  • *Dieter Beckerle (6/6/2026 2:09 PM IDT)
  • Loukas Sidiropoulos (6/6/2026 3:17 PM IDT)
  • *Liubing Yu (6/6/2026 7:55 PM IDT)
  • Pushkar Seshadri (7/6/2026 4:21 AM IDT)
  • *Hakan Summakoğlu (8/6/2026 12:36 AM IDT)
  • Shirish Chinchalkar (8/6/2026 1:23 AM IDT)
  • *Prajit Adhikari (8/6/2026 6:14 AM IDT)
  • *Franciraldo Cavalcante (8/6/2026 7:57 AM IDT)
  • *George Jiri Spitalsky (8/6/2026 9:06 AM IDT)
  • three.ws (8/6/2026 11:08 AM IDT)
  • *HyeongSik Hwang (8/6/2026 4:21 PM IDT)
  • *Chern Arthas (8/6/2026 5:20 PM IDT)
  • *Daniel Bitin (8/6/2026 5:22 PM IDT)
  • *Lyes Belhoul (8/6/2026 8:22 PM IDT)
  • *Asaf Zimmerman (8/6/2026 11:27 PM IDT)
  • *Rob Pratt (9/6/2026 1:10 AM IDT)
  • Iren Bekrieva (9/6/2026 6:18 AM IDT)
  • Karl D’Souza (9/6/2026 5:52 PM IDT)
  • Paul Owen (9/6/2026 8:09 PM IDT)
  • Hugo Pfoertner (9/6/2026 10:12 PM IDT)
  • John Tromp (10/6/2026 12:12 AM IDT)
  • *Martin Thorne (10/6/2026 1:16 AM IDT)
  • *Jupally Raviteja Rao (10/6/2026 1:22 PM IDT)
  • Benjamin Cha (10/6/2026 6:23 PM IDT)
  • Zidane Virani (10/6/2026 7:01 PM IDT)
  • Mark Buisseret (11/6/2026 10:26 AM IDT)
  • *Fabio Filatrella (12/6/2026 2:57 AM IDT)
  • *Alex Yang (12/6/2026 7:18 AM IDT)
  • Koduri Nikhil (12/6/2026 8:43 AM IDT)
  • *Anshul Agarwal (12/6/2026 9:08 AM IDT)
  • *Nyles Heise (13/6/2026 5:32 AM IDT)
  • Terry Lee (13/6/2026 6:04 PM IDT)
  • *Motty Porat (13/6/2026 10:10 PM IDT)
  • Ruben Menendez (13/6/2026 10:27 PM IDT)
  • Atip Kajitamkul (14/6/2026 7:35 PM IDT)
  • *Michael Schuresko (14/6/2026 11:55 PM IDT)
  • *Hansraj Nahata (15/6/2026 3:11 AM IDT)
  • *Will Suan (15/6/2026 4:19 AM IDT)
  • *Maths ForFun (15/6/2026 8:41 AM IDT)
  • Aslan Buluthan Gökbulut (15/6/2026 3:38 PM IDT)
  • *Latchezar Christov (16/6/2026 2:22 AM IDT)
  • *Nicolas Lopez (16/6/2026 12:59 PM IDT)
  • Ganghun (Jason) Kim (16/6/2026 8:35 PM IDT)
  • *Gidon Orelowitz (17/6/2026 8:54 PM IDT)
  • *Justin Mazenauer (18/6/2026 12:33 PM IDT)
  • Suus Brommer (19/6/2026 4:50 PM IDT)
  • *Andrii Traitaka (19/6/2026 6:37 PM IDT)
  • *Tamir Ganor & Shouky Dan (20/6/2026 5:54 PM IDT)
  • *Ankit Chakraborty (21/6/2026 12:19 AM IDT)
  • *David Greer (21/6/2026 12:39 AM IDT)
  • *Peter Ji (22/6/2026 9:56 AM IDT)
  • *Arthur Vause (22/6/2026 9:57 AM IDT)
  • Ashfaque Shaikh (22/6/2026 2:28 PM IDT)
  • Ken Dsouza (22/6/2026 2:59 PM IDT)
  • *Michael Liepelt (22/6/2026 11:43 PM IDT)
  • Abhishek Sekar (23/6/2026 4:50 PM IDT)
  • *Shaina Peters (24/6/2026 12:27 AM IDT)
  • Yeonwoo Amelia Tae (25/6/2026 4:49 AM IDT)
  • Rajesh Sathiyanarayanan (25/6/2026 12:30 PM IDT)
  • Leigh Mann (25/6/2026 11:20 PM IDT)
  • *Valmik Nahata (26/6/2026 7:08 AM IDT)
  • *David F.H. Dunkley (27/6/2026 8:33 PM IDT)
  • *Jackson La Vallee (28/6/2026 7:32 PM IDT)
  • Resnina Tathyana (28/6/2026 11:12 PM IDT)
  • *Hagen von Eitzen (29/6/2026 12:41 AM IDT)
  • *Greg Janée (29/6/2026 12:49 AM IDT)
  • *Reiner Martin (29/6/2026 6:55 PM IDT)
  • *Chris Shannon (30/6/2026 1:13 AM IDT)
  • *Eric Manalac (30/6/2026 1:26 PM IDT)
  • *Tongyang Song (30/6/2026 6:29 PM IDT)
  • *Kilian Rueß (1/7/2026 12:30 AM IDT)
  • *Govind Jujare (1/7/2026 1:03 AM IDT)
  • *Alexander Bielik (1/7/2026 9:36 AM IDT)
  • Radu-Alexandru Todor (1/7/2026 11:30 AM IDT)
  • Marco Bellocchi (1/7/2026 5:42 PM IDT)
  • *Karl Mahlburg (2/7/2026 12:07 AM IDT)
  • *Fakih Karademir (2/7/2026 10:41 PM IDT)
  • *Evan Semet (3/7/2026 10:22 PM IDT)
  • *Oscar Volpatti (4/7/2026 9:18 AM IDT)
  • *Li Li (5/7/2026 4:56 PM IDT)

Related posts