Drawing up a block diagram online. Block diagram online: how to present information structurally

Algorithm- an exact final system of rules described in a certain language that determines the content and order of actions on certain objects, the strict implementation of which gives a solution to the problem. The concept of an algorithm, which is fundamental in mathematics and computer science, arose long before the advent of computer technology. The word “algorithm” appeared in the Middle Ages, when Europeans became acquainted with the methods of performing arithmetic operations in the decimal number system, described by the Uzbek mathematician Muhamed bin Al-Khwarizmi. The word algorithm is the result of the European pronunciation of Al-Khwarizmi’s words. Initially, the algorithm was understood as a method of performing arithmetic operations on decimal numbers. Later, this concept began to be used to denote any sequence of actions leading to the solution of a given problem. Any algorithm does not exist on its own, but is intended for a specific performer (human, robot, computer, programming language, etc.). The meaning of the word “ algorithm" is very similar to the meanings of the words "recipe", "method", "process". However, unlike a recipe or process, an algorithm is characterized by the following properties:

discreteness, mass character, certainty, effectiveness, formality.

Discreteness(discontinuity) is a property of an algorithm that characterizes its structure: each algorithm consists of individual completed actions, they say “Divided into steps.”

Mass character- applicability of the algorithm to all problems of the type under consideration, for any initial data. For example, an algorithm for solving a quadratic equation in the domain of real numbers must contain all possible outcomes of the solution, i.e., having considered the values ​​of the discriminant, the algorithm finds either two different roots of the equation, or two equal ones, or concludes that there are no real roots.

Certainty(determinism, accuracy) - a property of an algorithm, indicating that each step of the algorithm must be strictly defined and not allow different interpretations. The order in which the individual steps are performed must also be strictly defined.

Efficiency- a property consisting in the fact that any algorithm must be completed in a finite (maybe very large) number of steps. Formality - this property indicates that any performer capable of perceiving and executing the instructions of the algorithm acts formally, i.e. is distracted from the content of the task at hand and only strictly follows instructions. Reasoning “what, how and why?” The developer of the algorithm must do it, and the performer formally (without thinking) one by one executes the proposed commands and obtains the required result.

1.2.Methods of describing (types) of algorithms.

Consider the following ways to describe the algorithm: verbal description, pseudocode, block diagram, program.

Verbal description represents the structure of an algorithm in natural language. For example, any household appliance (iron, electric saw, drill, etc.) has an instruction manual, i.e. a verbal description of the algorithm in accordance with which this device should be used. There are no rules for composing a verbal description. The algorithm is written in any form in a natural language, for example, Russian. This method of description is not widespread, since it is not strictly formalized (by “formal” we mean that the description is absolutely complete and takes into account all possible situations that may arise during the solution); allows for ambiguity of interpretation when describing certain actions; suffers from verbosity.

Pseudocode- description of the structure of the algorithm in a natural, partially formalized language, allowing one to identify the main stages of solving a problem before writing it exactly in a programming language. Pseudocode uses some formal constructs and common mathematical symbols. There are no strict syntax rules for writing pseudocode. This makes it easier to write the algorithm during design and allows you to describe the algorithm using any set of commands. However, pseudocode usually uses some of the constructs inherent in formal languages, which makes it easier to move from pseudocode to writing an algorithm in a programming language. There is no single or formal definition of pseudocode, so various pseudocodes are possible, differing in the set of words and structures used.

Block diagram- description of the structure of the algorithm using geometric figures with connection lines showing the order of execution of individual instructions. This method has a number of advantages. Thanks to its clarity, it ensures the “readability” of the algorithm and clearly displays the order in which individual commands are executed. In a block diagram, each formal design corresponds to a specific geometric figure or a set of figures connected by lines.

Descriptions of the algorithm in verbal form, in pseudocode or in the form of a flowchart allow some arbitrariness in the depiction of commands. At the same time, they are so sufficient that they allow a person to understand the essence of the matter and execute the algorithm. In practice, computers act as executors of algorithms. Therefore, an algorithm intended for execution on a computer must be written in a language “understandable” to it; such a formalized language is called programming language.

Program- description of the structure of the algorithm in an algorithmic programming language.

Specifying algorithms using flowcharts has proven to be a very convenient means of depicting algorithms and has become widespread.

Block diagram algorithm - a graphical representation of the algorithm in the form of interconnected ones using arrows (transition lines) and blocks- graphic symbols, each of which corresponds to one step of the algorithm. Inside the block a description of the corresponding action is given.

The table shows the most commonly used symbols.

Symbol name

Designation and example of filling

Explanation

Computational action or sequence of actions

