Here is the full table for the “mod function” (the number of combinations for each case is shown in parenthesis). The “mod” function, xmod, works dividing the two numbers inside the cage, considering any of them as the dividend and the other as the divisor, thus obtaining a quotient and a remainder x, this remainder is considered the result of the operation, for instance, in 5 / 7, the quotient is 0, the remainder is 5, so the pair 57 is a valid solution for a 5mod (among others); but considering 7 / 5 (the “natural” division), the quotient is 1, and the remainder is 2, so the pair 57 is a valid solution for 2mod (among others).

The main tips are:1) A number x can never be inside a cage ymod if x < y, for instance, 2 can never go inside a cage 3mod, 4mod, 5mod, 6mod or 7mod.2) In a cage 0mod or 1mod "any" number (from 1 to 8) can initially be present.3) In cages 4mod, 5mod, 6mod and 7mod, the 4, 5, 6 and 7, respectively, must be present; the cages 1mod, 2mod and 3mod are possible without the respective 1, 2 or 3. The cage 0mod has pairs that are multiples or a 1 is inside, what in fact is a particular case of the multiples.There are a few combinations (if you forget any when solving, the full puzzle may collapse) but less than in the "bitwise OR".

Some comments:

The total number of possible combinations, 56, is twice the total number of combinations (below) for the “bitwise OR”, 28, in the case of 2 cells (in an 8x8 “bitwise OR” from 1 to 8, the actual type of puzzle) but, in general, considering that in the “bitwise OR” puzzles the 3 cells L-shape cages and the 3 cells in-line cages may be present, the total number of combinations for the “bitwise OR” is much greater, 193. Actually the mod function is not using 3 cells cages, and 4 cells cages are not being used in the bitwise OR.

Bitwise OR:

Below is the full table and a few tips for the “bitwise OR” (at the end of the post there is a little appendix explaining how this operation works). In the actual 8x8 puzzles we are using numbers 1 thru 8, so 1|, 2|, 4| and 8| in 2 cells or 3 cells cages are non-valid results; the 9|, 10| and 12| are possible in 2 cells cages and in 3 cells L-shape cages, but impossible in 3-cells “in-line” cages, as shown in the table [another curious thing is that, if we had a puzzle 8x8 with numbers in the range 0-7, we could have cages 1| (0 and 1), 2| (0 and 2), 4| (0 and 4) with 2 cells and 3 cells L-shape cages with 1| (001 or 110), 2| (002 or 220) and 4| (004 or 440)].

The 7| in 3 cells L-shape cages is the more complex (and, by the way, a very common cage) and may contain 56 different combinations (unless mistakes, corrections welcome) (the 7| in 3 cells in-line cages has also the maximum number of combinations, 29, in this group).

We have seen, for instance, that for a 3 cells L-shape cage with “7|” (in an 8x8 puzzle from 1 to 8), let’s say in cells a1-a2-b1, knowing that the operand 8 can not be in, the whole set of combinations is obtained with the 4-2-1 and all of the type 7-x-y, 6-1-x, 6-3-x, 6-5-x, 5-2-x, 5-3-x and 4-3-x (where x and/or y take all values ranging from 1 to 7; of course no operand can be present more than twice in any combination, placing in this case the duplicated operand in the opposite corner of the triangle). This number of solutions (combinations, supressing the redundant) is really big (56) (the “possibilities” increase if we take into account that any of these combinations may be permuted or “rotated”), it must be said that in cases like this it is not necessary to analyze all combinations, of course, only to clearly know how the operator works, the “|” in a cage modifies our conventional thinking, being relevant the binary expression of the “numbers” 1 to 8 and having no meaning its “value”.

Some tips:

1) There are many combinations that produce the “7|” without the number 7 inside the cage.

2) “6|” (2 cells) is only made with 2-4, 2-6 and 4-6.

3) “5|” (2cells) is only possible with 1-4, 1-5 and 4-5.

4) ”3|” (2 cells) is only made with 1-2, 1-3 and 2-3.

5) “n|“, with n higher that 8, contains the 8, being the operands the numbers 8 and n-8 if the cage is of 2 cells.

6) m can not be inside a cage “n|” if m > n, for instance, 8 in cages “7|”, “6|”, “5|” or “3|”, 7 in cages “6|”, “5|” or “3|”, 6 in cages “5|” or “3|”, and 5 in cages “3|”.

7) 1|, 2|, 4| and 8| will never appear in a cage (in 8x8’s from 1 to 8).

Appendix:

In the decimal system, a number, i.e, 7593, is a convention in which the “position” of a digit determines its “value”, 5 represents 500. So:

Inversely, to obtain the binary expression of any “decimal” number, for instance, 13, we divide it by 2, with a quotient of 6 and a remainder of 1; later we divide that quotient 6 again by 2, with a new quotient of 3 and a remainder of 0, and the 3 again by 2, with a quotient of 1 and a remainder of 1. Now taking this last quotient and all the remainders in inverse sequence we obtain the binary representation for 13, which is 1101. Here are the numbers 1 thru 15 represented in binary:

Now, the bitwise OR operation is performed bit by bit (for each position) with the binary expression of the two operands, with the only rule that 0 and 0 give a 0, while 0 and 1, 1 and 0 and 1 and 1 all produce a 1. Two examples:

3……00116……0110--------------……..0111 = 7. Then a 3 and a 6 “bitwise ORed” give a 7.

5……01017……0111--------------..……0111 = 7. Here we see that a 5 and a 7 “bitwise ORed” reproduce the 7.

Clearly, the operands are commutable, that is, if N1 and N2 are binary numbers, N1 bitwise OR N2 = N2 bitwise OR N1.

