Posted on

Analysis of Algorithms

Big O notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. It is a member of a family of notations invented by Paul Bachmann, Edmund Landau, and others, collectively called Bachmann–Landau notation or asymptotic notation.

Two simple concepts separate properties of an algorithm itself from properties of a particular computer, operating system, programming language, and compiler used for its implementation. The concepts, briefly outlined earlier, are as follows:

The input data size, or the number n of individual data items in a single data instance to be processed when solving a given problem. Obviously, how to measure the data size depends on the problem: n means the number of items to sort (in sorting applications), number of nodes (vertices) or arcs (edges) in graph algorithms, number of picture elements (pixels) in image processing, length of a character string in text processing, and so on.

The number of elementary operations taken by a particular algorithm, or its running time. We assume it is a function f(n) of the input data size n. The function depends on the elementary operations chosen to build the algorithm.

Algorithms are analyzed under the following assumption: if the running time of an algorithm as a function of n differs only by a constant factor from the running time for another algorithm, then the two algorithms have essentially the same time complexity. Functions that measure running time, T(n), have nonnegative values
because time is nonnegative, T(n) ≥ 0. The integer argument n (data size) is also nonnegative.

Definition 1 (Big Oh)

Let f(n) and g(n) be nonnegative-valued functions defined on nonnegative integers n. Then g(n)is O(f(n)) (read “g(n)is Big Oh of f(n)”) iff there exists a positive real constant c and a positive integer n0 such that g(n) ≤ c f(n) for all n > n0.

Note. We use the notation “iff ” as an abbreviation of “if and only if”.

Continue reading Big Oh(O) Big Theta(Θ) Big Omega(Ω)
Posted on

Pascal’s Triangle

Pascal’s Triangle was originally developed by the ancient Chinese, but Blaise Pascal was the first person to discover special patterns contained inside the triangle. They teach his ideas in various schools online in math courses. You probably also heard of this guy from your high school math teacher.

Triangular numbers appear in Pascal’s Triangle. In fact, the 3rd diagonal of Pascal’s Triangle gives all triangular numbers as shown below:

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1
1 9 36 84 126 126 84 36 9 1

Posted on

Three ways to see an atom

If there is no way in the world to see an atom, then how do we know that the atom is made of protons, electrons, neutrons, the nucleus and the electron cloud?

There are three ways that scientists have proved that these sub-atomic particles exist. They are direct observation, indirect observation or inferred presence and predictions from theory or conjecture.

Scientists in the 1800’s were able to infer a lot about the sub-atomic world from The Periodic Table of Elements by Mendeleyev gave scientists two very important things. The regularity of the table and the observed combinations of chemical compounds prompted some scientists to infer that atoms had regular repeating properties and that maybe they had similar structures.

Other scientists studying the discharge effects of electricity in gasses made some direct discoveries. J.J. Thompson was the first to observe and understand the small particles called electrons. These were called cathode rays because they came from the cathode, or negative electrode, of these discharge tubes. It was quickly learned that electrons could be formed into beams and manipulated into images that would ultimately become television. Electrons could also produce something else. Roentgen discovered X-rays in 1895. His discovery was a byproduct of studying electrons. Protons could also be observed directly as well as ions as “anode” rays. These positive particles made up the other half of the atomic world that the chemists had already worked out. The chemists had measured the mass or weight of the elements. The periodic chart and chemical properties proved that there was an atomic number also. This atomic number was eventually identified as the charge of the nucleus or the number of electrons surrounding an atom which is almost always found in a neutral, or balanced, state.

Rutherford proved in 1911, that there was a nucleus. He did this directly by shooting alpha particles at other atoms, like gold, and observing that sometimes they bounced back the way they came. There was no way this could be explained by the current picture of the atom which was thought to be a homogeneous mix. Rutherford proved directly by scattering experiments that there was something heavy and solid at the center. The nucleus was discovered. For about 20 years the nucleus was thought to consist of a number of protons to equal the atomic weight and some electrons to reduce the charge so the atomic number came out right. This was very unsettling to many scientists. There were predictions and conjectures that something was missing.

In 1932 Chadwick found that a heavy neutral particle was emitted by some radioactive atoms. This particle was about the same mass as a proton, but it had a no electric charge. This was the “missing piece” (famous last words). The nucleus could now be much better explained by using neutrons and protons to make up the atomic weight and atomic number. This made much better sense of the atomic world. There were now electrons equal to the atomic number surrounding the nucleus made up of neutrons and protons.

Mr. Roentgen’s x-rays allowed scientists to measure the size of the atom. The x-rays were small enough to discern the atomic clouds. This was done by scattering x-rays from atoms and measuring their size just as Rutherford had done earlier by hitting atoms with other nuclei starting with alpha particles.

The 1930’s were also the time when the first practical particle accelerators were invented and used. These early machines made beams of protons. These beams could be used to measure the size of the atomic nucleus. And the search goes on today. Scientists are still filling in the missing pieces in the elementary particle world. Where will it end? Around about 1890, scientists were lamenting the death of physics and pondering a life reduced to measuring the next decimal point! Discoveries made in the 1890’s proved that the surface had only been scratched.

Each decade of the 1900’s has seen the frontier pushed to smaller and smaller objects. The explosion of knowledge has not slowed down and as each threshold has been passed the amount of new science seems to be greater even as we probe to smaller dimensions. Current theories (if correct) imply that there is even more below the next horizon awaiting discovery

Text Author: Paul Brindza, Experimental Hall A Design Leader