Checking conditions

Modification

Start of the cycle

Predefined process

Calculations by subroutine, standard subroutine

Input Output

I/O in General

Start-stop

Beginning, end of the algorithm, entry and exit to the subroutine

Document

Output of results

Flowchart Symbols

Block " process"is used to denote an action or sequence of actions that changes the meaning, form of presentation or placement of data. To improve the clarity of the diagram, several individual processing blocks can be combined into one block. The presentation of individual operations is quite free.

Block " solution" is used to indicate conditional control transitions. Each "solution" block must identify the question, condition, or comparison that it defines.

Block " modification» used to organize cyclic structures. (The word “modification” means “modification, transformation”). A cycle parameter is written inside the block, for which its initial value, boundary condition and step of changing the parameter value are indicated for each repetition.

Block " predefined process" is used to indicate calls to auxiliary algorithms that exist autonomously in the form of some independent modules, and for calls to library routines.

For example, here is a block diagram of the algorithm for finding the maximum of two values:

Basic elements of a block diagram. Types of flowcharts.

The description of an algorithm using block diagrams is carried out by drawing a sequence of geometric figures, each of which implies the execution of a specific action of the algorithm. The order of actions is indicated by arrows. Writing algorithms using flowcharts is regulated by GOST. The appearance of the main blocks used when writing block diagrams is shown in the figure.

Representing the program algorithm in the form of a block diagram has two disadvantages:

· assumes too low a level of detail, which often hides the essence of complex algorithms

· and allows you to use non-structural methods of transferring control (goto), and often on the algorithm diagram they look simpler than equivalent structural ones.

In addition to diagrams, you can use pseudocodes, Flow forms And Nussi-Schneiderman diagrams. All of the listed methods, on the one hand, are based on the same basic structures, and on the other hand, allow different levels of detail.

Each Flow-form symbol corresponds to a control structure and is depicted as a rectangle. To demonstrate the nesting of structures, the Flow-form symbol fits into the corresponding area of ​​the rectangle of any other symbol. Flow-form symbols corresponding to the main and additional control structures are shown in Figure A1.

<Действие>
A)
b)
V)
G)
e)

Figure A2 - Symbols of Nussi-Schneiderman diagrams for basic structures:

a - following; b - branching; c - choice; r - cycle-bye; d - cycle-to

The main difference between Nussi-Schneiderman diagrams and Flow forms is that the area for indicating conditions and branching options is depicted in the form of triangles (Figure A2). This designation provides greater clarity of the algorithm.

A common disadvantage of Flow forms and Nussi-Schneiderman diagrams is the complexity of constructing symbol images, which complicates the practical use of these notations for describing large algorithms.

Unlike flowcharts, pseudocodes do not limit the level of detail of operations, but, not being graphical, they display their nesting worse.

It is impossible to describe a non-structural algorithm using pseudocodes, Flow-forms and Nussi-Schneiderman diagrams, since they lack conventions for non-structural transfer of control. Their use initially focuses the designer only on structural methods of transferring control, and therefore requires a thorough analysis of the algorithm.

Depending on the sequence of actions in the algorithm, the following algorithms are distinguished:

· linear,

· branched

· and cyclic structure.

In linear structure algorithms, actions are performed sequentially one after another.

In branched structure algorithms, depending on the fulfillment or non-fulfillment of any condition, various sequences of actions are performed. Each such sequence of actions is called a branch of the algorithm.

In cyclic structure algorithms, depending on the fulfillment or non-fulfillment of some condition, a repeating sequence of actions is performed, called the body of the loop. A nested loop is one that is inside the body of another loop. There are cycles with precondition and postcondition:

An iterative cycle is a cycle whose number of repetitions is not specified, but is determined during the execution of the cycle. In this case, one repetition of the loop is called an iteration.

So: With all the variety of algorithms for solving problems, three main types of computational processes can be distinguished:

· linear,

· ramified

· And cyclical,

for the implementation of which the programs use the corresponding basic control structures:

· following,

· branching,

· cycle-bye.

In addition to the basic ones, high-level procedural programming languages ​​use three more constructs (structures) that are easily implemented through the basic ones:

· choice,

· loop-to,

· cycle with a given number of repetitions.

The six designs listed were the basis structured programming. The word “structural” in the name emphasizes the fact that only the listed structures are used in programming. Hence the concept of “programming without going to”. Programs written using only structural control transfer operators are called structured. , to emphasize their difference from programs whose implementation used low-level methods of transferring control.

The developed algorithm is implemented in the form of program codes ( programs) in one of the programming languages.

