2
\$\begingroup\$

I have a problem, which I haven't found a solution for. Solutions to the first part are well documented, but I have yet to find anyone who has solved the second part. I call this the "Dobble" challenge...

Challenge 1

Using the numbers 1 - 57, populate 57 arrays. Each array must have 8 numbers in it, with no duplicates. Each array must share one number (and only one number) with every other array. For example:

[3, 12, 18, 24, 30, 43, 49, 55]

[4, 13, 18, 23, 35, 40, 45, 57]

[7, 10, 19, 28, 30, 39, 48, 57]

The first array has 18 in common with second array and 30 in common with the third array.

This challenge has been posted before, and published solutions can easily be found and explained. But wait...

Challenge 2

As an extension to the previous challenge, ensure that each of the numbers 1 - 57 are never in the same position twice, across all of the 57 arrays. For instance, the previous example contains 30 twice in the fifth position. Find a solution that avoids this.

This is my first code challenge, so please forgive any issues with the formatting/style - I'll try to correct errors if you mention them in the comments.

\$\endgroup\$
4
  • 4
    \$\begingroup\$ if the first challenge has already been posted, then your second challenge must be the main challenge. \$\endgroup\$ – Razetime Nov 12 '20 at 12:19
  • 5
    \$\begingroup\$ Welcome to the site! This is an interesting first question, however it does have a couple of issues. Notably, we require challenges to have an objective scoring criteria (such as code golf). It's implied via the tag, but I'd recommend specifying that in the challenge body and removing the code-challenge tag. Furthermore, each challenge should only have 1 task in it (in fact we have a close reason which is "this challenge contains multiple questions"), so if the first one is already a challenge, you should remove it. The fact that a very similar challenge already exists could suggest (cont.) \$\endgroup\$ – caird coinheringaahing Nov 12 '20 at 12:21
  • 3
    \$\begingroup\$ (cont.) that the extension is similar enough for this to be closed as a duplicate. Finally, I'd recommend that you check out the Sandbox, a post we use to get feedback on potential challenge ideas before posting to main \$\endgroup\$ – caird coinheringaahing Nov 12 '20 at 12:22
  • 3
    \$\begingroup\$ Welcome to the site. In light of the issues above I am going to temporarily close this challenge to prevent answers while things are being fixed. Once you feel the issues have been resolved feel free to contact me with a ping and I will reopen it for you. If I am not fast enough other users may also reopen this. \$\endgroup\$ – Wheat Wizard Nov 12 '20 at 12:36