Jump to content

User:Manoguru/sandbox

From Wikipedia, the free encyclopedia

Properties

[edit]

The congruence relations satisfies all the conditions of an equivalence relation:

  • Reflexivity: aa (mod n)
  • Symmetry: ab (mod n) if and only if ba (mod n)
  • Transitivity: If ab (mod n) and bc (mod n), then ac (mod n)

If a1b1 (mod n) and a2b2 (mod n), or if ab (mod n), then:

  • a + kb + k (mod n) for any integer k (compatibility with translation)
  • k ak b (mod n) for any integer k (compatibility with scaling)
  • a1 + a2b1 + b2 (mod n) (compatibility with addition)
  • a1 - a2b1 - b2 (mod n) (compatibility with subtraction)
  • a1 a2b1 b2 (mod n) (compatibility with multiplication)
  • akbk (mod n) for any non negative integer k (compatibility with exponentiation)
  • p(a) ≡ p(b) (mod n), for any polynomial p(x) with integer coefficients (compatibility with polynomial evaluation)

If ab (mod n), then it is false, in general, that kakb (mod n). However, one has:

For cancellation of common terms, we have the following rules:

  • If a + kb + k (mod n) for any integer k, then ab (mod n)
  • If k ak b (mod n) and k is coprime with n, then ab (mod n)

Lastly, let the multiplicative inverse of a be denoted by a-1, then we have the following rules:

  • Existence of a multiplicative inverse: there exists an integer denoted a-1 such that aa-1 ≡ 1 (mod n) if and only if a is coprime with n.
  • If ab (mod n) and a-1 exists, then a-1b-1 (mod n) (compatibility with multiplicative inverse)
  • If a xb (mod n) and a is coprime to n, the solution to this linear congruence is given by xa-1b (mod n)

In particular, if p is a prime number then a is coprime with p for every a such that 0 < a < p. Thus, a multiplicative inverse exists for all a that are not congruent to zero modulo p.

Some of the more advanced properties of congruence relations are the following:

  • Fermat's little theorem: If p is prime, then a p - 1 ≡ 1 (mod p) for 0 < a < p
  • Euler's theorem: If a and n are coprime, then a φ(n) ≡ 1 (mod n), where φ is Euler's totient function
  • A simple consequence of Fermat's little theorem is that if p is prime, then a-1a p - 2 (mod p) is the multiplicative inverse of 0 < a < p. More generally, from Euler's theorem, if a and n are coprime, then a-1a φ(n) - 1 (mod n).
  • Another simple consequence is that if ab (mod φ(n)), where φ is Euler's totient function, then kakb (mod n) provided k is coprime with n
  • Wilson's theorem: p is prime if and only if (p - 1)! ≡ -1 (mod p)
  • Chinese remainder theorem: If xa (mod m) and xb (mod n) such that gcd(m, n) = 1, then xb mn-1 m + a nm-1 n (mod mn) where mn-1 is the inverse of m modulo n and nm-1 is the inverse of n modulo m
  • Lagrange's theorem: The congruence f (x) ≡ 0 (mod p), where f (x) = a0 xn + ... + an (mod p) such that a0 ≠ (mod p) and p be prime, has at most n roots.
  • Primitive root modulo n: A number g is a primitive root modulo n if every number a co-prime to n is congruent to a power of g modulo n. That is, for every integer a co-prime to n, there is an integer k such that gka (mod n). A primitive root modulo n exits if and only if n is equal to 2, 4, pk or 2pk where pk is a power of an odd prime number. If the primitive roots modulo n exist, then there are exactly φ(φ(n)) such primitive roots, where φ is the Euler's totient function.
  • Quadratic residue: An integer a is called a quadratic residue modulo n if it is congruent to a perfect square modulo n; i.e., if there exists an integer x such that x2a (mod n). Otherwise, a is called a quadratic non-residue modulo n. For prime p, the Euler's criterion to check if a is or is not a quadratic residue is, as expressed using the Legendre symbol,

The properties of Legendre symbol and its variants can be used to efficiently check whether or not a number is a quadratic residue.

Euler's method

[edit]

