Amidst struggling to get Tikz or similar LaTeX diagrams to work, I stumbled onto [finite-state machine](https://en.wikipedia.org/wiki/Finite-state_machine) diagrams.
An interesting addition to my writing would be to
- [ ] build out a state chart over the various chapters.
Begin with the agrarian change phases of @marshall.etal_2021
add bits about supply sources? intra and inter-regional integrations?
Then embed that within global food regimes
then add the new supply forms
> [!warning] Almost all of this next part is from wikipedia..
### State Diagrams
Shannon and Weaver introduced [state diagrams](https://en.wikipedia.org/wiki/State_diagram) in 1949's [_The Mathematical Theory of Communication_](https://en.wikipedia.org/wiki/A_Mathematical_Theory_of_Communication "A Mathematical Theory of Communication"). %%See also the original @shannon_1948 %%
"State diagrams provide an abstract description of a system's behavior", which is valuable for my research into the disruptions within and transitions between global food regimes & agrarian change in Hawaii.
![[state diagram_wikipedia.png | 200]]
Per [wikipedia on FSMs](https://en.wikipedia.org/wiki/Finite-state_machine)
> A **finite-state machine** (**FSM**) or **finite-state automaton** (**FSA**, plural: _automata_), **finite automaton**, or simply ==a **state machine**, is a mathematical [model of computation](https://en.wikipedia.org/wiki/Model_of_computation "Model of computation")==. It is an [abstract machine](https://en.wikipedia.org/wiki/Abstract_machine "Abstract machine") ===that can be in exactly one of a finite number of _[states](https://en.wikipedia.org/wiki/State_(computer_science) "State (computer science)")_ at any given time==. The FSM can change from one state to another in response to some [inputs](https://en.wikipedia.org/wiki/Input_(computer_science) "Input (computer science)"); the change from one state to another is called a _transition_.[1](https://en.wikipedia.org/wiki/Finite-state_machine#cite_note-1) ==An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition==. Finite-state machines are of two types—[deterministic finite-state machines](https://en.wikipedia.org/wiki/Deterministic_finite_automaton "Deterministic finite automaton") and [non-deterministic finite-state machines](https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton "Nondeterministic finite automaton").[2](https://en.wikipedia.org/wiki/Finite-state_machine#cite_note-2) For any non-deterministic finite-state machine, an equivalent deterministic one can be constructed.
### State Transition Tables
Beyond state diagrams, FSM can also be represented in a **[state-transition table](https://en.wikipedia.org/wiki/State-transition_table)**
State-transition tables are sometimes one-dimensional tables, also called _characteristic tables_. The single dimension indicates inputs, current states, next states and (optionally) outputs associated with the state transitions.
However two-dimensional tables are more common, and valuable for my research
This simple two-dimensional [state-transition table](https://en.wikipedia.org/wiki/State-transition_table)
![[2D state transition table_wikipedia.png | 200]]
Tables can also be [transformed from/to state a diagram](https://en.wikipedia.org/wiki/State-transition_table#Transformations_from/to_state_diagram)
![[state diagram_wikipedia.png | 200]]
This example of a state-transition table helps to consider which axes are of interest to my research.

For example, would i need a single line of inquiry? ie From-To is along @marshall.etal_2021 agrarian change typology? Or would it be @friedmann.mcmichael_1989 food regimes?
Ideally, there would be a way to model these multiple states in one (not spaghetti) chart..
#### Issues with State diagrams
However, per [wikipedia on statecharts](https://en.wikipedia.org/wiki/State_diagram#Harel_statechart)
> ==Classic state diagrams require the creation of distinct nodes for every valid combination of parameters that define the state. For all but the simplest of systems, this can lead to a very large number of nodes and transitions between nodes==
This per [wikipedia on **unified modeling language** (**UML**)](https://en.wikipedia.org/wiki/UML_state_machine#UML_extensions_to_the_traditional_FSM_formalism), %% UML "is a general-purpose visual [modeling language](https://en.wikipedia.org/wiki/Modeling_language "Modeling language") that is intended to provide a standard way to visualize the design of a system.[1]%% is
> Due to the phenomenon known as ==**state and transition explosion**==, the complexity of a traditional FSM tends to grow much faster than the complexity of the system it describes. This happens because the traditional state machine formalism inflicts repetitions.
This reduces readability of the diagram.
### Statechart Diagrams
Thus the [statechart](https://en.wikipedia.org/wiki/State_diagram#Harel_statechart) [@harel_1987] arose for complex state modeling, it provide various benefits, per wikipedia (again!):
- the diagram type allows the modeling of [superstates](https://en.wikipedia.org/wiki/UML_state_machine#Hierarchically_nested_states "UML state machine"), [orthogonal regions](https://en.wikipedia.org/wiki/UML_state_machine#Orthogonal_regions "UML state machine"), and activities as part of a state.
- ==it is possible to model multiple cross-functional state diagrams==
- The Harel statechart is equivalent to a state diagram but improves its readability.
Here is a diagram showing how Harel's Statecharts contributed to object-oriented methods and notation

These lecture notes on [Statecharts aka Harel Charts Visualising Information](https://www.cs.mcgill.ca/~hv/classes/MS.00.Fall/lecture.statecharts/lecture.2up.pdf) provide a spartan but i think informative means to understand the model approach and some of the concepts I may need to know.
[Another take on Statechart Diagrams](https://www.cs.sjsu.edu/~pearce/modules/lectures/uml/behavior/behavior.htm) says that Harel's statechart machine approach is an 'abstract model of a reactive system", a finite-state machine, however the statechart machine may also perform certain actions as a result of the state change.
> David Harel distinguishes between reactive or event-driven systems and transformational systems. A transformational system is simply a function that transforms input data of one type into output data of another type. An event-driven system must react to external events that are to some extent unpredictable. The reaction might include performing certain actions as well as changing the internal state.
### Statechart Machines
The [other take](https://www.cs.sjsu.edu/~pearce/modules/lectures/uml/behavior/behavior.htm) also adds this about statechart machines
> Harel introduces the concept of a statechart machine as an abstract model of a reactive system. A statechart machine is an example of a finite-state machine. Other similar examples include finite automata, Mealy Machines, Moore Machines, and Petri-Nets.
>
> A statechart machine can be described using a statechart diagram. A statechart diagram is a directed graph. The nodes of the graph represent states, and the arrows represent transitions between states caused by external events.
## Modeling Complex Adaptive Systems
Jarrar, Wakrime & Balouki (2020) worked up a "Formal approach to model complex adaptive computing systems" which
> introduced the steps and reasoning involved in the construction of a model of complex adaptive systems using the Event-B formal method. The main contribution is presenting a methodology for modelling that can be used to develop any complex adaptive systems.
Without formal logic training, it is greek to me.
---
https://chatgpt.com/c/b6e7ca40-deab-4cdb-8e4b-8ac14d1d3bcd
### Alternate Stable States in Island Foodways: Self-Sufficiency vs. Import Dependence
In the context of island food systems, alternate stable states refer to different long-term configurations that an island’s foodways can stabilize in, often influenced by both external and internal factors. Two key states in this context are **Self-Sufficiency** and **Import Dependence**:
1. **Self-Sufficiency**: This state is characterized by the island producing a significant portion of its food locally, using available resources, traditional practices, and modern innovations to meet its population's needs. This state often aligns with sustainability, food sovereignty, and resilience, especially in the face of external shocks like economic downturns or supply chain disruptions.
2. **Import Dependence**: In this state, the island relies heavily on imported food to meet its population’s needs. This state is often driven by factors such as economic policies favoring global trade, limited local production capacity, or shifts in consumer preferences towards imported goods. While this state may offer variety and lower costs under stable global conditions, it can be vulnerable to disruptions in international trade.
### Modeling Using a Finite State Machine (FSM)
A Finite State Machine (FSM) is a mathematical model used to represent systems with a finite number of states and transitions between them based on specific inputs or events.
#### States:
- **State 1: Self-Sufficiency**
- **State 2: Import Dependence**
#### Transitions:
- **Transition A:** From Self-Sufficiency to Import Dependence
- Triggers: Globalization policies, economic incentives for importing, degradation of local agricultural infrastructure, changes in consumer preferences.
- **Transition B:** From Import Dependence to Self-Sufficiency
- Triggers: Local food movement, policy changes favoring local production, supply chain disruptions, increasing costs of imports, cultural revival of traditional practices.
#### FSM Diagram:
```
[ Self-Sufficiency ] --Transition A--> [ Import Dependence ]
^ |
| |
Transition B |
| |
--------------------------------------
```
### Explanation:
- The FSM has two primary states: Self-Sufficiency and Import Dependence.
- Transition A represents the shift from Self-Sufficiency to Import Dependence, driven by various factors such as economic policies and consumer behavior.
- Transition B represents the shift back to Self-Sufficiency, often triggered by a resurgence in local food initiatives, policy changes, or disruptions in the global supply chain.
- The diagram shows that these states are alternate stable states where the system can remain until influenced by significant external or internal changes.
This model helps illustrate how an island’s food system can transition between different stable states based on various factors, providing a framework for understanding the dynamics of food security and resilience.
Based on your notes, a State-transition table can be constructed by identifying the key states and transitions within the context of your research on Hawaii's food system resilience and agrarian change. Here is a simplified version of what such a table might look like, based on the themes and methodologies discussed in your notes:
| Current State | Transition Event | Next State | Description |
|---------------|------------------|------------|-------------|
| Traditional Agrarian Practices | Introduction of Western Contact | Colonial Agriculture | Shift from indigenous to colonial agricultural practices, influenced by external forces. |
| Colonial Agriculture | Global Market Integration | Plantation Economy | Development of large-scale plantations driven by global market demands. |
| Plantation Economy | Economic Diversification | Post-Plantation Agriculture | Transition to diversified agriculture as plantations decline. |
| Post-Plantation Agriculture | Policy Interventions | Local Food Production | Efforts to increase local food production through state policies and new agricultural investments. |
| Local Food Production | Climate Change Impact | Resilient Food Systems | Adaptation strategies to enhance resilience against climate change and other external shocks. |
This table reflects the historical and potential future transitions within Hawaii's food system, integrating insights from your research on comparative historical analysis, assemblage theory, and resilience practice. It highlights the dynamic nature of the system and the various factors influencing its evolution over time.
```mermaid
stateDiagram-v2
%% Y-Axis: Time
state "Time: 1780" as Time1780
state "Time: 1830" as Time1830
state "Time: 1880" as Time1880
state "Time: 1930" as Time1930
state "Time: 1980" as Time1980
state "Time: 2030" as Time2030
%% Agrarian Changes and Global Food Regimes
[*] --> Time1780
Time1780 --> TraditionalAgriculture : "Pre-contact Era"
state TraditionalAgriculture {
Note left of TraditionalAgriculture: Pre-contact Hawaii, self-sufficient taro and fishpond systems
}
TraditionalAgriculture --> EarlyColonialImpact
Time1830 --> EarlyColonialImpact : "1778-1893, European Contact"
state EarlyColonialImpact {
Note right of EarlyColonialImpact: Land privatization, sugarcane and pineapple plantations
}
EarlyColonialImpact --> OverthrowMonarchy
Time1880 --> OverthrowMonarchy : "1893, Overthrow of the Hawaiian Kingdom"
state OverthrowMonarchy {
Note left of OverthrowMonarchy: Loss of sovereignty
}
OverthrowMonarchy --> PlantationEconomy
Time1930 --> PlantationEconomy : "1900-1960s, Plantation Economy"
state PlantationEconomy {
Note right of PlantationEconomy: Dominance of sugarcane and pineapple, migrant labor, export-oriented
}
PlantationEconomy --> Statehood
Time1980 --> Statehood : "1959, Hawaii becomes a U.S. state"
state Statehood {
Note left of Statehood: Increased military and tourism investment
}
Statehood --> Globalization
Time1980 --> Globalization : "1960s-present, Globalization and Neoliberal Policies"
state Globalization {
Note right of Globalization: Trade liberalization, agribusiness rise, reliance on imports
Globalization --> FoodInsecurityCrisis
Globalization --> EnvironmentalCrisis
Globalization --> EconomicCrisis
}
state FoodInsecurityCrisis {
Note right of FoodInsecurityCrisis: Impact on local food systems, increased dependence on imports
}
state EnvironmentalCrisis {
Note right of EnvironmentalCrisis: Industrial agriculture impacts, biodiversity loss, climate change
}
state EconomicCrisis {
Note right of EconomicCrisis: Market volatility, financialization of land, impact on small-scale farmers
}
FoodInsecurityCrisis --> ResilienceStrategies
EnvironmentalCrisis --> ResilienceStrategies
EconomicCrisis --> ResilienceStrategies
state ResilienceStrategies {
Note left of ResilienceStrategies: 21st century, food sovereignty movements, regenerative agriculture, local food system rebuilding
}
ResilienceStrategies --> Time2030
Time2030 --> [*]
```
```mermaid
stateDiagram-v2
%% Y-Axis: Time
state "1780" as Time1780
state "1830" as Time1830
state "1880" as Time1880
state "1930" as Time1930
state "1980" as Time1980
state "2030" as Time2030
[*] --> Time1780
Time1780 --> TraditionalAgriculture : "Pre-contact Era"
state TraditionalAgriculture {
Note left of TraditionalAgriculture: "Self-sufficient taro and fishpond systems"
}
Time1830 --> EarlyColonialImpact : "1778-1893, European Contact"
state EarlyColonialImpact {
Note right of EarlyColonialImpact: "Land privatization, sugarcane and pineapple plantations"
}
Time1880 --> OverthrowMonarchy : "1893, Overthrow of the Hawaiian Kingdom"
state OverthrowMonarchy {
Note left of OverthrowMonarchy: "Loss of sovereignty"
}
Time1930 --> PlantationEconomy : "1900-1960s, Plantation Economy"
state PlantationEconomy {
Note right of PlantationEconomy: "Dominance of sugarcane and pineapple, migrant labor, export-oriented"
}
Time1980 --> Statehood : "1959, Hawaii becomes a U.S. state"
state Statehood {
Note left of Statehood: "Increased military and tourism investment"
}
Statehood --> Globalization : "1960s-present, Globalization and Neoliberal Policies"
state Globalization {
Note right of Globalization: "Trade liberalization, agribusiness rise, reliance on imports"
}
Globalization --> FoodInsecurityCrisis
state FoodInsecurityCrisis {
Note right of FoodInsecurityCrisis: "Impact on local food systems, increased dependence on imports"
}
Globalization --> EnvironmentalCrisis
state EnvironmentalCrisis {
Note right of EnvironmentalCrisis: "Industrial agriculture impacts, biodiversity loss, climate change"
}
Globalization --> EconomicCrisis
state EconomicCrisis {
Note right of EconomicCrisis: "Market volatility, financialization of land, impact on small-scale farmers"
}
FoodInsecurityCrisis --> ResilienceStrategies
EnvironmentalCrisis --> ResilienceStrategies
EconomicCrisis --> ResilienceStrategies
state ResilienceStrategies {
Note left of ResilienceStrategies: "21st century, food sovereignty movements, regenerative agriculture, local food system rebuilding"
}
ResilienceStrategies --> Time2030
Time2030 --> [*]
```
```mermaid
stateDiagram-v2
%% Y-Axis: Time
state "Time: 1780" as Time1780
state "Time: 1830" as Time1830
state "Time: 1880" as Time1880
state "Time: 1930" as Time1930
state "Time: 1980" as Time1980
state "Time: 2030" as Time2030
%% Agrarian Changes and Global Food Regimes
[*] --> Time1780
Time1780 --> TraditionalAgriculture : "Pre-contact Era"
state "Traditional Agriculture<br/>Pre-contact Hawaii, self-sufficient<br/>taro and fishpond systems" as TraditionalAgriculture
TraditionalAgriculture --> EarlyColonialImpact
Time1830 --> EarlyColonialImpact : "1778-1893, European Contact"
state "Early Colonial Impact<br/>Land privatization, sugarcane<br/>and pineapple plantations" as EarlyColonialImpact
EarlyColonialImpact --> OverthrowMonarchy
Time1880 --> OverthrowMonarchy : "1893, Overthrow of the Hawaiian Kingdom"
state "Overthrow of Monarchy<br/>Loss of sovereignty" as OverthrowMonarchy
OverthrowMonarchy --> PlantationEconomy
Time1930 --> PlantationEconomy : "1900-1960s, Plantation Economy"
state "Plantation Economy<br/>Dominance of sugarcane and pineapple,<br/>migrant labor, export-oriented" as PlantationEconomy
PlantationEconomy --> Statehood
Time1980 --> Statehood : "1959, Hawaii becomes a U.S. state"
state "Statehood<br/>Increased military and<br/>tourism investment" as Statehood
Statehood --> Globalization
Time1980 --> Globalization : "1960s-present, Globalization and Neoliberal Policies"
state "Globalization<br/>Trade liberalization, agribusiness<br/>rise, reliance on imports" as Globalization
state "Food Insecurity Crisis<br/>Impact on local food systems,<br/>increased dependence on imports" as FoodInsecurityCrisis
state "Environmental Crisis<br/>Industrial agriculture impacts,<br/>biodiversity loss, climate change" as EnvironmentalCrisis
state "Economic Crisis<br/>Market volatility, financialization<br/>of land, impact on small-scale farmers" as EconomicCrisis
Globalization --> FoodInsecurityCrisis
Globalization --> EnvironmentalCrisis
Globalization --> EconomicCrisis
state "Resilience Strategies<br/>21st century, food sovereignty movements,<br/>regenerative agriculture, local food<br/>system rebuilding" as ResilienceStrategies
FoodInsecurityCrisis --> ResilienceStrategies
EnvironmentalCrisis --> ResilienceStrategies
EconomicCrisis --> ResilienceStrategies
ResilienceStrategies --> Time2030
Time2030 --> [*]
```