Finally, if we have, i.e., 13|, this means that two numbers must produce 1101 but the higher number in an 8x8 puzzle is 8 (= 1000), so the 8 must be present, being the 5 the other number (it must be lower than 8) because 5 = 0101, to fill the necessary one’s since the 8 has all zeros in the bit positions 1, 2 and 3.

The bitwise OR with three or more numbers follows the same rules, for instance:

6……01103……00114……0100--------------......0111 = 7. That is, 6, 3 and 4 "bitwise ORed" result in a 7 (7|).

The operation is also associative, that is, if N1, N2 and N3 are binary numbers, N1 bitwise OR N2 bitwise OR N3 = (N1 bitwise OR N2) bitwise OR N3 = N1 bitwise OR (N2 bitwise OR N3).

Now we see why, i.e., the 4| does not exist since 4 = 0100 and it is not possible to find two different numbers to obtain that result, one of them should be the 4, 0100, and “any” other different would activate a bit in a position different than the third, so leaving a final result different than 4.

Last edited by clm on Sat Oct 15, 2011 7:56 am, edited 1 time in total.

jomapil

Posted on:Sat Oct 15, 2011 7:33 am

Posts: 246Location: Lisbon, PortugalJoined: Sun Sep 18, 2011 5:40 pm

Re: Full tables: "mod function" and "bitwise OR" (in the 8x8

Interesting thread!And useful to those who don't know to do the operations and don't have yet the tables.And some particulars I hadn't notice.Thanks, clm.

... And useful to those who don't know to do the operations and don't have yet the tables...Thanks, clm.

Welcome. The actual four special 8x8's puzzles ("mod function", "bitwise OR", "exponentiation" and "from 0") can be of different levels of difficulty, it is difficult to affirm that one is more difficult than the other (I am sure the difficulty can be adjusted by the program). Probably the "mod function" and the "bitwise OR" represent a bigger problem for most people because those are not very usual operations. When I joined the page, at the beginning, it was very useful for me to have a handy list of the combinations, so I prepared one. The "from 0" looks initially easier though the operations with the 0 are not "natural" and that's why some discussion took place in the past, in the Forum, with respect to multiplications and divisions (obviously, two or more 0's could be inside a cage "0x" but never two 0's can go inside a cage "0:" due to the well known "uncertainty"). I hope, then, that the tables may be useful.

what are the possibilities?i have the possibilities from 0 till 8 but 9 and 10 aren't included

When the tables were made (six months ago and in fact until this moment) the main page was only showing the mod function in puzzles up to 8x8 (actually in an 8x8 and a 7x7 "manyop" every week). I understand that, for intance, in the books, they appear larger puzzles with the mod function, even in the 12x12 format.

Apart of the recent very handy table just provided by honkhonk, I'm sending in a separate post an Appendix to the original tables going now to 12x12 (the philosophy is the same).

Here is the full table for the “mod function” (the number of combinations for each case is shown in brackets). The “mod” function, xmod, works dividing the two numbers inside the cage, considering any of them as the dividend and the other as the divisor, thus obtaining a quotient and a remainder x, this remainder is considered the result of the operation, for instance, in 4 / 11, the quotient is 0, the remainder is 4, so the pair 4-11 is a valid solution for a 4mod (among others); but considering 11 / 4 (the “natural” division), the quotient is 2, and the remainder is 3, so the pair 4-11 is a valid solution for 3mod (among others).

The main tips are:1) A number x can never be inside a cage ymod if x < y, for instance, 2 can never go inside a cage 3mod, 4mod, 5mod, 6mod, … .2) In a cage 0mod or 1mod "any" number (from 1 to 12) can initially be present.3) In cages 6mod, 7mod, 8mod, 9mod, 10mod and 11mod, the 6, 7, 8, 9, 10 and 11, respectively, must be present; the cages 1mod, 2mod, 3mod, 4mod and 5mod are possible without the respective 1, 2, 3, 4 or 5. The cage 0mod has pairs that are multiples or a 1 is inside, what in fact is a particular case of the multiples.

marblevolcano

Posted on:Thu Sep 15, 2016 1:44 am

Posts: 244Joined: Sun May 22, 2016 2:17 pm

Re: Full tables: "mod function" and "bitwise OR" (in the 8x8

I'm just going to comment on this to keep it at the top of the "Solving Strategies and Tips" section for reference.

marblevolcano

Posted on:Thu Sep 15, 2016 1:46 am

Posts: 244Joined: Sun May 22, 2016 2:17 pm

Re: Full tables: "mod function" and "bitwise OR" (in the 8x8

Also, could you have a mod cage with 3 or more cells? For example, 7mod4=3mod2=1 (This could be entirely wrong, but oh well ) which would be 1mod and contain 7, 4, and 2?

Also, could you have a mod cage with 3 or more cells? For example, 7mod4=3mod2=1 (This could be entirely wrong, but oh well ) which would be 1mod and contain 7, 4, and 2?

I agree, also in my opinion there is nothing wrong with iterating the mod function (and in fact it would be an interesting variation). The reason why I havenn't calculate the combinations for 3-cell (or more) cages is because since the beginning of the site, in 2009, Patrick has never proposed a puzzle where the mod function appeared in a cage bigger than 2 cells (including books, though the original intention of this post was to help in the site itself and not to cover all books later published, in fact, in the books, they have appeared wider than 8x8 puzzles with those functions). As soon as the mod function is extended I would try to extend the tables for those situations.

Similarly I havenn't seen any cage bigger than 3-cell with the Bitwise OR function.

(The exponentiation or subtraction cages require to "start" in a particular operand to obtain the final result, that is, some "sequence" is required in the operands while with the mod or Bitwise OR cages this is not necessary.)