Flowcharts are diagrams that show the steps of a process. Simple flowcharts are easy to create, and the simplicity and clarity of the shapes make them easy to understand.

Note. You can also automatically create a simple flowchart from your data using the Data Visualizer in Visio Online (Plan 2). For more information, see Create diagrams using Data Visualizer.

The Simple Flowchart template in Visio contains shapes that you can use to visually represent a variety of processes. It is especially useful for displaying simple business processes, such as the proposal development process shown in the figure below.

In addition to the Simple Flowchart template, Visio offers a variety of more specific diagram templates, such as data flow diagrams, timelines, and software models.

Creating a Flowchart

    Launch the Visio application.

    Double-click the icon Simple block diagram.

    To connect elements of a flowchart, hover your mouse over the first shape, and click the arrow pointing to the shape you want to connect to. If the second shape is not next to the first, you need to drag the small arrow to the center of the second shape.

    To change the direction of the connector arrow, select the connection, and then on the tab in the group Shape styles click item Line Arrows and select the desired direction and type of arrow.

Automatic alignment and spacing

    Press CTRL+A to select all objects on the page.

    On the tab home in Group Ordering click the button Position and select Auto-alignment and spacing.

If this does not produce the desired result, cancel it by pressing CTRL+Z and try other button menu options Alignment And Position.

What do flowcharts represent?

When opening a template Simple block diagram a set of elements opens Simple flowchart shapes. Each figure in this set represents one or another stage of the process. But the figures do not have any universal meaning; their meaning is determined by the creators and users of flowcharts. Most flowcharts use three or four types of shapes, and this range is expanded only as specific needs arise.

At the same time, the names of shapes in Visio indicate their use. The most common shapes are described below.

What do flowcharts represent?

Visio 2010 has many other specialized sets of stencils and shapes that you can use in a flowchart. For more information about other shapes, see the article.

Note: Can't find the shape you're looking for? For more information about how to find other shapes, see Organize and find shapes using the Shapes window.

Creating a Flowchart

    Open the tab File.

    Tab File not displayed

    If the tab File is not displayed, proceed to the next step in the procedure.

    Select a team Create and point Block diagram and then in the list Available templates select element Simple block diagram.

    Click the button Create.

    For each step in the process you're documenting, drag the appropriate flowchart shape into your document.

    Note: For information about using shapes to represent each step in a process, see .

    By default rectangular

    Straight Connectors

    To return to normal editing on a tab home in Group Service click the button Pointer.

    To add text for a shape or connector, select it and enter text. When you've finished entering text, click in a blank area of ​​the page.

    To change the direction of the connector arrow, select the connection, and then in the group, click the arrow to the right of the label Line, hover over the item Arrows and select the desired direction.

Printing a Large Flowchart

Before you start printing, you need to make sure that the drawing page displayed in Visio contains the entire flowchart. Any shapes that extend beyond the page in Visio will not print.

To print a large flowchart, do the following:

What do flowcharts represent?

When you open the Simple Flowchart template, the Simple Flowchart Shapes stencil also opens. Each shape in the set of elements corresponds to a specific step in the process.

Of the shapes included in the Simple Flowchart Shapes stencil, only a few are widely used. These figures are described below. For more information about other shapes, see the link (Less popular flowchart shapes) at the end of this section.

Less Popular Flowchart Shapes

    Dynamic connecting line. This connecting line bypasses the figures lying in its path.

    This is a connecting line with customizable curvature.

    This is a text box with a border that resizes based on the amount of text you enter. The width can be set by dragging the sides of the shape. This figure does not represent a step in a process, but is useful for labeling a flowchart.

    Note. This is a box in square brackets that changes in size depending on the amount of text you enter. The width can be set by dragging the sides of the shape. Like the Auto-Height Field, this figure does not represent a step in the process. Use it to add notes to flowchart shapes.

    Manual input. This is the stage where a person provides information to the process.

    Manual operation. This is a step that must be completed by a person.

    Internal storage. This shape represents data that is stored on a computer.

    Direct data. This figure represents data that is stored in such a way that each individual record can be directly accessed. This corresponds to the way data is stored on a computer's hard drive.

    Serial data. This shape represents data that is stored sequentially (for example, data on magnetic tape). Such data can only be read sequentially. For example, to access record 7, you must first view records 1–6.

    Map and paper tape. This figure represents a punched card or paper tape. Early computer systems used punched cards and paper tapes to write and read data and to store and run programs.

    Display. This shape represents the data displayed to the user (usually on a computer screen).

    Preparation. This figure represents the initialization of variables in preparation for executing a procedure.

    Parallel mode. This figure shows where two different processes can be running simultaneously.

    Cycle limit. This figure shows the maximum number of times a cycle can be repeated before moving on to the next step.

    Transfer of control. This figure denotes a stage at which, if certain conditions are met, a transition occurs not to the next, but to another stage.

