Showing posts with label Mental Maths. Show all posts
Showing posts with label Mental Maths. Show all posts

Monday, October 19, 2009

Kakuro puzzles resemble crosswords which use numbers instead of words. The aim of the game is to fill all the blank squares in the grid with only the numbers 1-9 so that the numbers you enter add up to the corresponding clues. When the grid is filled, the puzzle is complete. Sometimes called "Cross-sums" or "Kakro", Kakuro is Sudoku's bigger (and harder) brother.

Kakuro puzzle grids can be any size, though usually the squares within them have to be arranged symmetrically. As a rule of thumb, the more blank squares a puzzle contains, the harder it is, however this isn't always true, especially if it is a good quality puzzle.

NOTE: It is very important to note that a proper Kakuro puzzle has only 1 unique solution, and it will always have a logical way of reaching it, there should be no guesswork needed.



An easy Kakuro puzzle




Solution for the above puzzle

In discussing Kakuro puzzles and tactics, the typical shorthand for referring to an entry is "(clue, in numerals)-in-(number of cells in entry, spelled out)", such as "16-in-two" and "25-in-five". The exception is what would otherwise be called the "45-in-nine" — simply "45" is used, since the "-in-nine" is mathematically implied (nine cells is the longest possible entry, and since it cannot duplicate a digit it must consist of all the digits from 1 to 9 once). Curiously, "3-in-two", "4-in-two", "5-in-two", "43-in-eight", and "44-in-eight" are still frequently called as such, despite the "-in-two" and "-in-eight" being equally implied.

Solving techniques

Although brute-force guessing is of course possible, a better weapon is the understanding of the various combinatorial forms that entries can take for various pairings of clues and entry lengths. Those entries with sufficiently large or small clues for their length will have fewer possible combinations to consider, and by comparing them with entries that cross them, the proper permutation — or part of it — can be derived. The simplest example is where a 3-in-two crosses a 4-in-two: the 3-in-two must consist of '1' and '2' in some order; the 4-in-two (since '2' cannot be duplicated) must consist of '1' and '3' in some order. Therefore, their intersection must be '1', the only digit they have in common.

It is common practice to mark potential values for cells in the cell corners until all but one have been proven impossible; for particularly challenging puzzles, sometimes entire ranges of values for cells are noted by solvers in the hope of eventually finding sufficient constraints to those ranges from crossing entries to be able to narrow the ranges to single values. Because of space constraints, instead of digits some solvers use a positional notation, where a potential numerical value is represented by a mark in a particular part of the cell, which makes it easy to place several potential values into a single cell. This also makes it easier to distinguish potential values from solution values.

I find this game to be more interesting than Su-do-ku. I had never been interested in Su-do-ku though I like number puzzles in general! This game is a perfect replacement to Su-do-ku!

You can play this game online at http://www.kakuro.com/playonline.php



My First Kakuro puzzle (Took 19 minutes 32 seconds to solve this puzzle!)

Saturday, September 20, 2008

Zeller's Rule



Zeller's rule is used to calculate the day on which any date falls for any year. With this technique you will have the calendar for any given year available to you.

The rule is as follows

f = k + [(13*m - 1)/5] + d + [d/4] + [c/4] - 2*c

where,

k = day of month
m = month number, taking Mar=1, ..., Dec=10, Jan=11, Feb=12
d = last two digits of year, using the previous year for Jan and Feb
c = first two digits of year

Rules:

1.In Zeller's rule the year begins in March and ends in February. Hence, the month number from March is 1, April is 2, May is 3 and so on up to January, which is 11, and February is 12.

2.January and February are counted as the 11th and 12th months of the previous year. Hence, if you are calculating the day of any date on January 2026, the notation will be (month=11 and year= 2025) instead of (month=1 and year=2026).

3.While calculating, we drop off every number after the decimal point.

4.Once we have found the answer we divide it by 7 and take the remainder. Remainder 0 corresponds to Sunday; Remainder 1 corresponds to Monday ; Remainder 2 corresponds to Tuesday and so on....

Example:

Find the day on 26th June 1983

f = k + [(13*m - 1)/5] + d + [d/4] + [c/4] - 2*c

Here k=26, m=4, d=83, c =19

f= 26+(13*4-1/5)+83+83/4+19/4-2*19
= 105

105 divided by 7 leaves a remainder 0. Hence the day is a Sunday!


Derivation of the formula:

Here we're defining

k = day of month
m = month number, taking Mar=1, ..., Dec=10, Jan=11, Feb=12
d = last two digits of year, using the previous year for Jan and Feb
c = first two digits of year

The formula is then

f = k + [(13*m - 1)/5] + d + [d/4] + [c/4] - 2*c

and we use the remainder after dividing f by 7 to find the day of the
week.

Where does this come from? Let's first note the reason for the odd
handling of months: we want leap day not to affect the formula, so we
move it to the end of the 'year', and act as if the year began on
March 1.

Now note that in defining f, all we care about is the remainder after
dividing, so it will be enough to make sure that f increases by 1
whenever the day of the week advances by one day; we don't care about
the actual value of f.

Now let's build the formula piece by piece.

How does the year affect the day? Well, since 365 = 7*52+1, each
normal year advances the day by 1, so our formula can start with the
year number:

f = d

Whenever the year advances by 1, so does the day of the week.

