ALGORITHM FOR THE SATISFACTION OF GAME CANNIBAL












VARIABLES: Cannibal (C1, C2, C3), monks, (M1, M2, M3), CANOA, SIDE A LADO B
To start the game press the PLAY button. I have three cannibals and three missionaries who want to cross the river, but the cannibals eat the missionaries, it depends on the number of missionaries who have depended on their side. The cannibal or the missionary who first must get into the canoe to another to complete the journey. (Note that on both sides of the river should not be more cannibals missionaries who, as the cannibals would eat the missionaries should be provided on both sides of the river. To move the canoe from side to side should click GO in this way can be moved from A andalusia Lada Lado B)
HOME
Make lick on PLAY to start
Click GO to start
While at A side
Give canoe C1 and C2
Side B starts up
Reach B side
When side B, down to C2
C1 is returned to side A
A hand reaches andalusia
Climb C3
C1 and C3 are returned to side B
Reach B side
C3 was low
C1 is returned to side A
A reaches lada A
C1 Low
M1 and M2 is rising
Pulled up beside B
Reach B side
M2 is low and rises C2
M1 and C2 are returned by side
Reach side A
C2 is low and rises M3
M1 and M3 pulled up beside B
Reach B side
M1y M3 down
Already M1, M2, M3, side B
C3 starts to go up side A
A hand reaches
Climb C2
C2 and C3 side B starts up
Reach B side
C2 is lowered
C3 is returned to side A
A hand reaches
Climb C1
C1 and C3 pulled up beside B
Reach B side
C1 and C3 are lowered
And are C1, C2 and C3 on B side
End

Read More......

ALGORITHM


In mathematics, computer science and related disciplines, an algorithm (from the Latin, dixit algorithmus and this in turn of the Persian mathematician al-Jwarizmi) is a well-defined, finite and orderly operations that allows the solution to a trouble. Given an initial state and input, through well-defined steps and reach a final state, obtaining a solution. The algorithms are studied in the algorithms.
In everyday life algorithms are used on numerous occasions to resolve various problems. Some examples are instructive in the (user manuals), which are algorithms to use the device in question, or even in the instructions received by an employee by his employer. There are also examples of mathematical nature, such as the division algorithm to compute the quotient of two numbers, the Euclidean algorithm to compute the greatest common divisor of two integers, or the Gauss method for solving a linear system of equations.






Algorithms and functions

Formally, an algorithm calculates a function. Any finite set is large, and any large group can be expressed in terms of the set of natural numbers (infinite, but many, in fact there is another set which is also a big number), in essence, all algorithm functions calculated defined in natural numbers. At this point, a function is partially or fully defined. A function is partial if there is no natural numbers that belong to your domain (ie, there are natural numbers on which the function is not defined), and is a total function otherwise.

If a function is partial, the algorithm calculates that only return a result (ie spends a finite time calculation) for the values on which the function is defined, not by returning a result (the computation time is infinite) for the remainder values. If an algorithm that calculates a function to return a partial result for the values of the function is not defined, then calculated according to that but to another. Similarly, an algorithm that computes a total function always returns a result for any value, and that like partial functions, it must exactly match the value returned by the function that calculates and repeatedly, if Otherwise, this function is not calculated but another. Thus, any algorithm calculates a function defined on natural numbers, whatever the nature.




Flow diagram
Flow The flow charts are graphic descriptions of algorithms, using symbols connected with arrows to indicate the sequence of instructions and are governed by ISO. Flow algorithms are used to represent small, covering a lot of space and its construction is laborious. For ease of reading are used as an introduction to the algorithms, a description language and description of processes to non-computing.
Pseudocode
The pseudocode Pseudocode is to describe an algorithm that resembles a programming language but with some conventions of natural language. Has several advantages over the flow, among which the little space that is required to represent complex instructions. The pseudocode is not governed by any standard. pseudo is false and hence is a code that is understandable but does not apply to the process to be performed by the machine.
Ejemplo
Home
Sleep to 1 until the alarm rings (or call Mom).
Watch the time.
Is there enough time?
If there is, then
Bathing.
Dressed.
Breakfast.
But Dressed.
Brush your teeth.
Say goodbye to mom and dad.
Is there enough time?
If waiting at.
But Running andalusia whereabouts.
Until we pass a bus to make the university:
Wait for the bus
See other people awaiting a bus.
Take the bus. Until we get to the university to:
Continue on the bus.
Mentally fight with the driver.
Ringer.
Lowered.
Go to college.
End

Read More......

DATABASE DATABASE







The word database was heard for the first time in 1963 at a symposium in California USA.Una database can be defined as a set of related information that is pooled or estructurada.Desde the standpoint of computer, the database is a system formed by a set of data stored on disks that allow direct access to them and a set of programs that manipulate the whole work was carried datos.Este order to learn more about a database, their characteristics, uses, structures, designs, otros.Una between database is of great importance in the rhythm of life we have at the present time because it is accelerating the pace at the time conducting a search information.

Some concepts of databases: Databases: Data collection is the apparent use by the system applications of a particular empresa.Base Data is a set of related information that is structured or clustered. A file itself is not a database, but rather how it is organized is the information that leads to the base of datos.

Base Data: collection of data organized to service many applications at the same time to combine the data so that they appear to be in a single location.



2. Design of a database There are different ways of organizing information and represent the relationships between data in a database. Systems DBAs conventional use of the three models a logical database to keep track of the entities, attributes and relationships. The three main models of logical databases are hierarchical, network and relational. Each logical model has certain advantages and certain processing advantages for business. Hierarchical Data Model: A kind of logical model database has a tree structure. A record divided into segments that are interconnected in parent-child relationships and more. The first systems DBAs were hierarchical. May represent two types of relationships between data: relationships one by one and one-to-many relationships Network data model: It is a variation of the hierarchical data model. In fact the database may result in a hierarchical network and vice versa in order to optimize the speed and convenience of processing. While describing the hierarchical structures of many to many relationships. Relational model of data: The most recent of these models, overcomes some of the limitations of the other two. The relational data model represents all data in the database as a simple two-dimensional tables called relations. Tables are similar to flat files, but information on more than one file can be easily extracted and combined.
3. Creating a database To create a base must be made two years of design: design a logical and a physical. The logical design of a database is an abstract model of the database from a business perspective, while the physical design shows how the database is actually stored in the storage device for direct access. The physical design of the database is carried out by experts in databases, while the logical design requires a detailed description of the information needs of the business of business end users from the current base. Ideally, the design of the database is part of an overall effort of planning level data institucional.El logical design of the database describes the elements in the database are to be grouped. The design process identifies relationships between data elements and the most efficient way of grouping to meet the reporting requirements. The process also identifies redundant elements and groupings of data elements that are required for specific applications programs. Groups of data are organized, streamlined and refined until an overall picture of the logical relationships between all elements in the database arise. Documentary databases: These are derived from the need to have all the information in the workplace and minimize the times of access to such information, although frequently used, are not structured properly. This is because wing source of information is varied (reports, notes, various newspapers, magazines, many more. Distributed databases is that it is stored in more than a physical place.

Read More......