Discrete Functions Vs Continuous Functions Khan Academy
Martha L. Abell , James P. Braselton , in Mathematica by Example (Fifth Edition), 2017
2.3.5 Miscellaneous Comments
Clearly, Mathematica's graphics capabilities are extensive and volumes could be written about them. You can see many commands that we haven't discussed here by using ? to see those commands that contain the string Plot.
Be sure to take advantage of MathWorld for a huge number of resources related to graphics and Mathematica.
You can obtain detailed information regarding any of these commands from the Documentation Center by clicking on the command's name.
For now, we briefly mention a few of the ones that were not discussed previously. To plot lists of numbers or lists of ordered pairs, use ListPlot or ListLinePlot, which are discussed in more detail in Chapter 4. For matrices and other arrays use commands such as MatrixPlot or ArrayPlot that are discussed in more detail in Chapter 4.
Example 2.38 Cellular Automaton
Very loosly speaking, a cellular automaton is a discrete function that assigns values to subsequent rows based on the values of the cells in the previous row(s). For a concise discussion of cellular automaton refer to Weisstein (Weisstein, Eric W. "Cellular Automaton." From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/CellularAutomaton.html ), CellularAutomatan is a powerful command that allows you to investigate (quite complicated) cellular automaton. In its simplest form,
CellularAutomaton[rule,initialvalues,n]
returns the first n generations of the cellular automaton following the specified rule and having the indicated initial values.
The simplest cellular automaton are called elementary cellular automaton (Weisstein, Eric W. "Elementary Cellular Automaton." From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/ElementaryCellularAutomaton.html ). Based on basic counting principals, there are 256 elementary cellular automaton. They are cataloged by number. With
we calculate the first five generations of the elementary cellular automaton with a 1 at position 0 on generation 0 using Rule 146. To calculate the first 100 generations, we use CellularAutomaton[146, {{1},0}, 100]. The resulting array is rather large so we use ArrayPlot to visualize it in Fig. 2.37 (a). Using our color scheme, the cells with value 1 are shaded in red and those with 0 are in light green.
In this case the grid is initially spaced so that positions 1, 11, 21, 31, and 41 have the value one. The first three generations using Rule 146 are calculated.
To see how the situation evolves over 100 generations is more easily seen using ArrayPlot. See Fig. 2.37 (b)
Of the 256 elementary cellular automaton, many are equivalent. To see that some of them are equivalent, we create a plot of the 256 elementary cellular automaton for 50 generations as done with Rule 146. All 256 plots are shown on the left in Fig. 2.38 (a). With Union, we remove and sort the ones that are identically equal. Those are shown on the right in Fig. 2.38 (b).
To see the plots together with the rule number, use Table. Each ordered pair returned consists of the rule number and the 50 generation plot. To display the ordered pairs in an organized fashion, we use Grid. Of course, the result is quite large so just a portion of the actual grid is displayed in Fig. 2.39.
Note that MatrixPlot and ArrayPlot are discussed in more detail in Chapter 5.
For graphs that involve points or nodes or connecting them by edges (graph theory), you can use GraphPlot to help investigate some problems. For trees, use TreePlot.
Example 2.39
Graceful graphs don't have multiple edges or loops.
We generate O with GraphPlot and display the result in Fig. 2.40 (a).
is shown in Fig. 2.40 (b).
Replacing GraphPlot with TreePlot gives us Fig. 2.41.
Source: https://www.sciencedirect.com/topics/computer-science/discrete-function
0 Response to "Discrete Functions Vs Continuous Functions Khan Academy"
Postar um comentário