Euler's method for constructing the magic square is similar to De la Hire's method. It consists of breaking the magic square into two primary squares, which when added gives the magic square. As a running example, we will consider a 3×3 magic square. We can uniquely label each number of the 3×3 square by a pair of numbers as

where each pairs of Greek and Latin alphabets, e.g. αa, are meant to be added together, i.e. αa = α + a. Here, (α,β,γ) = (0, 3, 6) and (a,b,c) = (1, 2, 3). An important general constraint to note here is that a Greek letter is paired with a Latin letter only once. Thus, the original square can now be split into two simpler squares:

A magic square can be constructed by ensuring that the Greek and Latin squares are magic squares too. However, the Greek and Latin squares with just three unique terms are much easier to deal with than the original square with nine different terms. The row sum and the column sum of the Greek square will be the same, α + β + γ, if each letter appears only once in a given column and a row. Likewise, for the odd square, since α, β, and γ are in arithmetic progression, their sum is equal to the order of the square times the middle term, i.e. α + β + γ = 3 β. Thus, the diagonal sums will be equal if we have βs in the main diagonal and α, β, γ in the skew diagonal. Similarly, for the Latin square. The resulting Greek and Latin squares and their combination will be as below. Note that the Latin square is just a rotation of the Greek square with the corresponding letters interchanged. Substituting the values of the Greek and Latin letters will give the 3×3 magic square.

Number of basic pandiagonal magic squares

[edit]

There are two basic ways of placing the four alphabets in the central 2×2 sub-square, not including the reflections, such that the letters are paired to their opposites along the column. Likewise there is only one way of placing the letters in the corners for a given central square (the complementary letters are placed at the opposite corners), such that the resulting square is pan-diagonal. Also there are just two basic ways of placing two complementary alphabets in the central square, not including rotations and reflections, which gives rise to pan-diagonal magic squares. Thus there 4 such basic Greek squares, as shown below. However, in order to ensure that the symbols are uniquely paired to each other, only the first two Greek squares can be used to construct a Latin square. Given a Greek square, a valid Latin square can be constructed by flipping it along the main diagonal or the skew diagonal, or rotating 90 degrees clockwise or anti-clockwise. This gives us 4 possible Latin squares from a given Greek square. Since we can pair one Latin square with any two Greek square, the total number of basic most-perfect 4×4 magic squares constructed this way are 2×4×2 = 16.

Formatting the cells

[edit]
4 9 2
3 5 7
8 1 6

8-by-8 magic square

[edit]

6-by-6 Square

[edit]

Another example of a 6×6 magic square constructed this way is given below, where the diagonal entries are arranged differently:

Composite Squares

[edit]

The "product" of two magic squares creates a magic square of higher order than the two multiplicands. Let the two magic squares be of orders M and N, such that MN, then the final square will be of order M × N. There will be N sub squares of M order which will also be a magic.

  1. Divide the final checkerboard into N × N sub-checkers of M × M squares.
  2. In the square N, reduce by 1 the value of all the numbers.
  3. Multiply these reduced values ​​by M × M. The results are reported in the boxes of each corresponding sub-checker of the final square.
  4. The squares of the square M are added N × N times to the boxes of the final checkerboard.

Bordering method

[edit]

In this method, the objective is to wrap a border around a smaller magic square which serves as a core. Let us consider the 3×3 square for example. Subtracting the middle number 5 from each number, we have 0, ± 1, ± 2, ± 3, and ± 4; and the magic constant will be zero. Putting the middle number 0 in the center cell, we want to construct a border such that the resulting square is magic. Let the border be given by:

u a v
b* 0 b
v* a* u*

Since the sum of each row, column, and diagonals must be a constant (which is zero), we have

a + a* = 0,
b + b* = 0,
u + u* = 0,
v + v* = 0.

Thus, it must be that if we have chosen a, b, u, and v, then we have a* = - a, b* = - b, u* = - u, and v* = - v. But how should we choose a, b, u, and v? We have the sum of the top row and the right column as

u + a + v = 0,
v + b + u* = 0.

Since 0 is an even number, there are only two ways that the sum of three numbers will yield an even number: 1) if all three were even, or 2) if two were odd and one was even. Since in our choice of numbers we only have two even non-zero number (± 2 and ± 4), it must be the case that the second statement is true: that two of the numbers are odd and one even.