But we have to adjust this to account for leap years. Every four years
we have an extra day, so we'll want to add 1 to f. This is done by
adding [d/4], since this increases by 1 only when d becomes a multiple
of 4, which is a leap year. So now we have

f = d + [d/4]

Now how do centuries affect the day? A century contains 100 years, 24
of which normally are leap years (since century days, like 1900, are
NOT leap years). So each century the day advances by 124 days, which
is 7*18-2, and therefore the day of the week goes BACK 2 days. So we
have

f = d + [d/4] - 2*c

But every fourth century year IS a leap year (as 2000 was), so we
have to adjust just as we did for leap years:

f = d + [d/4] - 2*c + [c/4]

Now we come to the months, and this is the cute part. Consider, for
each month, how many days it has BEYOND 28, and then add that up to
see the effect the months have on the day of the week:

1 2 3 4 5 6 7 8 9 10 11 12
Month Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb
Days 31 30 31 30 31 31 30 31 30 31 31 (28)
Excess 3 2 3 2 3 3 2 3 2 3 3 0
Accum 0 3 5 8 10 13 16 18 21 23 26 29
\_________________/\__________________/\_______

The number of accumulated days is counted at the start of the month,
so if we divide it by 7, the remainder shows how many weekdays the
start of the month is from the starting day for the 'year'.

Notice the pattern in the excess: 3,2,3,2,3 repeats every five months,
and the accumulation reaches 13 in that time. So every 5 months, we
want to add 13 days. That suggests that we want to add a term like
[13m/5]. That doesn't quite give us what we want:

1 2 3 4 5 6 7 8 9 10 11 12
Month Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb
Days 31 30 31 30 31 31 30 31 30 31 31 (28)
Excess 3 2 3 2 3 3 2 3 2 3 3 0
Accum 0 3 5 8 10 13 16 18 21 23 26 29
13m 13 26 39 52 65 78 ...
[13m/5] 2 5 7 10 13 15 ...

If we subtract 2 from this, it isn't quite right; we have to shift it
a bit. So after playing with it a bit, we find

13m-1 12 25 38 51 64 77 ...
[(13m-1)/5] 2 5 7 10 12 15 ...
[(13m-1)/5]-2 0 3 5 8 10 13 ...

That's just what we want. So we'll use

f = d + [d/4] - 2*c + [c/4] + [(13m-1)/5] - 2

Finally, we have to add the day, since each day obviously adds one to
the day of the week; and adjust to get the right day of the week for,
say, Mar 1, 2000, since nothing we've done so far actually determined
WHICH day we start the whole pattern on. It turns out that we can just
remove the -2, and we get

f = d + [d/4] - 2*c + [c/4] + [(13m-1)/5] + k

And there's the formula!

Wednesday, August 13, 2008

Yes they can be happy?
Then, what is a happy number?



A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers, while those that do not end in 1 are unhappy numbers.

More formally, given a number n = n0, define a sequence n1, n2, ... where ni + 1 is the sum of the squares of the digits of ni. Then n is happy if and only if there exists i such that ni = 1.
If a number is happy, then all members of its sequence are happy; if a number is unhappy, all members of its sequence are unhappy.

For example, 7 is happy, as the associated sequence is:
7^2 = 49
4^2 + 9^2 = 97
9^2 + 7^2 = 130
1^2 + 3^2 + 0^2 = 10
1^2 + 0^2 = 1.

The happy numbers below 500 are

1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, 103, 109, 129, 130, 133, 139, 167, 176, 188, 190, 192, 193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291, 293, 301, 302, 310, 313, 319, 320, 326, 329, 331, 338, 356, 362, 365, 367, 368, 376, 379, 383, 386, 391, 392, 397, 404, 409, 440, 446, 464, 469, 478, 487, 490, 496.

If n is not happy, then its sequence does not go to 1. What happens instead is that it ends up in the cycle.

4, 16, 37, 58, 89, 145, 42, 20, 4, ...
To see this fact, first note that if n has m digits, then the sum of the squares of its digits is at most 81m. For m = 4 and above,so any number over 1000 gets smaller under this process. Once we are under 1000, the number for which the sum of squares of digits is largest is 999, and the result is 3 times 81, that is, 243.

In the range 100 to 243, the number 199 produces the largest next value, of 163.
In the range 100 to 163, the number 159 produces the largest next value, of 107.
In the range 100 to 107, the number 107 produces the largest next value, of 50.

Happy Primes

A happy prime is a happy number that is prime. The happy primes below 500 are
7, 13, 19, 23, 31, 79, 97, 103, 109, 139, 167, 193, 239, 263, 293, 313, 331, 367, 379, 383, 397, 409, 487.
All numbers, and therefore all primes, of the form 10n + 3 and 10n + 9 are happy. To see this, note that these numbers yield values of either 12 + 02 + 02 + ... + 02 + 02 + 32 = 10 → 12 + 02 = 1 or 12 + 02 + 02 + ... + 02 + 02 + 92 = 82 → 82 + 22 = 68 → 62 + 82 = 100 → 12 + 02 + 02 = 1.

Wednesday, March 5, 2008




Don’t you just love it when you outsmart the teachers....

Thursday, December 20, 2007

I won't call this as the easiest method.
But this is a different multiplication method.



And you should have liked this since it is real,unlike the previous video :-)

For multiplication of large numbers a method is shown in this video.



Hope you liked the video.