View unanswered posts | View active topics It is currently Fri Jun 22, 2018 9:21 am ← Back to the Calcudoku puzzle page

 Page 3 of 3 [ 25 posts ] Go to page Previous  1, 2, 3
 Print view Previous topic | Next topic
Subtraction and Division with 3 or more squares
Author Message

Posted on: Fri Jun 03, 2011 3:56 am

Posts: 43
Location: Tacoma, WA, USA
Joined: Fri May 13, 2011 4:03 am
Re: Subtraction and Division with 3 or more squares
I don’t think it’s quite accurate, is it, to say the rule about order is the same for all operators? With subtraction or division, the order makes no difference in Ken Ken (even though the order DOES make a difference in the real world, where 6 divided by 2 has a different answer than 2 divided by 6).

With the modulo operator, the order does make a difference, in Ken Ken as well as in the real world. In maartensmit’s example, 5 followed by 7 is 5; reverse the order and it’s 2.

For addition and multiplication, the order of course makes no difference either in the real world or in Ken Ken. I’m not sure where the bitwise or operator goes. Order makes no difference in Ken Ken, but I’ve never bumped into it in the real world. Exponentiation I have no clue; in Ken Ken it just fries my brain.

Posted on: Fri Jun 03, 2011 9:34 am

Posts: 20
Joined: Mon May 16, 2011 7:17 pm
Re: Subtraction and Division with 3 or more squares
I think the 'rule' Patrick was talking about was that any order that results in a positive integer answer is correct. I think it's hard to find a rule that works for all operators though, because this one doesn't work for exponentiation..

_________________
Confucius say - 'He who stands on toilet is high on pot.'

Posted on: Sat Jun 04, 2011 11:59 pm

Posts: 713
Joined: Fri May 13, 2011 6:51 pm
Re: Subtraction and Division with 3 or more squares
pnm wrote:
maartensmit wrote:
So 5 and 7 in a cage could be either 2mod or 5mod?

Yes, absolutely, the same rule as for the other operators.

The subtraction and division with 3 or more squares do not represent a problem for the computer (the final result must be an integer of course); if no brackets are assumed and the operation starts with the higher number. That is clear. In the case of the division, for instance, when iterating in sequence, 8/4/2, the result is equivalent (arithmetically) to (8/4)/2 = 8/(4x2) = 8/8 = 1; also (8/2)/4 = 8/(2x4) = 8/8 = 1 since you have the higher number divided by the product (that is conmutative) of all the lower numbers. In the other side, for the exponentiation, ^, actually, brackets are assumed with any combination of two operands. For the logical bitwise OR (or XOR, etc.) the order of the operands is not significant since, once you have the binary expression for each operand, the operation is applied bit by bit in each independent position with the conmutative and the associative properties. The problem would appear if you try to extend the modulo operation to 3 or more squares. For instance, iterating the mod function with the 4, 5 and 7, the result can be mod0, mod1, mod2, mod3 or mod4 (the lower number makes the limit, that is, mod0… to modx, being x the lower number of the three given, in this case 4); while 3, 5 and 8 produce mod0, mod2 and mod3 but not mod1; 3, 7 and 8 however produce mod0, mod1, mod2 and mod3. If you had 3 positions, the 1 should be prevented inside because it could produce an intermediate 0 and the division by 0 is not allowed in the computers. The situation could also crash if you have numbers that are multiples the ones of the others, like in the combinations 2, 4 and 7 or 3, 5 and 6, etc. However, the modulo operation with 3 or more squares could be considered even with those limitations if: Whenever there is a 1 inside (the rest of the numbers are multiples of 1), or when a number is multiple of another, or if an intermediate result is 0, the final result assigned to the full cage is always mod0 (if the cage result is decided to be different than mod0 then the red indication could be set as soon as the wrong entry is attempted indicating the prohibition for that particular number).

Posted on: Sun Jun 05, 2011 6:22 am

Posts: 422
Joined: Fri May 13, 2011 2:43 am
Re: Subtraction and Division with 3 or more squares
Not sure I got all that, but I'm just glad the current puzzles use the modulo operation on only 2 squares and not more. It sounds like a headache and I don't feel like worrying about it until I have to.

Posted on: Sun Jun 05, 2011 11:00 am

Posts: 2313
Joined: Thu May 12, 2011 11:58 pm
Re: Subtraction and Division with 3 or more squares
sneaklyfox wrote:
Not sure I got all that, but I'm just glad the current puzzles use the modulo operation on only 2 squares and not more. It sounds like a headache and I don't feel like worrying about it until I have to.

Yes, I ended up limiting the mod operator to 2 squares because I didn't want to figure out
what to do with more..

Display posts from previous:  Sort by
 Page 3 of 3 [ 25 posts ] Go to page Previous  1, 2, 3

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

Search for:
 Jump to:  Select a forum ------------------ English    Announcements    Calcudoku General    Other number stuff    Solving strategies and tips    Specific puzzles / your own puzzles    Timed Puzzles    Bugs and errors    Killer Sudoku    Sudoku Nederlands    Aankondigingen    Calcudoku Algemeen    Oplostips en strategieën Italiano    Calcudoku Generale    Strategie e consigli per risolvere Español    Avisos    Calcudoku - General    Estrategias de solución y aspectos relevantes
All forum contents © Patrick Min, and by the post authors.

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