How To Choose Appropriate Test Cases

I just finished the Divide and Conquer quiz, and the final question had me beat.

https://brilliant.org/practice/divide-and-conquer/?p=6

The solution suggests looking at a 3x3 grid, then a 7x7 grid, and then generalizes. It wasn't at all clear to me that I ought to be approaching test cases this way, i.e., from a 2^n step standpoint. I started with 4, then went to 5. What were the implicit clues or thought processes that might lead someone to the test cases used in the solution? Or is this just a case of guess and check and I wasn't being precise in my guessing?

Note by Wolf Howard
3 years, 8 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

The thought process often used in these types of problems, is to work backwards, that is to say, "For what size grid could I answer correctly with only one wrong guess, and clearly that would be going right in the middle of a 3x3 grid. Now, once you have that you can say, OK, with 2 guesses I'd like to get it down to just 3x3 grids, which can be done with four 3x3 grids diagonally adjacent to your guess, which leads to a 7x7 grid, and so on...

Leading eventually to a 2^n type pattern, or in this case for n wrong guesses it would lead to an MxM grid where M = 2^{n+1} - 1.

Make sense?

Geoff Pilling - 3 years, 8 months ago

Log in to reply

Cheers, great explanation.

Wolf Howard - 3 years, 8 months ago
×

Problem Loading...

Note Loading...

Set Loading...