View unanswered posts | View active topics It is currently Wed Feb 08, 2023 12:12 pm



← Back to the Calcudoku puzzle page




Reply to topic  [ 10 posts ] 
 Exponentiation operator 
Author Message

Posted on: Sat Sep 24, 2022 12:35 am




Posts: 19
Joined: Wed Jan 05, 2022 8:59 pm
Post Exponentiation operator
The explanation says:

Quote:
Note: this puzzle also uses the exponentiation operator ^
Example: 2^3 = 2 x 2 x 2 = 8
Or, with three digits: 2^4^2 = 2^(4^2) = 2^16 = 65536
Note: evaluation is right to left


What is ment with "Note: evaluation is right to left"?

Does the placement of numbers have effect? When I have 2 boxed horizontal with 625^, does it have to be 54 or can it also be 45?


Profile
User avatar

Posted on: Sat Sep 24, 2022 1:32 pm




Posts: 3181
Joined: Thu May 12, 2011 11:58 pm
Post Re: Exponentiation operator
guidocram wrote:
The explanation says:

Quote:
Note: this puzzle also uses the exponentiation operator ^
Example: 2^3 = 2 x 2 x 2 = 8
Or, with three digits: 2^4^2 = 2^(4^2) = 2^16 = 65536
Note: evaluation is right to left


What is ment with "Note: evaluation is right to left"?

Does the placement of numbers have effect? When I have 2 boxed horizontal with 625^, does it have to be 54 or can it also be 45?


It can be both, the order of the numbers in a cell does not matter (like for any cage and any operator in a Calcudoku).

The note for exponentiation is needed because it matters, take for example 2^4^2:

evaluation left to right:
(2^4)^2 = 16 ^ 2 = 256

evaluation right to left:
2^(4^2) = 2 ^ 16 = 65536

If you assume left to right evaluation, you'll run into cages for which the given result can't be produced
(and I still get messages once in a while about this :-) )


Profile

Posted on: Sat Sep 24, 2022 4:18 pm




Posts: 19
Joined: Wed Jan 05, 2022 8:59 pm
Post Re: Exponentiation operator
So when there are 2, 2, and 4 inside the box, it still can be:

4^2^2 = 4^(2^2) = 4^4 = 256
2^4^2 = 2^(4^2) = 2^16 = 65536
2^2^4 = 2^(2^4) = 2^16 = 65536

Correct?


Profile
User avatar

Posted on: Sat Sep 24, 2022 4:49 pm




Posts: 3181
Joined: Thu May 12, 2011 11:58 pm
Post Re: Exponentiation operator
guidocram wrote:
So when there are 2, 2, and 4 inside the box, it still can be:

4^2^2 = 4^(2^2) = 4^4 = 256
2^4^2 = 2^(4^2) = 2^16 = 65536
2^2^4 = 2^(2^4) = 2^16 = 65536

Correct?


yes, all correct [thumbup]


Profile

Posted on: Sat Sep 24, 2022 10:29 pm




Posts: 903
Location: Ukraine
Joined: Tue Mar 01, 2016 10:03 pm
Post Re: Exponentiation operator
pnm wrote:
guidocram wrote:
So when there are 2, 2, and 4 inside the box, it still can be:

4^2^2 = 4^(2^2) = 4^4 = 256
2^4^2 = 2^(4^2) = 2^16 = 65536
2^2^4 = 2^(2^4) = 2^16 = 65536

Correct?


yes, all correct [thumbup]


Now I’m confused. [unsure] If either of the above answers is valid, it means that the order of evaluation is irrelevant. What am I missing? [confused]


Profile

Posted on: Sun Sep 25, 2022 2:59 am




Posts: 19
Joined: Wed Jan 05, 2022 8:59 pm
Post Re: Exponentiation operator
Other way of calculation:

4^2^2 = (4^2)^2 = 16^2 = 256
2^4^2 = (2^4)^2 = 16^2 = 256
2^2^4 = (2^2)^4 = 4^4 = 256

Not a big difference. Though with the current way of calculation it is possible to get 65536 with 2, 2 and 4.

Might be more clear with 2, 3 and 5.


Profile
User avatar

Posted on: Sun Sep 25, 2022 11:06 am




Posts: 3181
Joined: Thu May 12, 2011 11:58 pm
Post Re: Exponentiation operator
paulv66 wrote:
Now I’m confused. [unsure] If either of the above answers is valid, it means that the order of evaluation is irrelevant.


For 2,2,4, and the result 256, yes.


Profile

Posted on: Sun Sep 25, 2022 12:29 pm




Posts: 903
Location: Ukraine
Joined: Tue Mar 01, 2016 10:03 pm
Post Re: Exponentiation operator
pnm wrote:
paulv66 wrote:
Now I’m confused. [unsure] If either of the above answers is valid, it means that the order of evaluation is irrelevant.


For 2,2,4, and the result 256, yes.


So is the order only relevant if there are three different numbers in the cage? Or are you saying that 65,536 is not an acceptable answer for 2,2,4?


Profile
User avatar

Posted on: Sun Sep 25, 2022 12:53 pm




Posts: 3181
Joined: Thu May 12, 2011 11:58 pm
Post Re: Exponentiation operator
paulv66 wrote:
So is the order only relevant if there are three different numbers in the cage? Or are you saying that 65,536 is not an acceptable answer for 2,2,4?


65536 definitely is an acceptable answer, because the evaluation order is right-to-left.

And as with cages with 3 cells or more with subtraction/division,
there exists an ordering for which the result is produced.

edit: here I'm assuming that when you write "order", you mean the ordering of evaluation?
(not the ordering of the numbers)

(this is maybe a cause of confusion)


Profile

Posted on: Sun Sep 25, 2022 1:33 pm




Posts: 903
Location: Ukraine
Joined: Tue Mar 01, 2016 10:03 pm
Post Re: Exponentiation operator
pnm wrote:
paulv66 wrote:
So is the order only relevant if there are three different numbers in the cage? Or are you saying that 65,536 is not an acceptable answer for 2,2,4?


65536 definitely is an acceptable answer, because the evaluation order is right-to-left.

And as with cages with 3 cells or more with subtraction/division,
there exists an ordering for which the result is produced.

edit: here I'm assuming that when you write "order", you mean the ordering of evaluation?
(not the ordering of the numbers)

(this is maybe a cause of confusion)


Thanks Patrick.

My confusion was caused by the fact that I was assuming that the evaluation order was left to right, in which case the only acceptable answer would be 256. I’ve no idea why I made that assumption when the instructions clearly say right to left. I can only assume that it’s because I often struggle to distinguish left from right and find myself having to correct what I say when I’m giving directions.


Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
All forum contents © Patrick Min, and by the post authors.

Forum software phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.