Calcudoku puzzle forum
https://www.calcudoku.org/forum/

Exponentiation operator
https://www.calcudoku.org/forum/viewtopic.php?f=3&t=1465
Page 1 of 1

Author:  guidocram  [ Sat Sep 24, 2022 12:35 am ]
Post subject:  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?

Author:  pnm  [ Sat Sep 24, 2022 1:32 pm ]
Post subject:  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 :-) )

Author:  guidocram  [ Sat Sep 24, 2022 4:18 pm ]
Post subject:  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?

Author:  pnm  [ Sat Sep 24, 2022 4:49 pm ]
Post subject:  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]

Author:  paulv66  [ Sat Sep 24, 2022 10:29 pm ]
Post subject:  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]

Author:  guidocram  [ Sun Sep 25, 2022 2:59 am ]
Post subject:  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.

Author:  pnm  [ Sun Sep 25, 2022 11:06 am ]
Post subject:  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.

Author:  paulv66  [ Sun Sep 25, 2022 12:29 pm ]
Post subject:  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?

Author:  pnm  [ Sun Sep 25, 2022 12:53 pm ]
Post subject:  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)

Author:  paulv66  [ Sun Sep 25, 2022 1:33 pm ]
Post subject:  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.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/