Page 1 of 1

Squarebot

Posted: Wed Nov 11, 2020 2:26 pm
by Gavin Chipper
Every week in New Scientist they have a puzzle. The one in the most recent edition is called "Squarebot". I think it's quite fun because you can be quite creative in your solution, unlike most others which have just one answer. I'm looking forward to the answer that they give later this week. Anyway:

“What’s that you are holding, Squarebot?”

“Square.”

I have met Squarebot before and am suspicious. “Are you sure, Squarebot? I can see it must be a rectangle, because you have drawn it on squared paper. But I can’t count the squares without breaking social distancing rules. How wide is it?”

“16.”

“And its height?”

“16.”

“Sounds like a square, then. Just to check: what is its area?”

“289.”

“Hold on, that doesn’t work: 289 is 17 squared. You are rounding every numerical answer you say to the nearest square number, aren’t you? And if the answer isn’t a number you just say ‘Square’?”

“Square”, chuckles Squarebot.

“So the width might be 17? Or 18? Or 15? Or even 20?”

“Square”, grins Squarebot.

Can you think of a question to ask Squarebot to find out if the rectangle really is a square?

Re: Squarebot

Posted: Wed Nov 11, 2020 2:31 pm
by Thomas Cappleman
What is the floor function of the shortest side divided by the longest side? (If they're equal this is just 1 which is square, if they're not then the ratio is <1, and so the floor function makes it 0 which is also square).

Re: Squarebot

Posted: Wed Nov 11, 2020 3:27 pm
by Jon O'Neill
"How many squares have you drawn on the paper?"

Re: Squarebot

Posted: Wed Nov 11, 2020 3:41 pm
by Gavin Chipper
If it's a square I will eat four slices of pizza. If not, I will eat one. How many slices of pizza will I eat?

Re: Squarebot

Posted: Wed Nov 11, 2020 3:41 pm
by Gavin Chipper
Jon O'Neill wrote: Wed Nov 11, 2020 3:27 pm "How many squares have you drawn on the paper?"
Yes. Nice.

Re: Squarebot

Posted: Wed Nov 11, 2020 3:42 pm
by Jon O'Neill
Add the sum of the length of the sides together. Add 1. Multiply this by 100 and add 50. What do you get?

If 3600, it's a square. If not, it's a rectangle.

Re: Squarebot

Posted: Wed Nov 11, 2020 5:12 pm
by Gavin Chipper
Jon O'Neill wrote: Wed Nov 11, 2020 3:42 pm Add the sum of the length of the sides together. Add 1. Multiply this by 100 and add 50. What do you get?

If 3600, it's a square. If not, it's a rectangle.
Normally you'd come up with a boring answer first and then have the flash of inspiration, but you did it the other way round.

Re: Squarebot

Posted: Wed Nov 11, 2020 5:23 pm
by Gavin Chipper
Divide the length of the longer side by the length of the shorter side. Do that number to the power of a million.

If it's 1, it's a square. If not, it's not.

Re: Squarebot

Posted: Wed Nov 11, 2020 7:15 pm
by Gavin Chipper
Jon O'Neill wrote: Wed Nov 11, 2020 3:42 pm Add the sum of the length of the sides together. Add 1. Multiply this by 100 and add 50. What do you get?

If 3600, it's a square. If not, it's a rectangle.
Is that even right? Doesn't 18 and 16 give the same answer as 17/17?

Re: Squarebot

Posted: Wed Nov 11, 2020 7:54 pm
by Callum Todd
Say square again! I dare you, I double dare you motherfucker, say square one more goddamn time!

Re: Squarebot

Posted: Wed Nov 11, 2020 8:20 pm
by Jon O'Neill
Gavin Chipper wrote: Wed Nov 11, 2020 7:15 pm
Jon O'Neill wrote: Wed Nov 11, 2020 3:42 pm Add the sum of the length of the sides together. Add 1. Multiply this by 100 and add 50. What do you get?

If 3600, it's a square. If not, it's a rectangle.
Is that even right? Doesn't 18 and 16 give the same answer as 17/17?
Disregard this. See my first answer. This was a joke answer as you can tell from "add the sums".

Re: Squarebot

Posted: Wed Nov 11, 2020 8:36 pm
by Gavin Chipper
Jon O'Neill wrote: Wed Nov 11, 2020 8:20 pm
Gavin Chipper wrote: Wed Nov 11, 2020 7:15 pm
Jon O'Neill wrote: Wed Nov 11, 2020 3:42 pm Add the sum of the length of the sides together. Add 1. Multiply this by 100 and add 50. What do you get?

If 3600, it's a square. If not, it's a rectangle.
Is that even right? Doesn't 18 and 16 give the same answer as 17/17?
Disregard this. See my first answer. This was a joke answer as you can tell from "add the sums".
I thought you were just bad at writing so overlooked it.

Re: Squarebot

Posted: Wed Nov 11, 2020 8:36 pm
by Gavin Chipper
What is the square of the area?

Re: Squarebot

Posted: Wed Nov 11, 2020 9:44 pm
by Thomas Carey
Gavin Chipper wrote: Wed Nov 11, 2020 8:36 pm What is the square of the area?
alright then he says it's whatever 289 squared is, that doesn't help you does it


tcap's answer, jono's first answer (both of which gev later posted a very similar answer to, although i like the use of pizzas) and callum's seemgood

Re: Squarebot

Posted: Wed Nov 11, 2020 9:50 pm
by Thomas Cappleman
He only rounds to a square at the point he says it, so the square of the area is good.

Re: Squarebot