Creating a Flowchart

    On the menu File Create, then to point Block diagram and select Simple block diagram.

    For each step in the process you're documenting, drag the appropriate flowchart shape into your document.

    Connect the flowchart shapes using one of the following methods.

    Connecting two shapes to each other

    Connecting one shape to several using a single connection point

    By default rectangular connecting lines, and connecting a point on a shape to three other shapes looks like the picture below.

    To have connecting lines start directly from the center point of the first shape and lead to points on all other shapes, you must specify Straight Connectors, as shown in the figure below.

    On the toolbar Standard click tool Pointer to return to normal editing mode.

    To add text for a shape or connector, select it and enter text. When you've finished entering text, click in a blank area of ​​the page.

    To change the direction of the connector line, in the menu, hover your mouse pointer over Operations and select Twist the ends.

Printing Large Block Diagrams

The easiest way to print a flowchart that is larger than paper is to print it on several sheets of paper and then glue them together.

Before you start printing, you need to make sure that the drawing page displayed in Visio contains the entire flowchart. Any shapes that extend beyond the page in Visio will not print. To check whether the flowchart fits on the document page, use the Preview dialog box Page settings(menu File, paragraph Page settings, tab Printing settings).

1. Block diagram. which is too large for the Visio drawing page.

2. A flowchart that is placed on a Visio drawing page.

Change the Visio drawing page size to fit the flowchart size

    When a flowchart is open, in the menu File select item Page settings.

    Open the tab Page size.

    On the tab Page size click .

To see how the flowchart will look when printed, go to the menu File select item Preview. The figure below shows the flowchart that will be printed on four letter-size sheets.

Printing large flowcharts on multiple sheets of paper

    On the menu File select item Page settings.

    On the tab Printing settings in field Paper in the printer Select the paper size you want if it is not already selected. Don't press the button OK.

    Open the tab Page size and click Resize by content. The preview window now shows the difference between the new page and the paper in the printer.

    Click the button OK.

    On the menu File select item Preview to see how the flowchart will look when printed.

    Note: Shaded margins may appear between pages. These correspond to the areas that will be printed on both sheets. This allows you to glue the sheets together so that there are no empty spaces in the block diagram.

    Once printing is complete, you can trim the margins, arrange the pages properly, and glue them together.


Flowchart in Word . A student or engineer often has to create various diagrams from blocks with arrows and inscriptions. Some people have a special program for this, and some know how to create such diagrams in Word. If the blocks in the diagram must be connected by arrows or the diagram is supposed to be “expanded” with new blocks, then instead of tables it is better to use the option of creating a diagram as a graphic object. Word's built-in drawing tools allow you to create as complex a diagram as you like. In this case, the text content is not located in the main document, but in special graphic inserts - inscriptions.

Let's try to make such a scheme.

Block diagram inWord 2003

Click on the panel Drawing figure Rectangle. A frame like this should appear (without inscriptions). This is where we will create our own flowchart.

Advice

The Drawing toolbar is usually located at the bottom of the program window. If you don't have a drawing panel at the bottom, then go to the menu ViewToolbars, and check the box Drawing.

Click the button AutoShapes on the panel Drawing, select a command Block diagram, and then click the shape you want.

Then click in the frame box in the place where you want to place this shape.

If it is not where you wanted it, then drag it with the mouse.

Select and arrange the remaining figures of your future diagram in the same way.

You can drag these shapes and change their sizes.

Now let's add labels to our shapes. To do this, on the toolbar Drawing and click on the icon Inscription.

Then click on the shape into which we want to insert this inscription. A small frame will appear with a blinking cursor inside.

We write the name of our block. The text inside this field can be formatted like plain text in a document. The label box can also be dragged and resized. Blocks with labels can be copied and pasted into other blocks.

By default, the inscription is enclosed in a rectangular frame. If you need to put an inscription on a figure of a different type, this frame should be removed. To do this, right-click on the frame with the inscription and select Inscription Format in the context menu.

In the dialog box that opens, open the tab Colors and lines. In line group Color. Select option No lines.

Advice

It's even easier to insert text in another way. Right-click on the block in which you want to paste the text, and select the item from the drop-down menu Add text.

For beauty, the figures can be painted in different colors. To do this, select the required shape with a mouse click and click the Fill Color icon in the Drawing panel and select the color you like in the palette that opens.

In the same way, you can fill in the blocks with inscriptions so that they are not white, but colored or the same color as the diagram block.