The only way that both the above two equations can satisfy this parity condition simultaneously, and be consistent with the set of numbers we have, is when u and v are odd. Thus, taking u = 1 and v = 3, we have a = - 4 and b = -2. Hence, the finished square will be as in the left. Adding 5 to each number, we get the finished magic square.

Yang Hui's squares of order 7 and 8

[edit]

Medjig-method for squares of even order 2n, where n > 2

[edit]

The namesake of this method derives from mathematical game called medjig created by Willem Barink in 2006, although the method itself is much older. An early instance of a magic square constructed using this method occurs in Yang Hui's text for order 6 magic square. The LUX method to construct singly even magic squares is a special case of the medjig method, where only 3 out of 24 patterns are used to construct the medjig square.

The pieces of the medjig puzzle are 2×2 squares on which the numbers 0, 1, 2 and 3 are placed. There are three basic patterns by which the numbers 0, 1, 2 and 3 can be placed in a 2×2 square, where 0 is at the top left corner:

Each pattern can be reflected and rotated to obtain 8 equivalent patterns, giving us a total of 3×8 = 24 patterns. The aim of the puzzle is to take n2 medjig pieces and arrange them in an n × n medjig square in such a way that each row, column, along with the two long diagonals, formed by the medjig square sums to 3n, the magic constant of the medjig square. An n × n medjig square can create a 2n × 2n magic square where n > 2.

Given an n×n medjig square and an n×n magic square base, a magic square of order 2n×2n can be constructed as follows:

  • Each cell of an n×n magic square is associated with a corresponding 2×2 subsquare of the medjig square
  • Fill each 2×2 subsquares of the medjig square with the four numbers from 1 to 4n2 that equal the original number modulo n2, i.e. x+n2y where x is the corresponding number from the magic square and y is a number from 0 to 3 in the 2×2 subsquares.

The sums of each medjig piece along the rows, columns and diagonals, denoted in italics, are:

Doubly even squares: The smallest medjig square is of order 2 with magic constant 6. While it is possible to construct a 2×2 medjig square, we cannot construct a 4×4 magic square from it since 2×2 magic squares required to "multiply" it does not exist. Nevertheless, it is worth constructing these 2×2 medjig squares. There exists 96 such 2×2 medjig squares. In the examples below, each 2×2 medjig square is made by combining different orientations of a single medjig piece.

We can use the 2×2 medjig squares to construct larger even ordered medjig squares. One possible approach is to simply combine the 2×2 medjig squares together. Another possibility is to wrap a smaller medjig square core with a medjig border. The pieces of a 2×2 medjig square can form the corner pieces of the border. An example of an 8×8 magic square is constructed below by combining four copies of the left most 2×2 medjig squares given above:

The next example is constructed by bordering a 2×2 medjig square core.

Singly even squares: Medjig square of order 1 does not exist. As such, the smallest odd ordered medjig square is of order 3, with magic constant 9. There are only 7 ways of partitioning the integer 9, our magic constant, into three parts. If these three parts correspond to three of the medjig pieces in a row, column or diagonal, then the relevant partitions for us are

9 = 1 + 3 + 5 = 1 + 4 + 4 = 2 + 3 + 4 = 2 + 2 + 5 = 3 + 3 + 3.

Once a 3×3 medjig square has been constructed, we can convert it into a 6×6 magic square. For example:

An easy approach to construct higher order odd medjig square is by wrapping an smaller odd ordered medjig square with a medjig border, just as with even ordered medjig squares.

List of FM radio stations in Nepal [1] [2]

