Computational Literacy

After a computer career spanning programming, customer support and sales, I joined a faculty at a community college.

Framework

Addressed problem: 43% of Florida’s community college students fail intermediate algebra.

Proposed solution: Introduce computational literacy into our liberal arts programs, whose students are required to enroll in algebra.

Suggested means: Mathematic instructors need to work with their liberal arts counterparts for both to become aware of computational literacy’s positive impact on our liberal arts students. We know how well advance its STEM usage is; my goal is advancing its use in the soft sciences.

This is not an easily achieved. By way of clarifying this difficult, this talk summaries my learning process, which began by clarifying computational literacy, expanding its initial reach beyond PC processors.

I extended computational literacy (cl) to include immune systems, ant colonies, stock markets, cellular automata and networks such as WWW, our brains and ecologies. They are all processors which cl studies. Next, I realized that knowledge is embedded in the cl’s software and that your coding statements represent computations creating new knowledge.

Readings 12 texts on this software identified 4 component areas requiring comprehension. They are data base queries, computational essays, modeling and simulating complex systems and the functional and rule-based programming paradigms. A follow-on discussion presents several fundamental concepts applicable to each component.

Data Base Queries

The software provides three data base query formats : the first being WolframAlpha' s natural language questioning. I soon leaned questions must be specific, not overly complex. I entered two queries for accessing the affect of dengue fever on Florida' s population, followed by a computation, yielding 17430 cases.

WolframAlpha["Dengue Fever"];
WolframAlpha["Florida's population"];
.00083 21000000;

The second format, Wolfram Language (WL) based, structures your queries into Entity types, Entities, Entity Properties and Entity values. Working within that structure, I explored anatomy and art. Worth viewing is a 2018 anatomy talk highlighting these structures.

Interpreter["Person"]["Vincent van Gogh"];
EntityProperties[(Entity["Vincent van Gogh", Entity["Person","VincentVanGogh::9vq62"], "Entity[\"Person\", \"VincentVanGogh::9vq62\"]", "person"])];
EntityValue[(Entity["Vincent van Gogh", Entity["Person","VincentVanGogh::9vq62"], "Entity[\"Person\", \"VincentVanGogh::9vq62\"]", "person"]),(EntityProperty["image", EntityProperty["Person","Image"], "EntityProperty[\"Person\", \"Image\"]"])]
EntityValue[(Entity["Vincent van Gogh", Entity["Person","VincentVanGogh::9vq62"], "Entity[\"Person\", \"VincentVanGogh::9vq62\"]", "person"]),(EntityProperty["notable artworks", EntityProperty["Person","NotableArtworks"], "EntityProperty[\"Person\", \"NotableArtworks\"]"])];
EntityProperties[(Entity["Portrait of Madame Augustine Roulin", Entity["Artwork","PortraitOfMadameAugustineRoulin::VincentVanGogh"], "Entity[\"Artwork\", \"PortraitOfMadameAugustineRoulin::VincentVanGogh\"]", artwork])];
EntityValue[(Entity["Portrait of Madame Augustine Roulin", Entity["Artwork","PortraitOfMadameAugustineRoulin::VincentVanGogh"], "Entity[\"Artwork\", \"PortraitOfMadameAugustineRoulin::VincentVanGogh\"]", artwork]),(EntityProperty["image", EntityProperty["Artwork","Image"], "EntityProperty[\"Artwork\", \"Image\"]"])]

Another format:,ctrl=Vincent van Gogh, yields the computable object: the artist.

LinguisticAssistant

The three formats return an answer, unlike Google searches that supply articles for your perusal. The formats also access extensive data bases covering most of our accumulated knowledge.

Computational Essays

This presentation is a computational essay. Why? It merges the various means of expressing your ideas, with words, graphs, data tables, query results, programing routines (both querying and computational) and text formatting. All are integrated into your essay’s structure.

Modeling and Simulating Complex Systems