Posted: Thu Nov 12, 2020 2:11 am
by Thomas Carey
Thomas Cappleman wrote: Wed Nov 11, 2020 9:50 pm He only rounds to a square at the point he says it, so the square of the area is good.
yeah no that's not what i meant, i said a bad example but knowing the area doesn't necessarily mean you know whether or not it's a square? you kind of do with 289 cause it can't be a 1x289 rectangle but if he'd said a different number for area you wouldn't be sure.

(actually, no matter what he said for area, assuming the sides round to 16 i think you're good, and in fact i can't think of a counterexample for any square number where you can have two lengths that multiply to a square number, round to the same nearest square number but aren't the same, but who knows)

Re: Squarebot

Posted: Thu Nov 12, 2020 8:18 am
by Fiona T
Don't think it says anywhere that the lengths have to be whole numbers.

The simple solutions seem best here.

Re: Squarebot

Posted: Thu Nov 12, 2020 8:54 am
by Gavin Chipper
Fiona T wrote: Thu Nov 12, 2020 8:18 am Don't think it says anywhere that the lengths have to be whole numbers.

The simple solutions seem best here.
I think it's implied by the fact that it's on squared paper so must be a rectangle of some sort. If it's not whole numbers, the squared paper becomes useless anyway.

Re: Squarebot

Posted: Thu Nov 12, 2020 9:04 am
by Fiona T
Gavin Chipper wrote: Thu Nov 12, 2020 8:54 am
Fiona T wrote: Thu Nov 12, 2020 8:18 am Don't think it says anywhere that the lengths have to be whole numbers.

The simple solutions seem best here.
I think it's implied by the fact that it's on squared paper so must be a rectangle of some sort. If it's not whole numbers, the squared paper becomes useless anyway.
The squares on the paper might be 1 inch squares.

Re: Squarebot

Posted: Thu Nov 12, 2020 9:20 am
by Gavin Chipper
Fiona T wrote: Thu Nov 12, 2020 9:04 am
Gavin Chipper wrote: Thu Nov 12, 2020 8:54 am
Fiona T wrote: Thu Nov 12, 2020 8:18 am Don't think it says anywhere that the lengths have to be whole numbers.

The simple solutions seem best here.
I think it's implied by the fact that it's on squared paper so must be a rectangle of some sort. If it's not whole numbers, the squared paper becomes useless anyway.
The squares on the paper might be 1 inch squares.
Does their size matter?

Re: Squarebot

Posted: Thu Nov 12, 2020 1:19 pm
by Gavin Chipper
The way I interpreted this is that Squarebot used the lines on the paper to draw the rectangle, so each side must have an integer length. Also each side is 16 units long to the nearest square so from 13 to 20. As the area is 289 to the nearest square, it must be nearer 289 than it is to 256 (16^2) or 324 (18^2). So it must be from 273 to 306. This gives us:

14 x 20 = 280
15 x 19 = 285
15 x 20 = 300
16 x 18 = 288
16 x 19 = 304
17 x 17 = 289
17 x 18 = 306

as the possibilities.

Re: Squarebot

Posted: Thu Nov 12, 2020 1:22 pm
by Gavin Chipper
Gavin Chipper wrote: Wed Nov 11, 2020 5:23 pm Divide the length of the longer side by the length of the shorter side. Do that number to the power of a million.

If it's 1, it's a square. If not, it's not.
You only need to do this to the power of 17 I think. That gets you over 2.5 (so 4 to the nearest square) for all the non-square options.

Re: Squarebot

Posted: Thu Nov 12, 2020 11:37 pm
by Gavin Chipper
I just had a look online, and obviously asking for the difference between the width and height works well.

Re: Squarebot

Posted: Tue Dec 08, 2020 7:30 pm
by Gavin Chipper
Anyway, this is the solution from New Scientist, that I keep forgetting to post here:
Since Squarebot was kind enough to draw its shape on squared paper, we can assume that the dimensions are integers. So we might ask “What is the square of the height?” and Squarebot will give an exact answer. Unfortunately, if Squarebot says 289, the shape could be a 17x17 square or a 17x18 rectangle, for example. We need to ask a question to which the answer for a square would be 0, such as “what is the difference between its height and its width?”If it isn’t a square, Squarebot would give an answer of at least 1.
Well, they've given one way of doing it, which is quite a nice solution, but there's no need for the answer for a square to be specifically 0 - it just needs to be different from any non-square answer! Anyway, I think Jono's answer is still my favourite.

Re: Squarebot

Posted: Wed Dec 09, 2020 4:33 pm
by JackHurst
Gavin Chipper wrote: Thu Nov 12, 2020 11:37 pm I just had a look online, and obviously asking for the difference between the width and height works well.
Not quite. You need to ask for the square (or absolute value) of the difference to guarantee it's a none-negative.

e.g if W was 17 and L was 15 and you asked for L - 5 you would get -2 rounded up to the nearest square which is 0.

Re: Squarebot

Posted: Wed Dec 09, 2020 4:57 pm
by Sam Cappleman-Lynes
Maybe it's just me, but "What is the difference between X and Y?" carries an implicit assumption that I'm asking for the positive difference.

Re: Squarebot

Posted: Fri Apr 09, 2021 4:28 pm
by Jon Corby
Why are we assuming that the person in the puzzle had accurately described Squarebot’s MO anyway?

Re: Squarebot

Posted: Fri Apr 09, 2021 5:20 pm
by Gavin Chipper
Cos otherwise the answer might be anything.

Re: Squarebot

Posted: Sat Apr 10, 2021 7:16 am
by Jon Corby
Gavin Chipper wrote: Fri Apr 09, 2021 5:20 pm Cos otherwise the answer might be anything.
Yeah, but fuck off with the whole whimsical conversation which appears to define the rules, but actually doesn’t. If you must have the stupid conversation, at least make it define the rules. Or just say the damn rules.