[edit]
Call Sign Frequency (MHz) District Operator Language Genre First air date
Radio Nepal 100 Kathmandu Radio Nepal
Radio Sagarmatha 102.4 Lalitpur Nepal Forum of Environmental Journalist
Radio Kantipur FM 96.1 Lalitpur Kantipur FM Pvt. Ltd.
Image Channel KATH 97.9 Kathmandu Image Channel Pvt. Ltd.
Metro FM 94.6 Kathmandu Kathmandu Metropolitan City Government
Hits FM 91.2 Kathmandu Hits Nepal Pvt. Ltd.
Radio Upatyaka 87.6 Kathmandu Narayan Pariwar Club
Nepali ko Radio 88.8 Bhaktapur
Radio Mirmire 89.4 Kathmandu Mechi Kali Sanchar Pvt. Ltd.
Ujyaalo FM 90.0 Lalitpur Communication Corner Pvt. Ltd.
Times FM 90.6 Lalitpur Valley FM Pvt. Ltd.
Nepal FM 91.8 Kathmandu Rainbow FM Pvt. Ltd.
Capital FM 92.4 Kathmandu Malijarjun FM Pvt. Ltd.
Gorkha FM 93.0 Kathmandu British Gorkha Media Network Pvt. Ltd.
HBC FM 94.0 Kathmandu Himalaya Broadcasting Company Pvt. Ltd.
Star FM 95.2 Kathmandu Radio Broadcasting Services Development Committee
Radio City 98.8 Kathmandu National Broadcasting Pvt. Ltd.
Maitri FM 99.4 Kathmandu Bhassara Vision Pvt. Ltd.
Classic FM 101.2 Kathmandu
Radio Filmy 101.8 Kathmandu Gopi Krishna Movies Pvt. Ltd.
Adhyatma Jyoti FM 104.8 Kathmandu
CJMC Radio 106.0 Kathmandu College of Journalism and Mass Communication
Bhaktapur FM 105.4 Bhaktapur
Newa FM 106.6 Kathmandu Newar Cultural Center
TU FM 107.0 Kathmandu Tribhuvan University
ABC News Radio 100.6 Kathmandu
BBC Radio 103.0 Lalitpur BBC World Service
Radio Audio 106.3 Kathmandu
Radio Namobuddha 106.7 Kavre Jugal Association Nepal
Radio Madhya Bindu 101.0 Nawalparasi Samudayik Sachetna Tatha Sanchar Prathisthan
Saypatri FM 91.6 Baglung
Baglung FM 96.4 Baglung Baglung Suchana Tatha Sanchar Sahakari Sanstha Ltd
Dhaulagiri FM 98.6 Baglung
Saipal Radio 100.6 Bajhang Group for Social Development Nepal
Radio ABC 89.8 Kavre Araniko Broadcasting Community Radio
Bheri Awaj FM 95.6 Banke Research for Humanism Center
Rupandehi FM 99.2 Rupandehi Save the Environment Movement
Radio Kantipur FM 96.1 Rupandehi Kantipur FM Pvt. Ltd.
Synergy FM 91.6 Chitwan
Kalika FM 95.2 Chitwan
Bageshwori FM 94.6 Banke
Bheri FM 105.4 Banke Nepal Press Institute
Radio Kantipur FM 101.8 Banke Radio Kantipur Ptv. Ltd.
Radio Nepal 103 Chitwan
Birat FM 91.2 Morang Birat Shree Media Network Pvt. Ltd.
Koshi FM 94.3 Morang
Saptakoshi FM 105.6 Morang
Sky FM 106.6 Morang
Gadimai FM 91.4 Parsa Bara Media Pvt. Ltd.
Birgunj FM 99.0 Parsa Parsa FM Pvt. Ltd
Butwal FM 94.4 Rupandehi
Radio Lumbini FM 96.8 Rupandehi Lumbini Information and Communication Cooperative Ltd.
Tinau FM 98.2 Rupandehi
Damauli FM 94.2 Tanahun Tanahun Sanchar Sahakari Sanstha Ltd.
Swargadwari FM 102.8 Dang Swargadwari Sanchar Kendra
Radio Gurubaga 106.4 Bardiya Prachin Srijanshil Aadiwashi Samaj
Radio Parasi 90.2 Parasi Parasi Suchana Tatha Sanchar Sahakari Ltd.
Vijaya FM 101.6 Nawalpur Vijaya Community Information and Communications Cooperative Society Ltd.
Madan Pokhara FM 106.9 Palpa Madan Pokhara Village Development Committee
Radio Rampur 103.6 Palpa Kaligandaki Community Development Center
Shreenagar FM 93.2 Palpa
Radio Paschimanchal 99.4 Palpa
Muktinath FM 90.8 Palpa Palpa Communication Cooperative Organization Ltd.