The modeling and simulating component of the Language provides tools for solving complex, non-linear human scale problems. Our existing mathematical tools were successful formulating the very small and the very large, but the non-linearity of human scale problems leaves us with modeling and simulations as one of the few useful tools.

The Language provides its System Modeler, a mathematically oriented tool, and an interface to NetLogo, an agent-based modeling system. STEM students compute with the former; liberal arts students with the latter, since it replaces differential equations with descriptions of agent behaviors. For example, the Lotka-Volterra equations of prey-predator relationship.

<NetLogo`
$NLHome = "C:\\Program Files\\Netlogo 6.1.1"
NLStart[]

NLLoadModel[ToFileName[{$NLHome,"app\\models","Sample Models","Earth Science"},"Fire.nlogo"]];
NLCommand["set density",50];
NLCommand["setup"];
NLDoCommand["go",10];
NLReport["count turtles"];
Table[NLCommand["go"];NLReport["(burned-trees / initial-trees) * 100"],{20}];

Since the Language graphs (visually enhancing for understanding) the results of Netlogo, the pair interact synergistically. This synergism also extends to the wide range of disciplines accessible by both. By providing this unified access, using them together encourages inter-disciplinary projects and creativity.

Using ABMs opens up the study of non-linear complex systems to our liberal art students 

WL addresses the following disciplines: Geographic, Astronomical, Space-Related, Weather & Earth Science, Transportation-Related, Engineering $ Structures, Culture & Entertainment, Activities & Hobbies, Finance-Related, Food & Nutrition, People & Personal Attributes, History-Related, Linguistic Entities, Physical Sciences, Life Sciences, Medical Entities, Organism Types, Mathematical & Computational Entities, Computing-Related Entities and Visual Entities head.

Netlogo models these: Art, Biology, Chemistry & Physics, Computer Science, Earth Science, Games, Mathematics, Networks, Philosophy, Social Science and System Dynamics.
Above  showcases the overlap of disciplines represented.

Functional and Rule-Base Paradigms

The fourth component, dealing with the two programming paradigms, requires more effort to understand. Because it aids in structuring studies of complex systems, the energy spent in grasping these paradigms has a large payoff. Most of the conference’s presentations require an understanding of those paradigms.

My study of this last component began with a procedural calculation of a permutation of 5 letters taken 4 at a time. With assistance from the support group, I added the needed functional statement to my calculation.

myPerms=Permutations[{m,i,n,t,a},{4}];
myLength=Length[myPerms];
While [myLength > 0,
myFirst = Take[myPerms,1];		 (*{{m, i, n, t}}*)
myPerms= Drop[myPerms,1];
myItem=Part[myFirst,1];    		 (*{m, i, n, t}*)
myWord = StringJoin[ToString/@myItem];  (* functional statement *)
myRes=DictionaryWordQ[myWord]; (* "mint" *)
If[myRes,Print[myWord]];
myLength=myLength-1;	
];

120
mint
main
anti

When first entering commands, the use of ctrl= also comes into play, similar to its applicability with respect to queries.  Fox example, inputting ctrl=Plot computes the graph:

ctrl= Plot[Sin[x], {x,0,2 Pi}]

I realized the next step required working with a full-blown functional and rule-based program. I selected a cellular automata implementation of a single random walker, developed by Gaylord and Nishidate in their Modeling Nature text.

Meander[n_, t_] :=
Module[{RND, walk, f, initConf},

(*grid creation*)
RND := Random[Integer, {1, 4}];
(*places walker in random position on grid*)
(*ReplacePart[expr, replacement, position]*)
(*Table serves as expr; RND as replacement; {n + 1, n + 1} as grid position*)
initConf = ReplacePart[Table[0, {2n + 1}, {2n + 1}], RND,
{n + 1, n + 1}];

(*rules*)
(*matched to expanded site data, for updating its status*)
walk[1, 0, 0, 0, 0] := 0;
walk[2, 0, 0, 0, 0] := 0;
walk[3, 0, 0, 0, 0] := 0;
walk[4, 0, 0, 0, 0] := 0;

walk[0, 3, 0, 0, 0] := RND; (* nested rule *)
walk[0, 0, 4, 0, 0] := RND; (* RND defined above *)
walk[0, 0, 0, 1, 0] := RND; (* functions arenested, too *)
walk[0, 0, 0, 0, 2] := RND;

walk[0, 1, 0, 0, 0] := 0;
walk[0, 2, 0, 0, 0] := 0;
walk[0, 4, 0, 0, 0] := 0;
walk[0, 0, 1, 0, 0] := 0;
walk[0, 0, 2, 0, 0] := 0;
walk[0, 0, 3, 0, 0] := 0;
walk[0, 0, 0, 2, 0] := 0;
walk[0, 0, 0, 3, 0] := 0;
walk[0, 0, 0, 4, 0] := 0;
walk[0, 0, 0, 0, 1] := 0;
walk[0, 0, 0, 0, 3] := 0;
walk[0, 0, 0, 0, 4] := 0;

walk[0, 0, 0, 0, 0] := 0;

Print[walk[0, 0, 0, 0, 0]];
Print[initConf]; Print["1initConf"];

(*applies rules to the expanded site data, with its N,E,S,W neighbors,
 updating site's next value to occupied or unocupied*)
(*or*)
(*MapThread[func, {expr1, expr2, ...}, level*)
(*applies func to the parts of the exprs at the stated level*)

(*Maps applies the pure function identified by &, RotateRight,
 to initConf fives times using five different rotational/level specs
 referenced by #, creating the five exprs acted upon by MapThread*)

f[func__, mat_] :=
MapThread[func, Map[RotateRight[mat, #]&,
{{0, 0},{1, 0},{0, -1},{-1, 0},{0, 1}}], 2];

(*applies rules to the initial grid, creating an updated grid,
 to which the rules are appled again; this process is repeated t times*)
(*or*)
(*NestList[function, expr, n]*)
(*list of results by applying function to the expr n times*)
(*f is the function; initConf is the expression; and t serves as n*)
(*f first argument is a pure function applying the walk rules and
its second supplies the initail configuratin*)

myRes = NestList[f[walk, #]&, initConf, t];
Print[myRes]; Print["myRes1"];

(*second run*)
myRes2 = NestList[f[walk, #]&, initConf, t];
Print[myRes2]; Print["myRes2"];

Print[initConf]; Print["linitConfig"];

(*calls module*)
Meander[2, 2];

0

{{0,0,0,0,0},{0,0,0,0,0},{0,0,2,0,0},{0,0,0,0,0},{0,0,0,0,0}}
"1initConf"

{{{0,0,0,0,0},{0,0,0,0,0},{0,0,2,0,0},{0,0,0,0,0},{0,0,0,0,0}},

{{0,0,0,0,0},{0,0,0,0,0},{0,0,0,1,0},{0,0,0,0,0},{0,0,0,0,0}},

{{0,0,0,0,0},{0,0,0,2,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0}}}
"myRes1": Starting at random grid position (3,3) facing East, our single walker moves to (3,4) facing North, before ending up at (2,4) facing East. Facing directions are chosen randomly.

{{{0,0,0,0,0},{0,0,0,0,0},{0,0,2,0,0},{0,0,0,0,0},{0,0,0,0,0}},{{0,0,0,0,0},{0,0,0,0,0},{0,0,0,1,0},{0,0,0,0,0},{0,0,0,0,0}},{{0,0,0,0,0},{0,0,0,1,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0}}}
"myRes2": another run

{{0,0,0,0,0},{0,0,0,0,0},{0,0,2,0,0},{0,0,0,0,0},{0,0,0,0,0}}
"linitConfig" unaltered

Using the detailed explanation in their text and the Language as my instructor, I started understanding how the Language structures and formats calculations.

To clarify using the language as my instructor, I separately coded the inner functions which served as components of the top-level nested functions. Using this approach aided in my understanding of their contribution to the whole. 

Analyzing  An Inner Function

Using a simplified initConf, highlights the paring of a site with its N, E, S and W neighbors. 
For example, the N, E, S and W neighbors of 1 are 7, 2 , 4, and 3, where 7 and 3 are wrap a rounds.

initConf = Partition[Range[9], 3];
Print[initConf];

convertedConf = Map[RotateRight[initConf, #]&,
{{0, 0},{1, 0},{0, -1},{-1, 0},{0, 1}}];
Print[convertedConf];

convertedConfigmapped = MapThread[f, convertedConf, 2];
Print [convertedConfigmapped];

{{1,2,3},{4,5,6},{7,8,9}} ( * initConfig * )

{{{1,2,3},{4,5,6},{7,8,9}},
{{7,8,9},{1,2,3},{4,5,6}},
{{2,3,1},{5,6,4},{8,9,7}},
{{4,5,6},{7,8,9},{1,2,3}},
{{3,1,2},{6,4,5},{9,7,8}}} ( * Columns represent a site’s neighbors: N, E, S, W

{{f[1,7,2,4,3],
f[2,8,3,5,1],
f[3,9,1,6,2]},
{f[4,1,5,7,6],
f[5,2,6,8,4],
f[6,3,4,9,5]},
{f[7,4,8,1,9],
f[8,5,9,2,7],
f[9,6,7,3,8]}} ( * in the Module above ,the walk rules replace the dummy function f.

I also varied the arguments of each function, comparing the different outcomes. These comparisons clarified the working of each function.

Varying Arguments

Altering the level specification clarifies their meaning:
	{0, 0} means  levels 1 and 2  not rotated;
	{1, 1}  means rotate level 1 first, followed by rotating level 2; both to the right
	{1, -1} means rotating level 1 to the right, followed by rotating level 2 to the left
	{-1, 1} means rotating level 1 to the left , followed by rotating level 2 to the right
	{0, 1} means leaving level 1  not rotated, followed by rotating level 2 to the right
	
	Remember neighbor-ship wraps a round.

initConf = Partition[Range[9], 3];
Print[initConf];

convertedConf = Map[RotateRight[initConf, #]&,
{{0, 0},{1, 1},{1, -1},{-1, 1},{0, 1}}];
Print[convertedConf];

{{{1,2,3},{4,5,6},{7,8,9}}, (*{0, 0}*)
{{9,7,8},{3,1,2},{6,4,5}}, (*{1, 1}*)
{{8,9,7},{2,3,1},{5,6,4}}, (*{1, -1}*)
{{6,4,5},{9,7,8},{3,1,2}}, (*{-1, 1}*)
{{3,1,2},{6,4,5},{9,7,8}}} (*{0, 1}*)
( * effects of Rotational/Level specs * )

Fundamental Concepts

Grasping the following four fundamental concepts enhanced my understanding of the software, those being lists, expressions, arguments and notation.

 All complex data types, such as vectors and matrices, are built from lists, using specific conversion functions.
 
 Each input becomes an expression, represented in an internal consistent format: head[body]
 
 Overriding the numerous default attributes of  a function allow for exact specifications of desired results.
 
 Notations simplify statement generation.
 	{} represents a list
 	[] enclose arguments
 	[[n]] access inner parts of a list
 	() groups expressions
 
 The first two concepts create a unified foundation for a wide range of processing; by supplying defaults satisfying most situation, the third eases the burden of first-time users; the last requires your familiarity.

{a,b,c} (* a vector *)
FullForm[%]
{{a,b},{c,d}} (* a matrix *)
FullForm[%]

a+b+c
FullForm[%]
a*b*c
FullForm[%]

DefaultValues[ListPlot]

ListPlot, as with the other functions, has its fixed arguments (point to be plotted), alterable by its associated default values.

Learning Process

Because my learning process, and perhaps yours, begins by tackling the overall structure of a new topic, I followed this approach, leaving the details to several essays supplied with this talk. Similarly, I believe immersing oneself in the details of a topic requires solitude.

 I’d like you to visual your school experience. Based on having a familiarity with computational literacy in an educational environment, please reconstruct your educational experience.

 Image formulating your own questions when studying a new topic;
 
  Image creating computational essays and presenting them to your classmates;
 
 Image participating in modeling studies of complex systems, without feeling mathematically inadequate;
 
 Image your satisfaction of completing a calculation study structured with functional and rule-based coding.
 
  We all deserve these outcomes, both as students and instructors, since continuing with our current educational system leaves everyone behind.
  
  Before proceeding to our group exchange, I’ll end with a syllogism:
  
  	Tools enhance our creativity.
  	Computational literacy is a super-sized tool.
  	Therefore, computational literacy super-sizes our creativity.
  
  That’s the critical take away from this talk.
  	
As an aid to our discussion, I’ll display the following summary slide. At this time, I encourage your comments and insights.

Summary Slide

The software constructs all data types fron its lists,
	using selected function for creating matrices and vectors.
The software unifies all expressions into a head[body] format.
The software defaults apply to most situations.
The software uses shorthand notations.

The software’s database queries provide an intellectual journey into most disciplines.

The software’s computational essays provide expression of your projects.

The software provides multiple modes for modeling and simulating non-linear complex-systems, via its System Modeler, its interface with NetLogo and its software for generating cellular automata.

The software’s functional paradigm eliminates Do-While coding ; 
 The software’s rule-based paradigm supports calculations of complex systems.

LinguisticAssistant

(Entity["Vincent van Gogh", Entity["Person","VincentVanGogh::9vq62"], "Entity[\"Person\", \"VincentVanGogh::9vq62\"]", "person"])["NotableArtworks"];
RandomSample[(Entity["Vincent van Gogh", Entity["Person","VincentVanGogh::9vq62"], "Entity[\"Person\", \"VincentVanGogh::9vq62\"]", "person"])["NotableArtworks"],10];
EntityValue[%, "Image"]
ChromaticityPlot[%]

myWords[num_, l_] :=
Module[{myPerms4},

Print[num];
Print[l];

myPerms4=Permutations[l, {num}];
(* Print[myPerms4]; *)

myStep1 := StringJoin[#]&/@(MapAt[ToString, myPerms4, {All,1}]);
myStep2 := StringJoin[#]&/@(MapAt[ToString, myPerms4, {{All,1}, {All,2}}]);
myStep3 := StringJoin[#]&/@(MapAt[ToString, myPerms4, {{All,1}, {All,2}, {All,3}}]);
myStep4 := StringJoin[#]&/@(MapAt[ToString, myPerms4, {{All,1}, {All,2}, {All,3}, {All,4}}]);
myStep5 := StringJoin[#]&/@(MapAt[ToString, myPerms4, {{All,1}, {All,2}, {All,3}, {All,4}, {All,5}}]);

If[num == 1, (If[DictionaryWordQ[#],Print[#]]&/@myStep1)];
If[num == 2, (If[DictionaryWordQ[#],Print[#]]&/@myStep2)];
If[num == 3, (If[DictionaryWordQ[#],Print[#]]&/@myStep3)];
If[num == 4, (If[DictionaryWordQ[#],Print[#]]&/@myStep4)];
If[num == 5, (If[DictionaryWordQ[#],Print[#]]&/@myStep5)];

]

myWords[4, {m,i,n,t,a}]

myWords[num_, l_] :=
Module[{myPerms4},

Print[num];
Print[l];
myPerms4=Permutations[l, {num}];
(* Print[myPerms4]; *)

myStep := StringJoin[#]&/@(MapAt[ToString, myPerms4, {All,All}]);
If[DictionaryWordQ[#],Print[#]]&/@myStep;
]

myWords[4, {m,i,n,t,a}]