Source: https://education.jlab.org/qa/history_04.html
Posted on

Buckminster Fuller explains threeness in the Universe

Buckminster Fuller

1. The stability of the triangle
2. The one quantum created in the tetrahedron
3. How the icosahedron, the octahedron and tetrahedron create everything in the universe

Posted on

The Three Development Paradigms: Procedural, Object-Oriented, and Functional | WPShout

When you’re brand new to development in PHP or JavaScript, you don’t really need or want to think too hard about programming paradigms. You just want to get things to work. And that makes a lot of sense. But eventually as you go along, you start to wonder. What’s this “OOP” thing people seem obsessed with? Am I doing that? Should I be?

Fundamentally, this article is for people in a place like that. Our goal today is to clarify what these three major paradigms in software development are, how they relate to each other, and which you’ll want to use when. Contrary to popular belief, there isn’t a “right” or “wrong” answer ever.

Before we start breaking down all the programming paradigms we’ll cover, it makes sense to be clearer about what we mean by “paradigms”. To cite a definition which is relevant, the American Heritage Dictionary says a paradigm is:

A set of assumptions, concepts, values, and practices that constitutes a way of viewing reality for the community that shares them, especially in an intellectual discipline

Posted on

Tetrahedron

Four triangular faces along with six edges meeting at four vertices together describe the regular tetrahedron. The tetrahedron is the root of all entanglements that shape the perceivable bonds that hold life together in this dimension. The regular tetrahedron can be found at the source of all three-dimensional forms and is fundamental in the creation of all patterns and holographic configurations.

“All of the definable structuring of Universe is tetrahedrally coordinate in rational number increments of the tetrahedron. By tetrahedron, we mean the minimum thinkable set that would subdivide the Universe and have the interconnectedness where it comes back upon itself. The basic structural unit of physical Universe quantation, tetrahedron has the fundamental prime number oneness.”

Buckminster Fuller

“Within it (tetrahedron) lies the energy that holds all life together. The bonds that hold atoms, particles and molecules together, all the way down to nanoparticles and all the way up to macroparticles, are tetrahedral. Everything that exists as you conceive of it in a 3-dimensional world, is held together by these tetrahedral bonds.”

Buckminster Fuller

“The tetrahedron is a form of energy package. The tetrahedron is transformable…All of the definable structuring of Universe is tetrahedrally coordinate in rational number increments of the tetrahedron.”

Buckminster Fuller

“Two Triangular Energy Events Make Tetrahedron: The open-ended triangular spiral can be considered one “energy event” consisting of an action, reaction and resultant. Two such events (one positive and one negative) combine to form the tetrahedron.”

Buckminster Fuller

Posted on

The shape of the universe

There are three possible geometries of the universe: closed, open and flat from top to bottom. The closed universe is of finite size and, due to its curvature, traveling far enough in one direction will lead back to one’s starting point. The open and flat universes are infinite and traveling in a constant direction will never lead to the same point.

Universe with positive curvature. A positively curved universe is described by elliptic geometry, and can be thought of as a three-dimensional hypersphere, or some other spherical 3-manifold (such as the Poincaré dodecahedral space), all of which are quotients of the 3-sphere.

Posted on

TREE[3]

Professor Tony Padilla on the epic number, TREE(3). Continues at: https://youtu.be/IihcNa9YAPk

Some math conjectures and theorems and proofs can take on a profound, quasi-religious status as examples of the limits of human comprehension. TREE(3) is one of those examples.

“You’ve got all these physical processes going on in the universe all around you. None of them are anything compared to TREE(3),” says University of Nottingham mathmatics professor Tony Padilla in a new episode of the wonderful YouTube series Numberphile.

Posted on

Pythagorean theorem

What do Euclid, 12-year-old Albert Einstein, and American President James A. Garfield have in common?

They all came up with elegant proofs for the famous Pythagorean theorem:

In mathematics, the Pythagorean theorem, also known as Pythagoras’s theorem, is a fundamental relation in Euclidean geometry among the three sides of a right triangle. It states that the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides.

What do Euclid, 12-year-old Albert Einstein, and American President James A. Garfield have in common?

Posted on

How Many Triangles Do You See? The Answer Will Reveal If You Have High IQ

At first sight, it seems like a simple question to answer. But there’s more to it than meets the eye. So, we have to put our minds to work.

They say that if you can see 18, your IQ is 120 or higher. After you count them look at the next image.

Continue reading How Many Triangles Do You See? The Answer Will Reveal If You Have High IQ

Posted on

Scientists just got one of the best measures yet of a fundamental of physics

Beneath three glass bell jars, in a locked vault in the basement of a highly secure facility outside Paris, sits the world’s most important kilogram.

Ever since 1889, when the General Conference on Weights and Measures (CGPM) made the imperious pronouncement, “this prototype shall henceforth be considered to be the unit of mass,” this platinum and iridium cylinder has served as the standard by which all other kilograms are measured, from the weights on a high-tech lab scale to the plastic discs high schoolers use in chemistry class. It’s known as “le Grand K,” and it’s afforded the security and scrutiny befitting such a fancy title. Even the researchers who work with it can’t touch it, lest their fingertips wipe away atoms or leave residue on the gleaming surface. The vault containing the cylinder can only be opened by gathering three custodians carrying three different keys, and that’s happened fewer than a dozen times in the kilogram’s 127-year history.  Continue reading Scientists just got one of the best measures yet of a fundamental of physics