Now let's add arrows to our diagram.

Arrows on a diagram are drawn using the Arrow tool. Their properties can be changed in the same way as the properties of the label. In this case, you can control the thickness of the arrow, the type of line, the shape of the end of the arrow, etc.

Click on the button AutoShapesCurly arrows, and select the arrow. Then we go to the field of our flowchart and click the mouse where we need to insert an arrow. You can fill it with some color.

You will need

  • - stencil for drawing block diagrams;
  • - mechanical pencil;
  • - eraser;
  • - paper;
  • - a computer with Internet access.

Instructions

The beginning and end of the algorithm are indicated by ovals. The words “Beginning” and “End” are placed inside them, respectively. From the oval, symbolizing the beginning of the algorithm, one arrow comes down, and an arrow from above comes to the oval, symbolizing the end of the algorithm.

Steps corresponding to non-I/O activities are indicated using rectangles. An example of such an action is the calculation and assignment of the result to a particular variable. The arrow from the previous step comes to the rectangle from above, and the arrow to the next step comes from below it.

Parallelograms are used to represent steps corresponding to I/O operations. There are two types of such operations: assigning data received from somewhere to a variable and outputting data from a variable to a file, port, printer, etc.

Branches are indicated by diamonds. The arrow from the previous step comes to the top corner of the diamond, and arrows like “No” and “Yes” come from its side corners. They come, respectively, to the steps performed when the condition is not met and when the condition is met. The bottom corner of the diamond is left free. Itself (for example, equality, strict or non-strict) inside a diamond.

A rectangle with double side walls represents the transition to the subroutine. After a return statement is encountered in a subroutine, execution of the main program continues. The name of the subroutine is indicated inside. Block diagrams of all subroutines are placed under the block diagram of the main program or on separate pages.

If you would like to create flowcharts electronically, use an application called Flowchart. If you wish, you can also master special programming languages ​​in which the programming process itself consists of drawing up a flowchart. There are two such languages: Dragon and HiAsm.

Sources:

  • how to draw a block diagram

A flowchart is a form of formalized recording of an algorithm or process. Each step of the algorithm in this representation is depicted in the form of blocks of various shapes, which are connected by lines. In a flowchart, you can display all stages of solving any problem, starting with input of initial data, processing by operators, execution of cyclic and conditional functions, and ending with operations for outputting the resulting values.

Instructions

As a rule, at the beginning of the algorithm, the initial data is entered to solve the problem. Draw a parallelogram below the line so that it is a continuous extension of the diagram. In a parallelogram, write the action being performed, usually these are data operations from the screen (Read nInp) or other devices. It is important that the variables you entered in this step will be used later throughout the body of the flowchart.

The execution of one or a group of operations, any data processing (changing a value or presentation form) is indicated by a rectangle. Draw this figure at the right place in the algorithm when drawing up the flowchart. Inside the rectangle, write down the actions performed, for example, the assignment operation is written as follows: mOut = 10*nInp b + 5. Next, also to continue the flowchart, draw a line down.

An important component of any algorithm and, accordingly, a flowchart are conditional and cyclic operators. These operators have one input and two or more alternative outputs. After calculating the condition specified by the operator, further transition is carried out along only one path. Draw the entrance to the element as a line entering the top vertex of the element.

To specify a condition operator, draw a diamond from this line. Inside the figure, indicate the condition itself and draw lines indicating the further transition depending on its fulfillment. The condition is set in the general case by comparison operations (>,<, =). Переход по линии вниз осуществляется при истинном условии, назад – при ложном. Укажите около выходных линий фигуры результаты условия (true, false). Невыполнение условия (false) возвращает к определенному шагу выше по телу алгоритма. Проведите линии под прямым углом от выхода с условия и до нужного оператора.

The cyclic operator is denoted by rectangles with beveled corners. Moreover, to draw this operator, two boundary figures are used. The beginning of the cycle is specified by a figure with beveled upper corners, the end of the cycle is defined by a figure with beveled lower corners. In the shape of the beginning of the loop, indicate the condition for the loop and between the boundary shapes draw loop operators.

At the end of the flowchart, the output of the resulting data to media or to the screen should be indicated. The output statement is drawn similarly to the input statement. Draw a parallelogram and the inference operations within it using output variables.

A flowchart is a universal form of expressing an algorithm, which can then be translated into any programming language. It is created in a form suitable for human reading. This allows you to check the correctness of the algorithm manually.

Instructions

At the end of each of the lines connecting the elements of the block diagram to each other, apply. This will allow you to more accurately determine the order of actions, especially if the algorithm is branched.